Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions extras/build.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

# Makes a per system `lbf-nix` option.
perSystem = flake-parts-lib.mkPerSystemOption
({ pkgs, config, pkgsForRust, ... }: {
({ pkgs, config, ... }: {

options.lbf-nix = lib.mkOption {
type = lib.types.anything;
Expand All @@ -38,11 +38,6 @@
buildInputs = config.settings.shell.tools;
};

lbf-nix = {
# NOTE(bladyjoker): If you need to add a function the export externally and use internally via config.lbf-nix, add it here.
rustFlake = import ./flake-rust.nix pkgsForRust;
};

# Makes it available in the per system `lib` argument.
_module.args.lib = lib // {
inherit (config) lbf-nix;
Expand Down
9 changes: 3 additions & 6 deletions runtimes/rust/lbr-prelude-derive/build.nix
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
{ inputs, ... }: {
perSystem = { config, ... }:
perSystem = { config, system, ... }:
let
rustFlake =
config.lbf-nix.rustFlake {
inputs.flake-lang.lib.${system}.rustFlake {
src = ./.;
inherit (inputs) crane;
crateName = "lbr-prelude-derive";
extraSources = [
{
name = "lbr-prelude";
path = config.packages.lbr-prelude-rust-src;
}
config.packages.lbr-prelude-rust-src
];
devShellHook = config.settings.shell.hook;
};
Expand Down
9 changes: 3 additions & 6 deletions runtimes/rust/lbr-prelude/build.nix
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
{ inputs, ... }: {
perSystem = { config, ... }:
perSystem = { config, system, ... }:
let
rustFlake =
config.lbf-nix.rustFlake {
inputs.flake-lang.lib.${system}.rustFlake {
src = ./.;
inherit (inputs) crane;
crateName = "lbr-prelude";
extraSources = [
{
name = "lbr-prelude-derive";
path = config.packages.lbr-prelude-derive-rust-src;
}
config.packages.lbr-prelude-derive-rust-src
];
devShellHook = config.settings.shell.hook;
};
Expand Down
29 changes: 7 additions & 22 deletions testsuites/lbt-plutus/lbt-plutus-rust/build.nix
Original file line number Diff line number Diff line change
@@ -1,33 +1,18 @@
{ inputs, ... }: {
perSystem = { config, ... }:
perSystem = { config, system, ... }:

let
rustFlake = config.lbf-nix.rustFlake {
rustFlake = inputs.flake-lang.lib.${system}.rustFlake {
src = ./.;
inherit (inputs) crane;
crateName = "lbt-plutus";

extraSources = [
{
name = "lbf-plutus-rust-golden-api";
path = config.packages.lbf-plutus-golden-api-rust;
}
{
name = "lbf-prelude";
path = config.packages.lbf-prelude-rust;
}
{
name = "lbf-plutus";
path = config.packages.lbf-plutus-rust;
}
{
name = "lbr-prelude";
path = config.packages.lbr-prelude-rust-src;
}
{
name = "lbr-prelude-derive";
path = config.packages.lbr-prelude-derive-rust-src;
}
config.packages.lbf-plutus-golden-api-rust
config.packages.lbf-prelude-rust
config.packages.lbf-plutus-rust
config.packages.lbr-prelude-rust-src
config.packages.lbr-prelude-derive-rust-src
];
data = [
{
Expand Down
24 changes: 6 additions & 18 deletions testsuites/lbt-prelude/lbt-prelude-rust/build.nix
Original file line number Diff line number Diff line change
@@ -1,29 +1,17 @@
{ inputs, ... }: {
perSystem = { config, ... }:
perSystem = { config, system, ... }:

let
rustFlake = config.lbf-nix.rustFlake {
rustFlake = inputs.flake-lang.lib.${system}.rustFlake {
src = ./.;
inherit (inputs) crane;
crateName = "lbt-prelude";

extraSources = [
{
name = "lbf-prelude-golden-api";
path = config.packages.lbf-prelude-golden-api-rust;
}
{
name = "lbf-prelude";
path = config.packages.lbf-prelude-rust;
}
{
name = "lbr-prelude";
path = config.packages.lbr-prelude-rust-src;
}
{
name = "lbr-prelude-derive";
path = config.packages.lbr-prelude-derive-rust-src;
}
config.packages.lbf-prelude-golden-api-rust
config.packages.lbf-prelude-rust
config.packages.lbr-prelude-rust-src
config.packages.lbr-prelude-derive-rust-src
];
data = [
{
Expand Down