summary refs log tree commit diff
path: root/img
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2022-05-16 14:42:10 +0000
committerAlyssa Ross <hi@alyssa.is>2022-05-16 16:13:10 +0000
commit541bdd67bf406e9d54e36401fb85b08f8c6abba9 (patch)
tree728ec2a0a8869d3babac75f6028f962aa7e9d09a /img
parenta9c192e00d17548f75e18465baf359813bc05e72 (diff)
downloadspectrum-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 'img')
-rw-r--r--img/live/default.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/img/live/default.nix b/img/live/default.nix
index bebc1c1..770b03b 100644
--- a/img/live/default.nix
+++ b/img/live/default.nix
@@ -4,7 +4,7 @@
 { pkgs ? import <nixpkgs> {} }:
 
 let
-  inherit (pkgs.lib) cleanSource cleanSourceWith;
+  inherit (pkgs.lib) cleanSource cleanSourceWith hasSuffix;
 
   extfs = pkgs.pkgsStatic.callPackage ../../host/initramfs/extfs.nix {
     inherit pkgs;
@@ -20,7 +20,9 @@ stdenv.mkDerivation {
   name = "spectrum-live.img";
 
   src = cleanSourceWith {
-    filter = name: _type: name != "${toString ./.}/build";
+    filter = name: _type:
+      name != "${toString ./.}/build" &&
+      !(hasSuffix ".nix" name);
     src = cleanSource ./.;
   };