default.nix: better source filtering
This commit is contained in:
parent
149e5655fd
commit
848ed362be
17
default.nix
17
default.nix
|
@ -13,13 +13,20 @@ rustPlatform.buildRustPackage rec {
|
||||||
baseName = baseNameOf (toString path);
|
baseName = baseNameOf (toString path);
|
||||||
in !(lib.any (b: b) [
|
in !(lib.any (b: b) [
|
||||||
(!(lib.cleanSourceFilter path type))
|
(!(lib.cleanSourceFilter path type))
|
||||||
(baseName == "target" && type == "directory")
|
(type == "directory" && lib.elem baseName [
|
||||||
(baseName == "nix" && type == "directory")
|
".direnv"
|
||||||
(baseName == "flake.nix" && type == "regular")
|
".git"
|
||||||
(baseName == "flake.lock" && type == "regular")
|
"target"
|
||||||
|
"result"
|
||||||
|
])
|
||||||
|
(type == "regular" && lib.elem baseName [
|
||||||
|
"flake.nix"
|
||||||
|
"default.nix"
|
||||||
|
"module.nix"
|
||||||
|
".envrc"
|
||||||
|
])
|
||||||
])) ./.;
|
])) ./.;
|
||||||
|
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
cargoLock = {
|
cargoLock = {
|
||||||
|
|
Loading…
Reference in New Issue