various: replace substituteAll with replaceVars (#360770)

authored by philiptaron.tngl.sh and committed by GitHub 246e737c 3c241d34

+70 -85
+4 -4
pkgs/applications/editors/emacs/make-emacs.nix
··· 51 , recurseIntoAttrs 52 , sigtool 53 , sqlite 54 - , substituteAll 55 , systemd 56 , tree-sitter 57 , texinfo ··· 148 inherit src; 149 150 patches = patches fetchpatch ++ lib.optionals withNativeCompilation [ 151 - (substituteAll { 152 - src = if lib.versionOlder finalAttrs.version "29" 153 then ./native-comp-driver-options-28.patch 154 else if lib.versionOlder finalAttrs.version "30" 155 then ./native-comp-driver-options.patch 156 - else ./native-comp-driver-options-30.patch; 157 backendPath = (lib.concatStringsSep " " 158 (builtins.map (x: ''"-B${x}"'') ([ 159 # Paths necessary so the JIT compiler finds its libraries:
··· 51 , recurseIntoAttrs 52 , sigtool 53 , sqlite 54 + , replaceVars 55 , systemd 56 , tree-sitter 57 , texinfo ··· 148 inherit src; 149 150 patches = patches fetchpatch ++ lib.optionals withNativeCompilation [ 151 + (replaceVars (if lib.versionOlder finalAttrs.version "29" 152 then ./native-comp-driver-options-28.patch 153 else if lib.versionOlder finalAttrs.version "30" 154 then ./native-comp-driver-options.patch 155 + else ./native-comp-driver-options-30.patch) { 156 + 157 backendPath = (lib.concatStringsSep " " 158 (builtins.map (x: ''"-B${x}"'') ([ 159 # Paths necessary so the JIT compiler finds its libraries:
+2 -3
pkgs/applications/kde/kdegraphics-thumbnailers/default.nix
··· 1 { 2 - mkDerivation, lib, ghostscript, substituteAll, 3 extra-cmake-modules, karchive, kio, libkexiv2, libkdcraw, kdegraphics-mobipocket 4 }: 5 ··· 15 patches = [ 16 # Hardcode patches to Ghostscript so PDF thumbnails work OOTB. 17 # Intentionally not doing the same for dvips because TeX is big. 18 - (substituteAll { 19 gs = "${ghostscript}/bin/gs"; 20 - src = ./gs-paths.patch; 21 }) 22 ]; 23 }
··· 1 { 2 + mkDerivation, lib, ghostscript, replaceVars, 3 extra-cmake-modules, karchive, kio, libkexiv2, libkdcraw, kdegraphics-mobipocket 4 }: 5 ··· 15 patches = [ 16 # Hardcode patches to Ghostscript so PDF thumbnails work OOTB. 17 # Intentionally not doing the same for dvips because TeX is big. 18 + (replaceVars ./gs-paths.patch { 19 gs = "${ghostscript}/bin/gs"; 20 }) 21 ]; 22 }
-1
pkgs/build-support/docker/default.nix
··· 26 , skopeo 27 , stdenv 28 , storeDir ? builtins.storeDir 29 - , substituteAll 30 , symlinkJoin 31 , tarsum 32 , util-linux
··· 26 , skopeo 27 , stdenv 28 , storeDir ? builtins.storeDir 29 , symlinkJoin 30 , tarsum 31 , util-linux
-1
pkgs/build-support/dotnet/build-dotnet-module/default.nix
··· 3 runtimeShell, 4 stdenvNoCC, 5 callPackage, 6 - substituteAll, 7 writeShellScript, 8 makeWrapper, 9 dotnetCorePackages,
··· 3 runtimeShell, 4 stdenvNoCC, 5 callPackage, 6 writeShellScript, 7 makeWrapper, 8 dotnetCorePackages,
+2 -2
pkgs/build-support/testers/default.nix
··· 10 runCommandWith, 11 stdenv, 12 stdenvNoCC, 13 - substituteAll, 14 testers, 15 }: 16 # Documentation is in doc/build-helpers/testers.chapter.md ··· 24 testBuildFailure = drv: drv.overrideAttrs (orig: { 25 builder = buildPackages.bash; 26 args = [ 27 - (substituteAll { coreutils = buildPackages.coreutils; src = ./expect-failure.sh; }) 28 orig.realBuilder or stdenv.shell 29 ] ++ orig.args or ["-e" (orig.builder or ../../stdenv/generic/default-builder.sh)]; 30 });
··· 10 runCommandWith, 11 stdenv, 12 stdenvNoCC, 13 + replaceVars, 14 testers, 15 }: 16 # Documentation is in doc/build-helpers/testers.chapter.md ··· 24 testBuildFailure = drv: drv.overrideAttrs (orig: { 25 builder = buildPackages.bash; 26 args = [ 27 + (replaceVars ./expect-failure.sh { coreutils = buildPackages.coreutils; }) 28 orig.realBuilder or stdenv.shell 29 ] ++ orig.args or ["-e" (orig.builder or ../../stdenv/generic/default-builder.sh)]; 30 });
-1
pkgs/by-name/cb/cbmc/package.nix
··· 11 makeWrapper, 12 perl, 13 substituteAll, 14 - substitute, 15 cudd, 16 fetchurl, 17 nix-update-script,
··· 11 makeWrapper, 12 perl, 13 substituteAll, 14 cudd, 15 fetchurl, 16 nix-update-script,
+9 -9
pkgs/by-name/hy/hylafaxplus/config.site
··· 1 @config_maxgid@ 2 - DIR_BIN="@out_@/bin" 3 - DIR_FONTMAP="@out_@/share/ghostscript/@ghostscript_version@" 4 - DIR_LIB="@out_@/lib" 5 - DIR_LIBDATA="@out_@/spool/etc" 6 - DIR_LIBEXEC="@out_@/spool/bin" 7 DIR_LOCKS=/var/lock 8 - DIR_MAN="@out_@/share/man" 9 - DIR_SBIN="@out_@/spool/bin" 10 - DIR_SPOOL="@out_@/spool" 11 FONTMAP="@ghostscript@/share/ghostscript/@ghostscript_version@" 12 PATH_AFM="@ghostscript@/share/ghostscript/fonts" 13 - PATH_DPSRIP="@out_@/spool/bin/ps2fax" 14 PATH_EGETTY="@coreutils@/bin/false" 15 PATH_GSRIP="@ghostscript@/bin/gs" 16 PATH_IMPRIP="@coreutils@/bin/false"
··· 1 @config_maxgid@ 2 + DIR_BIN="@out@/bin" 3 + DIR_FONTMAP="@out@/share/ghostscript/@ghostscript_version@" 4 + DIR_LIB="@out@/lib" 5 + DIR_LIBDATA="@out@/spool/etc" 6 + DIR_LIBEXEC="@out@/spool/bin" 7 DIR_LOCKS=/var/lock 8 + DIR_MAN="@out@/share/man" 9 + DIR_SBIN="@out@/spool/bin" 10 + DIR_SPOOL="@out@/spool" 11 FONTMAP="@ghostscript@/share/ghostscript/@ghostscript_version@" 12 PATH_AFM="@ghostscript@/share/ghostscript/fonts" 13 + PATH_DPSRIP="@out@/spool/bin/ps2fax" 14 PATH_EGETTY="@coreutils@/bin/false" 15 PATH_GSRIP="@ghostscript@/bin/gs" 16 PATH_IMPRIP="@coreutils@/bin/false"
+5 -11
pkgs/by-name/hy/hylafaxplus/package.nix
··· 3 , fakeroot 4 , fetchurl 5 , libfaketime 6 - , substituteAll 7 ## runtime dependencies 8 , coreutils 9 , file ··· 35 version = "7.0.9"; 36 hash = "sha512-3OJwM4vFC9pzPozPobFLiNNx/Qnkl8BpNNziRUpJNBDLBxjtg/eDm3GnprS2hpt7VUoV4PCsFvp1hxhNnhlUwQ=="; 37 38 - configSite = substituteAll { 39 - name = "${pname}-config.site"; 40 - src = ./config.site; 41 config_maxgid = lib.optionalString (maxgid!=null) ''CONFIG_MAXGID=${builtins.toString maxgid}''; 42 ghostscript_version = ghostscript.version; 43 - out_ = "@out@"; # "out" will be resolved in post-install.sh 44 inherit coreutils ghostscript libtiff; 45 }; 46 47 - postPatch = substituteAll { 48 - name = "${pname}-post-patch.sh"; 49 - src = ./post-patch.sh; 50 inherit configSite; 51 maxuid = lib.optionalString (maxuid!=null) (builtins.toString maxuid); 52 faxcover_binpath = lib.makeBinPath ··· 55 [stdenv.shellPackage coreutils findutils gnused gnugrep gawk]; 56 }; 57 58 - postInstall = substituteAll { 59 - name = "${pname}-post-install.sh"; 60 - src = ./post-install.sh; 61 inherit fakeroot libfaketime; 62 }; 63
··· 3 , fakeroot 4 , fetchurl 5 , libfaketime 6 + , replaceVars 7 ## runtime dependencies 8 , coreutils 9 , file ··· 35 version = "7.0.9"; 36 hash = "sha512-3OJwM4vFC9pzPozPobFLiNNx/Qnkl8BpNNziRUpJNBDLBxjtg/eDm3GnprS2hpt7VUoV4PCsFvp1hxhNnhlUwQ=="; 37 38 + configSite = replaceVars ./config.site { 39 config_maxgid = lib.optionalString (maxgid!=null) ''CONFIG_MAXGID=${builtins.toString maxgid}''; 40 ghostscript_version = ghostscript.version; 41 + out = null; # "out" will be resolved in post-install.sh 42 inherit coreutils ghostscript libtiff; 43 }; 44 45 + postPatch = replaceVars ./post-patch.sh { 46 inherit configSite; 47 maxuid = lib.optionalString (maxuid!=null) (builtins.toString maxuid); 48 faxcover_binpath = lib.makeBinPath ··· 51 [stdenv.shellPackage coreutils findutils gnused gnugrep gawk]; 52 }; 53 54 + postInstall = replaceVars ./post-install.sh { 55 inherit fakeroot libfaketime; 56 }; 57
+2 -3
pkgs/by-name/li/libnvidia-container/package.nix
··· 10 rpcsvc-proto, 11 libtirpc, 12 makeWrapper, 13 - substituteAll, 14 removeReferencesTo, 15 replaceVars, 16 go, ··· 23 rev = modprobeVersion; 24 sha256 = "sha256-iBRMkvOXacs/llTtvc/ZC5i/q9gc8lMuUHxMbu8A+Kg="; 25 }; 26 - modprobePatch = substituteAll { 27 - src = ./modprobe.patch; 28 inherit modprobeVersion; 29 }; 30 in
··· 10 rpcsvc-proto, 11 libtirpc, 12 makeWrapper, 13 removeReferencesTo, 14 replaceVars, 15 go, ··· 22 rev = modprobeVersion; 23 sha256 = "sha256-iBRMkvOXacs/llTtvc/ZC5i/q9gc8lMuUHxMbu8A+Kg="; 24 }; 25 + modprobePatch = replaceVars ./modprobe.patch { 26 + 27 inherit modprobeVersion; 28 }; 29 in
+4 -4
pkgs/by-name/ps/ps2eps/package.nix
··· 1 { lib 2 , fetchFromGitHub 3 , perlPackages 4 - , substituteAll 5 , ghostscript 6 , installShellFiles 7 }: ··· 18 hash = "sha256-SPLwsGKLVhANoqSQ/GJ938cYjbjMbUOXkNn9so3aJTA="; 19 }; 20 patches = [ 21 - (substituteAll { 22 - src = ./hardcode-deps.patch; 23 gs = "${ghostscript}/bin/gs"; 24 - # bbox cannot be substituted here because substituteAll doesn't know what 25 # will be the $out path of the main derivation 26 }) 27 ]; 28
··· 1 { lib 2 , fetchFromGitHub 3 , perlPackages 4 + , replaceVars 5 , ghostscript 6 , installShellFiles 7 }: ··· 18 hash = "sha256-SPLwsGKLVhANoqSQ/GJ938cYjbjMbUOXkNn9so3aJTA="; 19 }; 20 patches = [ 21 + (replaceVars ./hardcode-deps.patch { 22 gs = "${ghostscript}/bin/gs"; 23 + # bbox cannot be substituted here because replaceVars doesn't know what 24 # will be the $out path of the main derivation 25 + bbox = null; 26 }) 27 ]; 28
+1 -1
pkgs/by-name/tp/tpm2-pkcs11/package.nix
··· 1 - { stdenv, lib, fetchFromGitHub, substituteAll 2 , pkg-config, autoreconfHook, autoconf-archive, makeWrapper, patchelf 3 , tpm2-tss, tpm2-tools, opensc, openssl, sqlite, python3, glibc, libyaml 4 , abrmdSupport ? true, tpm2-abrmd ? null
··· 1 + { stdenv, lib, fetchFromGitHub 2 , pkg-config, autoreconfHook, autoconf-archive, makeWrapper, patchelf 3 , tpm2-tss, tpm2-tools, opensc, openssl, sqlite, python3, glibc, libyaml 4 , abrmdSupport ? true, tpm2-abrmd ? null
+2 -3
pkgs/by-name/zo/zod/package.nix
··· 13 , makeWrapper 14 , coreutils 15 , scalingFactor ? 2 # this is to resize the fixed-size zod_launcher window 16 - , substituteAll 17 }: 18 let 19 name = "zod-engine"; ··· 70 # 2,3,4 look acceptable on my 4k monitor and 1 is unreadable. 71 # also the ./ in the run command is removed to have easier time starting the game 72 patches = [ 73 - (substituteAll { 74 inherit scalingFactor; 75 - src=./0002-add-scaling-factor-to-source.patch; 76 }) 77 ]; 78 postPatch = ''
··· 13 , makeWrapper 14 , coreutils 15 , scalingFactor ? 2 # this is to resize the fixed-size zod_launcher window 16 + , replaceVars 17 }: 18 let 19 name = "zod-engine"; ··· 70 # 2,3,4 look acceptable on my 4k monitor and 1 is unreadable. 71 # also the ./ in the run command is removed to have easier time starting the game 72 patches = [ 73 + (replaceVars ./0002-add-scaling-factor-to-source.patch { 74 inherit scalingFactor; 75 }) 76 ]; 77 postPatch = ''
-1
pkgs/development/compilers/llvm/common/clang/default.nix
··· 5 , src ? null 6 , monorepoSrc ? null 7 , runCommand 8 - , substituteAll 9 , cmake 10 , ninja 11 , libxml2
··· 5 , src ? null 6 , monorepoSrc ? null 7 , runCommand 8 , cmake 9 , ninja 10 , libxml2
+12 -9
pkgs/development/compilers/llvm/common/default.nix
··· 7 preLibcCrossHeaders, 8 libxcrypt, 9 substitute, 10 - substituteAll, 11 fetchFromGitHub, 12 fetchpatch, 13 fetchpatch2, ··· 546 ./clang/ignore-nostd-link-13.diff 547 ) 548 ++ [ 549 - (substituteAll { 550 - src = 551 if (lib.versionOlder metadata.release_version "16") then 552 ./clang/clang-11-15-LLVMgold-path.patch 553 else 554 - ./clang/clang-at-least-16-LLVMgold-path.patch; 555 - libllvmLibdir = "${tools.libllvm.lib}/lib"; 556 - }) 557 ] 558 # Backport version logic from Clang 16. This is needed by the following patch. 559 ++ lib.optional (lib.versions.major metadata.release_version == "15") (fetchpatch { ··· 661 patches = 662 let 663 resourceDirPatch = callPackage ( 664 - { substituteAll, libclang }: 665 - (substituteAll { 666 - src = metadata.getVersionFile "lldb/resource-dir.patch"; 667 clangLibDir = "${lib.getLib libclang}/lib"; 668 }).overrideAttrs 669 (_: _: { name = "resource-dir.patch"; })
··· 7 preLibcCrossHeaders, 8 libxcrypt, 9 substitute, 10 + replaceVars, 11 fetchFromGitHub, 12 fetchpatch, 13 fetchpatch2, ··· 546 ./clang/ignore-nostd-link-13.diff 547 ) 548 ++ [ 549 + (replaceVars 550 + ( 551 if (lib.versionOlder metadata.release_version "16") then 552 ./clang/clang-11-15-LLVMgold-path.patch 553 else 554 + ./clang/clang-at-least-16-LLVMgold-path.patch 555 + ) 556 + { 557 + libllvmLibdir = "${tools.libllvm.lib}/lib"; 558 + } 559 + ) 560 ] 561 # Backport version logic from Clang 16. This is needed by the following patch. 562 ++ lib.optional (lib.versions.major metadata.release_version == "15") (fetchpatch { ··· 664 patches = 665 let 666 resourceDirPatch = callPackage ( 667 + { replaceVars, libclang }: 668 + (replaceVars (metadata.getVersionFile "lldb/resource-dir.patch") { 669 + 670 clangLibDir = "${lib.getLib libclang}/lib"; 671 }).overrideAttrs 672 (_: _: { name = "resource-dir.patch"; })
+5 -5
pkgs/development/python-modules/pysdl2/PySDL2-dll.patch
··· 39 40 try: 41 - dll = DLL("SDL2", ["SDL2", "SDL2-2.0", "SDL2-2.0.0"], os.getenv("PYSDL2_DLL_PATH")) 42 - + dll = DLL("SDL2", "@sdl2@") 43 except RuntimeError as exc: 44 raise ImportError(exc) 45 ··· 53 try: 54 - dll = DLL("SDL2_gfx", ["SDL2_gfx", "SDL2_gfx-1.0"], 55 - os.getenv("PYSDL2_DLL_PATH")) 56 - + dll = DLL("SDL2_gfx", "@sdl2_gfx@") 57 except RuntimeError as exc: 58 raise ImportError(exc) 59 ··· 68 - dll = DLL( 69 - "SDL2_image", ["SDL2_image", "SDL2_image-2.0"], os.getenv("PYSDL2_DLL_PATH") 70 - ) 71 - + dll = DLL("SDL2_image", "@sdl2_image@") 72 except RuntimeError as exc: 73 raise ImportError(exc) 74 ··· 82 try: 83 - dll = DLL("SDL2_mixer", ["SDL2_mixer", "SDL2_mixer-2.0"], 84 - os.getenv("PYSDL2_DLL_PATH")) 85 - + dll = DLL("SDL2_mixer", "@sdl2_mixer@") 86 except RuntimeError as exc: 87 raise ImportError(exc) 88 ··· 96 try: 97 - dll = DLL("SDL2_ttf", ["SDL2_ttf", "SDL2_ttf-2.0"], 98 - os.getenv("PYSDL2_DLL_PATH")) 99 - + dll = DLL("SDL2_ttf", "@sdl2_ttf@") 100 except RuntimeError as exc: 101 raise ImportError(exc) 102
··· 39 40 try: 41 - dll = DLL("SDL2", ["SDL2", "SDL2-2.0", "SDL2-2.0.0"], os.getenv("PYSDL2_DLL_PATH")) 42 + + dll = DLL("SDL2", "@SDL2@") 43 except RuntimeError as exc: 44 raise ImportError(exc) 45 ··· 53 try: 54 - dll = DLL("SDL2_gfx", ["SDL2_gfx", "SDL2_gfx-1.0"], 55 - os.getenv("PYSDL2_DLL_PATH")) 56 + + dll = DLL("SDL2_gfx", "@SDL2_gfx@") 57 except RuntimeError as exc: 58 raise ImportError(exc) 59 ··· 68 - dll = DLL( 69 - "SDL2_image", ["SDL2_image", "SDL2_image-2.0"], os.getenv("PYSDL2_DLL_PATH") 70 - ) 71 + + dll = DLL("SDL2_image", "@SDL2_image@") 72 except RuntimeError as exc: 73 raise ImportError(exc) 74 ··· 82 try: 83 - dll = DLL("SDL2_mixer", ["SDL2_mixer", "SDL2_mixer-2.0"], 84 - os.getenv("PYSDL2_DLL_PATH")) 85 + + dll = DLL("SDL2_mixer", "@SDL2_mixer@") 86 except RuntimeError as exc: 87 raise ImportError(exc) 88 ··· 96 try: 97 - dll = DLL("SDL2_ttf", ["SDL2_ttf", "SDL2_ttf-2.0"], 98 - os.getenv("PYSDL2_DLL_PATH")) 99 + + dll = DLL("SDL2_ttf", "@SDL2_ttf@") 100 except RuntimeError as exc: 101 raise ImportError(exc) 102
+13 -16
pkgs/development/python-modules/pysdl2/default.nix
··· 1 { 2 stdenv, 3 lib, 4 - substituteAll, 5 fetchPypi, 6 buildPythonPackage, 7 SDL2, ··· 38 ]; 39 propagatedBuildInputs = [ SDL2 ]; 40 patches = [ 41 - (substituteAll ( 42 - { 43 - src = ./PySDL2-dll.patch; 44 - } 45 - // 46 - builtins.mapAttrs 47 - (_: pkg: "${pkg}/lib/lib${pkg.pname}${stdenv.hostPlatform.extensions.sharedLibrary}") 48 - { 49 - # substituteAll keys must start lowercase 50 - sdl2 = SDL2; 51 - sdl2_ttf = SDL2_ttf; 52 - sdl2_image = SDL2_image; 53 - sdl2_gfx = SDL2_gfx; 54 - sdl2_mixer = SDL2_mixer; 55 - } 56 )) 57 ]; 58
··· 1 { 2 stdenv, 3 lib, 4 + replaceVars, 5 fetchPypi, 6 buildPythonPackage, 7 SDL2, ··· 38 ]; 39 propagatedBuildInputs = [ SDL2 ]; 40 patches = [ 41 + (replaceVars ./PySDL2-dll.patch ( 42 + builtins.mapAttrs 43 + (_: pkg: "${pkg}/lib/lib${pkg.pname}${stdenv.hostPlatform.extensions.sharedLibrary}") 44 + { 45 + inherit 46 + SDL2 47 + SDL2_ttf 48 + SDL2_image 49 + SDL2_gfx 50 + SDL2_mixer 51 + ; 52 + } 53 )) 54 ]; 55
-1
pkgs/development/tools/electron/common.nix
··· 8 , fixup-yarn-lock 9 , npmHooks 10 , yarn 11 - , substituteAll 12 , libnotify 13 , unzip 14 , pkgs
··· 8 , fixup-yarn-lock 9 , npmHooks 10 , yarn 11 , libnotify 12 , unzip 13 , pkgs
+4 -4
pkgs/development/tools/ocaml/merlin/4.x.nix
··· 1 { lib 2 - , substituteAll 3 , fetchurl 4 , ocaml 5 , dune_3 ··· 57 old-patch = lib.versionOlder version "4.17"; 58 in 59 [ 60 - (substituteAll { 61 - src = if old-patch then ./fix-paths.patch else ./fix-paths2.patch; 62 - dot_merlin_reader = "${dot-merlin-reader}/bin/dot-merlin-reader"; 63 dune = "${dune_3}/bin/dune"; 64 }) 65 ];
··· 1 { lib 2 + , replaceVars 3 , fetchurl 4 , ocaml 5 , dune_3 ··· 57 old-patch = lib.versionOlder version "4.17"; 58 in 59 [ 60 + (replaceVars (if old-patch then ./fix-paths.patch else ./fix-paths2.patch) { 61 + 62 + dot-merlin-reader = "${dot-merlin-reader}/bin/dot-merlin-reader"; 63 dune = "${dune_3}/bin/dune"; 64 }) 65 ];
+2 -3
pkgs/kde/gear/kdegraphics-thumbnailers/default.nix
··· 1 { 2 mkKdeDerivation, 3 - substituteAll, 4 ghostscript, 5 }: 6 mkKdeDerivation { ··· 9 patches = [ 10 # Hardcode patches to Ghostscript so PDF thumbnails work OOTB. 11 # Intentionally not doing the same for dvips because TeX is big. 12 - (substituteAll { 13 gs = "${ghostscript}/bin/gs"; 14 - src = ./gs-paths.patch; 15 }) 16 ]; 17 }
··· 1 { 2 mkKdeDerivation, 3 + replaceVars, 4 ghostscript, 5 }: 6 mkKdeDerivation { ··· 9 patches = [ 10 # Hardcode patches to Ghostscript so PDF thumbnails work OOTB. 11 # Intentionally not doing the same for dvips because TeX is big. 12 + (replaceVars ./gs-paths.patch { 13 gs = "${ghostscript}/bin/gs"; 14 }) 15 ]; 16 }
+3 -3
pkgs/os-specific/linux/lvm2/common.nix
··· 6 , coreutils 7 , libuuid 8 , libaio 9 - , substituteAll 10 , enableCmdlib ? false 11 , enableDmeventd ? false 12 , udevSupport ? !stdenv.hostPlatform.isStatic, udev ··· 91 92 patches = [ 93 # fixes paths to and checks for tools 94 - (substituteAll (let 95 optionalTool = cond: pkg: if cond then pkg else "/run/current-system/sw"; 96 in { 97 - src = ./fix-blkdeactivate.patch; 98 inherit coreutils; 99 util_linux = optionalTool enableUtilLinux util-linux; 100 mdadm = optionalTool enableMdadm mdadm; 101 multipath_tools = optionalTool enableMultipath multipath-tools; 102 vdo = optionalTool enableVDO vdo; 103 })) 104 ./fix-stdio-usage.patch 105 ];
··· 6 , coreutils 7 , libuuid 8 , libaio 9 + , replaceVars 10 , enableCmdlib ? false 11 , enableDmeventd ? false 12 , udevSupport ? !stdenv.hostPlatform.isStatic, udev ··· 91 92 patches = [ 93 # fixes paths to and checks for tools 94 + (replaceVars ./fix-blkdeactivate.patch (let 95 optionalTool = cond: pkg: if cond then pkg else "/run/current-system/sw"; 96 in { 97 inherit coreutils; 98 util_linux = optionalTool enableUtilLinux util-linux; 99 mdadm = optionalTool enableMdadm mdadm; 100 multipath_tools = optionalTool enableMultipath multipath-tools; 101 vdo = optionalTool enableVDO vdo; 102 + SBINDIR = null; # part of original source code in the patch's context 103 })) 104 ./fix-stdio-usage.patch 105 ];