flake restructure
This commit is contained in:
parent
7871d4c9f9
commit
09124c8249
1 changed files with 21 additions and 21 deletions
42
flake.nix
42
flake.nix
|
@ -21,14 +21,16 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, flake-utils, rust-overlay, crane}:
|
outputs = { self, nixpkgs, flake-utils, rust-overlay, crane}: let
|
||||||
flake-utils.lib.eachDefaultSystem (system:
|
forAllSystems = function:
|
||||||
let
|
nixpkgs.lib.genAttrs [
|
||||||
overlays = [ (import rust-overlay) ];
|
"x86_64-linux"
|
||||||
|
"aarch64-linux"
|
||||||
|
] (system: let
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
inherit system overlays;
|
inherit system;
|
||||||
|
overlays = [ (import rust-overlay) ];
|
||||||
};
|
};
|
||||||
|
|
||||||
rustToolchain = pkgs.rust-bin.stable.latest.default;
|
rustToolchain = pkgs.rust-bin.stable.latest.default;
|
||||||
|
|
||||||
markdownFilter = path: _type: builtins.match ".*md$" path != null;
|
markdownFilter = path: _type: builtins.match ".*md$" path != null;
|
||||||
|
@ -51,19 +53,17 @@
|
||||||
bin = craneLib.buildPackage (commonArgs // {
|
bin = craneLib.buildPackage (commonArgs // {
|
||||||
inherit cargoArtifacts;
|
inherit cargoArtifacts;
|
||||||
});
|
});
|
||||||
|
in function {
|
||||||
in
|
inherit bin pkgs;
|
||||||
with pkgs;
|
});
|
||||||
{
|
in {
|
||||||
packages = {
|
packages = forAllSystems({pkgs, bin}: {
|
||||||
inherit bin;
|
inherit bin;
|
||||||
default = bin;
|
default = bin;
|
||||||
};
|
});
|
||||||
devShells.default = mkShell {
|
devShells = forAllSystems({pkgs, bin}: pkgs.mkShell {
|
||||||
inputsFrom = [ bin ];
|
inputsFrom = bin;
|
||||||
};
|
});
|
||||||
|
hydraJobs."build" = forAllSystems({pkgs, bin}: bin);
|
||||||
hydraJobs."build" = bin;
|
};
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue