build: optimize flake
This commit is contained in:
parent
c9d85459f3
commit
8553f5efd9
1 changed files with 8 additions and 2 deletions
10
flake.nix
10
flake.nix
|
|
@ -10,9 +10,15 @@
|
||||||
inputs.flake-utils.lib.eachDefaultSystem (
|
inputs.flake-utils.lib.eachDefaultSystem (
|
||||||
system:
|
system:
|
||||||
let
|
let
|
||||||
pkgs = import inputs.nixpkgs { inherit system; };
|
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||||
|
lib = inputs.nixpkgs.lib;
|
||||||
|
|
||||||
|
src = lib.sourceFilesBySuffices ./. [
|
||||||
|
"Cargo.toml"
|
||||||
|
"Cargo.lock"
|
||||||
|
".rs"
|
||||||
|
];
|
||||||
|
|
||||||
src = ./.;
|
|
||||||
cargoToml = fromTOML (builtins.readFile "${src}/Cargo.toml");
|
cargoToml = fromTOML (builtins.readFile "${src}/Cargo.toml");
|
||||||
name = cargoToml.package.name;
|
name = cargoToml.package.name;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue