diff options
author | Alyssa Ross <hi@alyssa.is> | 2022-05-16 14:42:10 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2022-05-16 16:13:10 +0000 |
commit | 541bdd67bf406e9d54e36401fb85b08f8c6abba9 (patch) | |
tree | 728ec2a0a8869d3babac75f6028f962aa7e9d09a /host/rootfs | |
parent | a9c192e00d17548f75e18465baf359813bc05e72 (diff) | |
download | spectrum-541bdd67bf406e9d54e36401fb85b08f8c6abba9.tar spectrum-541bdd67bf406e9d54e36401fb85b08f8c6abba9.tar.gz spectrum-541bdd67bf406e9d54e36401fb85b08f8c6abba9.tar.bz2 spectrum-541bdd67bf406e9d54e36401fb85b08f8c6abba9.tar.lz spectrum-541bdd67bf406e9d54e36401fb85b08f8c6abba9.tar.xz spectrum-541bdd67bf406e9d54e36401fb85b08f8c6abba9.tar.zst spectrum-541bdd67bf406e9d54e36401fb85b08f8c6abba9.zip |
Remove Nix files in copyPathToStore
Nix files shouldn't be considered part of the sources, and so they should be filtered out. This way, changes to them (that don't change their meaning) won't force rebuilds.
Diffstat (limited to 'host/rootfs')
-rw-r--r-- | host/rootfs/default.nix | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/host/rootfs/default.nix b/host/rootfs/default.nix index 7ac3d3a..d4c96d9 100644 --- a/host/rootfs/default.nix +++ b/host/rootfs/default.nix @@ -9,7 +9,7 @@ }: let - inherit (lib) cleanSource cleanSourceWith concatMapStringsSep; + inherit (lib) cleanSource cleanSourceWith concatMapStringsSep hasSuffix; start-vm = import ../start-vm { pkgs = pkgs.pkgsStatic; }; @@ -83,7 +83,8 @@ stdenv.mkDerivation { name = "spectrum-rootfs"; src = cleanSourceWith { - filter = name: _type: name != "${toString ./.}/build"; + filter = name: _type: + name != "${toString ./.}/build" && !(hasSuffix ".nix" name); src = cleanSource ./.; }; |