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