treewide: don't hardcode /nix/store (no rebuilds changes)

improve experience for other store locations

Artturin 780669da 3b7218e9

+11 -11
+1 -1
pkgs/applications/networking/ids/suricata/default.nix
··· 121 121 122 122 postConfigure = '' 123 123 # Avoid unintended clousure growth. 124 - sed -i 's|/nix/store/\(.\{8\}\)[^-]*-|/nix/store/\1...-|g' ./src/build-info.h 124 + sed -i 's|${builtins.storeDir}/\(.\{8\}\)[^-]*-|${builtins.storeDir}/\1...-|g' ./src/build-info.h 125 125 ''; 126 126 127 127 hardeningDisable = [ "stackprotector" ];
+2 -2
pkgs/applications/networking/mailreaders/evolution/evolution/wrapper.nix
··· 23 23 fixSymlink () { 24 24 local link=$1 25 25 local target=$(readlink $link); 26 - local newtarget=$(sed "s@/nix/store/[^/]*/@$out/@" <<< "$target") 26 + local newtarget=$(sed "s@${builtins.storeDir}/[^/]*/@$out/@" <<< "$target") 27 27 if [[ $target != $newtarget ]] && [[ -d $newtarget ]]; then 28 28 echo fixing link to point to $newtarget instead of $target 29 29 rm $link ··· 35 35 fixSymlink $out/lib/systemd/user 36 36 for i in $out/share/dbus-1/services/*.service $out/lib/systemd/user/*.service; do 37 37 echo fixing service file $i to point to $out 38 - sed -i "s@/nix/store/[^/]*/@$out/@" $i 38 + sed -i "s@${builtins.storeDir}/[^/]*/@$out/@" $i 39 39 done 40 40 ''; 41 41 }
+1 -1
pkgs/applications/science/math/giac/default.nix
··· 111 111 # notably texlive, and we don't want texlive to become a runtime 112 112 # dependency 113 113 for file in $(find $out -name Makefile) ; do 114 - sed -i "s@/nix/store/[^/]*/bin/@@" "$file" ; 114 + sed -i "s@${builtins.storeDir}/[^/]*/bin/@@" "$file" ; 115 115 done; 116 116 117 117 # reference cycle
+1 -1
pkgs/build-support/dotnet/build-dotnet-module/default.nix
··· 176 176 # Note that toString is necessary here as it results in the path at 177 177 # eval time (i.e. to the file in your local Nixpkgs checkout) rather 178 178 # than the Nix store path of the path after it's been imported. 179 - if lib.isPath nugetDeps && !lib.hasPrefix "/nix/store/" (toString nugetDeps) 179 + if lib.isPath nugetDeps && !lib.hasPrefix "${builtins.storeDir}/" (toString nugetDeps) 180 180 then toString nugetDeps 181 181 else ''$(mktemp -t "${pname}-deps-XXXXXX.nix")''; 182 182 in
+1 -1
pkgs/build-support/fetchdocker/default.nix
··· 3 3 stripScheme = 4 4 builtins.replaceStrings [ "https://" "http://" ] [ "" "" ]; 5 5 stripNixStore = 6 - s: lib.removePrefix "/nix/store/" s; 6 + s: lib.removePrefix "${builtins.storeDir}/" s; 7 7 in 8 8 { name 9 9 , registry ? "https://registry-1.docker.io/v2/"
+1 -1
pkgs/build-support/release/nix-build.nix
··· 140 140 (lib.optional doCoverityAnalysis args.cov-build) ++ 141 141 (lib.optional doCoverityAnalysis args.xz); 142 142 143 - lcovFilter = ["/nix/store/*"] ++ lcovFilter; 143 + lcovFilter = ["${builtins.storeDir}/*"] ++ lcovFilter; 144 144 145 145 inherit lcovExtraTraceFiles; 146 146
+1 -1
pkgs/games/cataclysm-dda/wrapper.nix
··· 34 34 cp "$1" "''${1}.bk" 35 35 unlink "$1" 36 36 mv "''${1}.bk" "$1" 37 - sed -i "$1" -e "s,/nix/store/.\+\(/bin/cataclysm-tiles\),$out\1," 37 + sed -i "$1" -e "s,${builtins.storeDir}/.\+\(/bin/cataclysm-tiles\),$out\1," 38 38 } 39 39 for script in "$out/share/applications/cataclysm-dda.desktop" \ 40 40 "$out/Applications/Cataclysm.app/Contents/MacOS/Cataclysm.sh"
+1 -1
pkgs/os-specific/linux/sysdig/default.nix
··· 115 115 + lib.optionalString (kernel != null) '' 116 116 make install_driver 117 117 kernel_dev=${kernel.dev} 118 - kernel_dev=''${kernel_dev#/nix/store/} 118 + kernel_dev=''${kernel_dev#${builtins.storeDir}/} 119 119 kernel_dev=''${kernel_dev%%-linux*dev*} 120 120 if test -f "$out/lib/modules/${kernel.modDirVersion}/extra/scap.ko"; then 121 121 sed -i "s#$kernel_dev#................................#g" $out/lib/modules/${kernel.modDirVersion}/extra/scap.ko
+2 -2
pkgs/os-specific/linux/systemd/default.nix
··· 304 304 if dl.pkg == null then '' 305 305 # remove the dependency on the library by replacing it with an invalid path 306 306 for file in $(grep -lr '"${dl.name}"' src); do 307 - echo "patching dlopen(\"${dl.name}\", …) in $file to an invalid store path ("/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-not-implemented/${dl.name}")…" 308 - substituteInPlace "$file" --replace '"${dl.name}"' '"/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-not-implemented/${dl.name}"' 307 + echo "patching dlopen(\"${dl.name}\", …) in $file to an invalid store path ("${builtins.storeDir}/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-not-implemented/${dl.name}")…" 308 + substituteInPlace "$file" --replace '"${dl.name}"' '"${builtins.storeDir}/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-not-implemented/${dl.name}"' 309 309 done 310 310 '' else '' 311 311 # ensure that the library we provide actually exists