diff --git a/pkgs/applications/audio/easyabc/default.nix b/pkgs/applications/audio/easyabc/default.nix index 10af7b23b9d53c..16026b12750dce 100644 --- a/pkgs/applications/audio/easyabc/default.nix +++ b/pkgs/applications/audio/easyabc/default.nix @@ -2,7 +2,7 @@ lib, fetchFromGitHub, fetchPypi, - substituteAll, + replaceVars, python39, fluidsynth, soundfont-fluid, @@ -58,8 +58,7 @@ python.pkgs.buildPythonApplication { strictDeps = false; patches = [ - (substituteAll { - src = ./hardcoded-paths.patch; + (replaceVars ./hardcoded-paths.patch { fluidsynth = "${fluidsynth}/lib/libfluidsynth.so"; soundfont = "${soundfont-fluid}/share/soundfonts/FluidR3_GM2-2.sf2"; ghostscript = "${ghostscript}/bin/gs"; diff --git a/pkgs/applications/editors/emacs/elisp-packages/manual-packages/lsp-bridge/default.nix b/pkgs/applications/editors/emacs/elisp-packages/manual-packages/lsp-bridge/default.nix index c077089f75518d..ce92bd1908398e 100644 --- a/pkgs/applications/editors/emacs/elisp-packages/manual-packages/lsp-bridge/default.nix +++ b/pkgs/applications/editors/emacs/elisp-packages/manual-packages/lsp-bridge/default.nix @@ -3,7 +3,7 @@ python3, melpaBuild, fetchFromGitHub, - substituteAll, + replaceVars, acm, markdown-mode, basedpyright, @@ -42,8 +42,7 @@ melpaBuild { patches = [ # Hardcode the python dependencies needed for lsp-bridge, so users # don't have to modify their global environment - (substituteAll { - src = ./hardcode-dependencies.patch; + (replaceVars ./hardcode-dependencies.patch { python = python.interpreter; }) ]; diff --git a/pkgs/applications/gis/qgis/unwrapped-ltr.nix b/pkgs/applications/gis/qgis/unwrapped-ltr.nix index 6806ba5d41e4d4..38fff9745c0235 100644 --- a/pkgs/applications/gis/qgis/unwrapped-ltr.nix +++ b/pkgs/applications/gis/qgis/unwrapped-ltr.nix @@ -3,7 +3,7 @@ fetchFromGitHub, makeWrapper, mkDerivation, - substituteAll, + replaceVars, wrapGAppsHook3, wrapQtAppsHook, @@ -145,8 +145,7 @@ mkDerivation rec { ++ pythonBuildInputs; patches = [ - (substituteAll { - src = ./set-pyqt-package-dirs-ltr.patch; + (replaceVars ./set-pyqt-package-dirs-ltr.patch { pyQt5PackageDir = "${py.pkgs.pyqt5}/${py.pkgs.python.sitePackages}"; qsciPackageDir = "${py.pkgs.qscintilla-qt5}/${py.pkgs.python.sitePackages}"; }) diff --git a/pkgs/applications/gis/qgis/unwrapped.nix b/pkgs/applications/gis/qgis/unwrapped.nix index 484b61b9acdaed..4ca9f16c819d16 100644 --- a/pkgs/applications/gis/qgis/unwrapped.nix +++ b/pkgs/applications/gis/qgis/unwrapped.nix @@ -2,7 +2,7 @@ , fetchFromGitHub , makeWrapper , mkDerivation -, substituteAll +, replaceVars , wrapGAppsHook3 , wrapQtAppsHook @@ -141,8 +141,7 @@ in mkDerivation rec { ++ pythonBuildInputs; patches = [ - (substituteAll { - src = ./set-pyqt-package-dirs.patch; + (replaceVars ./set-pyqt-package-dirs.patch { pyQt5PackageDir = "${py.pkgs.pyqt5}/${py.pkgs.python.sitePackages}"; qsciPackageDir = "${py.pkgs.qscintilla-qt5}/${py.pkgs.python.sitePackages}"; }) diff --git a/pkgs/applications/graphics/leocad/default.nix b/pkgs/applications/graphics/leocad/default.nix index 1d9b06f4144bb3..5df01fd9052b9e 100644 --- a/pkgs/applications/graphics/leocad/default.nix +++ b/pkgs/applications/graphics/leocad/default.nix @@ -6,7 +6,7 @@ povray, qmake, qttools, - substituteAll, + replaceVars, zlib, }: @@ -43,8 +43,7 @@ mkDerivation rec { propagatedBuildInputs = [ povray ]; patches = [ - (substituteAll { - src = ./povray.patch; + (replaceVars ./povray.patch { inherit povray; }) ]; diff --git a/pkgs/applications/graphics/qvge/default.nix b/pkgs/applications/graphics/qvge/default.nix index 1ded1a805ca7e9..688f2f0716d662 100644 --- a/pkgs/applications/graphics/qvge/default.nix +++ b/pkgs/applications/graphics/qvge/default.nix @@ -2,7 +2,7 @@ lib, stdenv, fetchFromGitHub, - substituteAll, + replaceVars, wrapQtAppsHook, qmake, qtsvg, @@ -24,8 +24,7 @@ stdenv.mkDerivation rec { sourceRoot = "${src.name}/src"; patches = ( - substituteAll { - src = ./set-graphviz-path.patch; + replaceVars ./set-graphviz-path.patch { inherit graphviz; } ); diff --git a/pkgs/applications/kde/kdenlive/default.nix b/pkgs/applications/kde/kdenlive/default.nix index 95fed3cd35ba91..5aa4c40fef193e 100644 --- a/pkgs/applications/kde/kdenlive/default.nix +++ b/pkgs/applications/kde/kdenlive/default.nix @@ -1,6 +1,6 @@ { mkDerivation, - substituteAll, + replaceVars, lib, extra-cmake-modules, breeze-icons, @@ -89,8 +89,7 @@ mkDerivation { # doesn't find them. See: # https://github.com/NixOS/nixpkgs/issues/83885 patches = [ - (substituteAll { - src = ./dependency-paths.patch; + (replaceVars ./dependency-paths.patch { inherit mediainfo glaxnimate; ffmpeg = ffmpeg-full; mlt = mlt-full; diff --git a/pkgs/applications/misc/dmensamenu/default.nix b/pkgs/applications/misc/dmensamenu/default.nix index 7e20001b44a380..447cb0d3779409 100644 --- a/pkgs/applications/misc/dmensamenu/default.nix +++ b/pkgs/applications/misc/dmensamenu/default.nix @@ -2,7 +2,7 @@ lib, buildPythonApplication, fetchFromGitHub, - substituteAll, + replaceVars, requests, dmenu, }: @@ -19,8 +19,7 @@ buildPythonApplication rec { }; patches = [ - (substituteAll { - src = ./dmenu-path.patch; + (replaceVars ./dmenu-path.patch { inherit dmenu; }) ]; diff --git a/pkgs/applications/misc/inochi2d/default.nix b/pkgs/applications/misc/inochi2d/default.nix index cb17167d513be9..177f3ede6cebcb 100644 --- a/pkgs/applications/misc/inochi2d/default.nix +++ b/pkgs/applications/misc/inochi2d/default.nix @@ -2,7 +2,7 @@ lib, stdenv, fetchFromGitHub, - substituteAll, + replaceVars, callPackage, }: @@ -35,8 +35,7 @@ in patches = [ # Upstream asks that we change the bug tracker URL to not point to the upsteam bug tracker - (substituteAll { - src = ./support-url.patch; + (replaceVars ./support-url.patch { assignees = "TomaSajt"; # should be a comma separated list of the github usernames of the maintainers }) # Change how duplicate locales differentiate themselves (the store paths were too long) diff --git a/pkgs/applications/misc/mysql-workbench/default.nix b/pkgs/applications/misc/mysql-workbench/default.nix index a6705904f78f9e..bc33c7259c4582 100644 --- a/pkgs/applications/misc/mysql-workbench/default.nix +++ b/pkgs/applications/misc/mysql-workbench/default.nix @@ -2,7 +2,7 @@ lib, stdenv, fetchurl, - substituteAll, + replaceVars, cmake, ninja, pkg-config, @@ -57,8 +57,7 @@ stdenv.mkDerivation (finalAttrs: { }; patches = [ - (substituteAll { - src = ./hardcode-paths.patch; + (replaceVars ./hardcode-paths.patch { catchsegv = "${glibc.bin}/bin/catchsegv"; bash = "${bash}/bin/bash"; cp = "${coreutils}/bin/cp"; @@ -74,8 +73,7 @@ stdenv.mkDerivation (finalAttrs: { # Fix swig not being able to find headers # https://github.com/NixOS/nixpkgs/pull/82362#issuecomment-597948461 - (substituteAll { - src = ./fix-swig-build.patch; + (replaceVars ./fix-swig-build.patch { cairoDev = "${cairo.dev}"; }) diff --git a/pkgs/applications/networking/irc/weechat/scripts/multiline/default.nix b/pkgs/applications/networking/irc/weechat/scripts/multiline/default.nix index a54078a15299cb..94d40da39e7dcd 100644 --- a/pkgs/applications/networking/irc/weechat/scripts/multiline/default.nix +++ b/pkgs/applications/networking/irc/weechat/scripts/multiline/default.nix @@ -2,7 +2,7 @@ stdenv, lib, fetchurl, - substituteAll, + replaceVars, PodParser, }: @@ -22,8 +22,7 @@ stdenv.mkDerivation { patches = [ # The script requires a special Perl environment. - (substituteAll { - src = ./libpath.patch; + (replaceVars ./libpath.patch { env = PodParser; }) ]; diff --git a/pkgs/applications/networking/irc/weechat/scripts/wee-slack/default.nix b/pkgs/applications/networking/irc/weechat/scripts/wee-slack/default.nix index a21001ab84f2e0..0bc1513982aa14 100644 --- a/pkgs/applications/networking/irc/weechat/scripts/wee-slack/default.nix +++ b/pkgs/applications/networking/irc/weechat/scripts/wee-slack/default.nix @@ -2,7 +2,7 @@ lib, stdenv, fetchpatch, - substituteAll, + replaceVars, buildEnv, fetchFromGitHub, python3Packages, @@ -20,8 +20,7 @@ stdenv.mkDerivation rec { }; patches = [ - (substituteAll { - src = ./libpath.patch; + (replaceVars ./libpath.patch { env = "${ buildEnv { name = "wee-slack-env"; diff --git a/pkgs/applications/networking/irc/weechat/scripts/weechat-otr/default.nix b/pkgs/applications/networking/irc/weechat/scripts/weechat-otr/default.nix index 717cec1dc34135..e38f4155589887 100644 --- a/pkgs/applications/networking/irc/weechat/scripts/weechat-otr/default.nix +++ b/pkgs/applications/networking/irc/weechat/scripts/weechat-otr/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, - substituteAll, + replaceVars, buildEnv, fetchgit, fetchFromGitHub, @@ -58,8 +58,7 @@ stdenv.mkDerivation rec { }; patches = [ - (substituteAll { - src = ./libpath.patch; + (replaceVars ./libpath.patch { env = "${ buildEnv { name = "weechat-otr-env"; diff --git a/pkgs/applications/networking/mailreaders/evolution/evolution-ews/default.nix b/pkgs/applications/networking/mailreaders/evolution/evolution-ews/default.nix index 93a0eb591f9db6..7bfb6d45ef0d19 100644 --- a/pkgs/applications/networking/mailreaders/evolution/evolution-ews/default.nix +++ b/pkgs/applications/networking/mailreaders/evolution/evolution-ews/default.nix @@ -15,7 +15,7 @@ json-glib, libmspack, webkitgtk_4_1, - substituteAll, + replaceVars, _experimental-update-script-combinators, glib, makeHardcodeGsettingsPatch, @@ -35,8 +35,7 @@ stdenv.mkDerivation rec { # schemas from evolution. evolution-data-server is not wrapped with # evolution's schemas because it would be a circular dependency with # evolution. - (substituteAll { - src = ./hardcode-gsettings.patch; + (replaceVars ./hardcode-gsettings.patch { evo = glib.makeSchemaPath evolution evolution.name; }) ]; diff --git a/pkgs/applications/office/activitywatch/default.nix b/pkgs/applications/office/activitywatch/default.nix index e488363c201287..16cc048d39446c 100644 --- a/pkgs/applications/office/activitywatch/default.nix +++ b/pkgs/applications/office/activitywatch/default.nix @@ -15,7 +15,7 @@ qtbase, qtsvg, xdg-utils, - substituteAll, + replaceVars, buildNpmPackage, }: @@ -188,8 +188,7 @@ rec { patches = [ # Override version string with hardcoded value as it may be outdated upstream. - (substituteAll { - src = ./override-version.patch; + (replaceVars ./override-version.patch { version = sources.rev; }) ]; @@ -234,8 +233,7 @@ rec { patches = [ # Hardcode version to avoid the need to have the Git repo available at build time. - (substituteAll { - src = ./commit-hash.patch; + (replaceVars ./commit-hash.patch { commit_hash = sources.rev; }) ]; diff --git a/pkgs/applications/science/math/caffe/default.nix b/pkgs/applications/science/math/caffe/default.nix index 251245469d7397..a68c48708753c8 100644 --- a/pkgs/applications/science/math/caffe/default.nix +++ b/pkgs/applications/science/math/caffe/default.nix @@ -25,7 +25,7 @@ pythonSupport ? false, python ? null, numpy ? null, - substituteAll, + replaceVars, }: let @@ -130,8 +130,7 @@ stdenv.mkDerivation rec { hash = "sha256-ZegTvp0tTHlopQv+UzHDigs6XLkP2VfqLCWXl6aKJSI="; }) ] - ++ lib.optional pythonSupport (substituteAll { - src = ./python.patch; + ++ lib.optional pythonSupport (replaceVars ./python.patch { inherit (python.sourceVersion) major minor; # Should be changed in case of PyPy }); diff --git a/pkgs/applications/science/misc/cytoscape/default.nix b/pkgs/applications/science/misc/cytoscape/default.nix index 886fb2ef557621..9be37db1b6d00f 100644 --- a/pkgs/applications/science/misc/cytoscape/default.nix +++ b/pkgs/applications/science/misc/cytoscape/default.nix @@ -4,7 +4,7 @@ fetchurl, jre, makeWrapper, - substituteAll, + replaceVars, coreutils, }: @@ -20,8 +20,7 @@ stdenv.mkDerivation rec { patches = [ # By default, gen_vmoptions.sh tries to store custom options in $out/share # at run time. This patch makes sure $HOME is used instead. - (substituteAll { - src = ./gen_vmoptions_to_homedir.patch; + (replaceVars ./gen_vmoptions_to_homedir.patch { inherit coreutils; }) ]; diff --git a/pkgs/applications/virtualization/singularity/generic.nix b/pkgs/applications/virtualization/singularity/generic.nix index 6e0b3944fdd2e0..08c848feb17c6e 100644 --- a/pkgs/applications/virtualization/singularity/generic.nix +++ b/pkgs/applications/virtualization/singularity/generic.nix @@ -25,7 +25,7 @@ in lib, buildGoModule, runCommandLocal, - substituteAll, + replaceVars, # Native build inputs addDriverRunpath, makeWrapper, @@ -109,8 +109,7 @@ in inherit pname version src; patches = lib.optionals (projectName == "apptainer") [ - (substituteAll { - src = ./apptainer/0001-ldCache-patch-for-driverLink.patch; + (replaceVars ./apptainer/0001-ldCache-patch-for-driverLink.patch { inherit (addDriverRunpath) driverLink; }) ]; diff --git a/pkgs/by-name/an/ansible-cmdb/package.nix b/pkgs/by-name/an/ansible-cmdb/package.nix index f23da79053c644..d88ae7ec2f6369 100644 --- a/pkgs/by-name/an/ansible-cmdb/package.nix +++ b/pkgs/by-name/an/ansible-cmdb/package.nix @@ -1,7 +1,7 @@ { lib, fetchFromGitHub, - substituteAll, + replaceVars, python3Packages, testers, ansible-cmdb, @@ -31,8 +31,7 @@ buildPythonApplication { }; patches = [ - (substituteAll { - src = ./setup.patch; + (replaceVars ./setup.patch { inherit version; }) ]; diff --git a/pkgs/by-name/ar/argyllcms/package.nix b/pkgs/by-name/ar/argyllcms/package.nix index 139caabe2cda93..f430676270222f 100644 --- a/pkgs/by-name/ar/argyllcms/package.nix +++ b/pkgs/by-name/ar/argyllcms/package.nix @@ -19,7 +19,7 @@ lib, openssl, buildPackages, - substituteAll, + replaceVars, writeScript, }: @@ -41,8 +41,7 @@ stdenv.mkDerivation rec { patches = lib.optional (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) ( # Build process generates files by compiling and then invoking an executable. - substituteAll { - src = ./jam-cross.patch; + replaceVars ./jam-cross.patch { emulator = stdenv.hostPlatform.emulator buildPackages; } ); diff --git a/pkgs/by-name/au/auto-cpufreq/package.nix b/pkgs/by-name/au/auto-cpufreq/package.nix index 15db7faa4089bb..fe9e2ca49ae82b 100644 --- a/pkgs/by-name/au/auto-cpufreq/package.nix +++ b/pkgs/by-name/au/auto-cpufreq/package.nix @@ -2,7 +2,7 @@ lib, python3Packages, fetchFromGitHub, - substituteAll, + replaceVars, gobject-introspection, wrapGAppsHook3, gtk3, @@ -48,8 +48,7 @@ python3Packages.buildPythonPackage rec { patches = [ # hardcodes version output - (substituteAll { - src = ./fix-version-output.patch; + (replaceVars ./fix-version-output.patch { inherit version; }) diff --git a/pkgs/by-name/ba/bashblog/package.nix b/pkgs/by-name/ba/bashblog/package.nix index 91a34e9b3e70b4..3647eb90e9500c 100644 --- a/pkgs/by-name/ba/bashblog/package.nix +++ b/pkgs/by-name/ba/bashblog/package.nix @@ -3,7 +3,7 @@ lib, fetchFromGitHub, makeWrapper, - substituteAll, + replaceVars, perlPackages, # Flags to enable processors # Currently, Markdown.pl does not work @@ -35,8 +35,7 @@ stdenv.mkDerivation { buildInputs = [ TextMarkdown ] ++ lib.optionals usePandoc [ pandoc ]; patches = [ - (substituteAll { - src = ./0001-Setting-markdown_bin.patch; + (replaceVars ./0001-Setting-markdown_bin.patch { markdown_path = if usePandoc then pandoc_path else markdownpl_path; }) ]; diff --git a/pkgs/by-name/bc/bcache-tools/package.nix b/pkgs/by-name/bc/bcache-tools/package.nix index 795e453e1b4e58..c070b5c10c943a 100644 --- a/pkgs/by-name/bc/bcache-tools/package.nix +++ b/pkgs/by-name/bc/bcache-tools/package.nix @@ -5,7 +5,7 @@ pkg-config, util-linux, bash, - substituteAll, + replaceVars, }: stdenv.mkDerivation rec { @@ -34,8 +34,7 @@ stdenv.mkDerivation rec { ''; patches = [ - (substituteAll { - src = ./bcache-udev-modern.patch; + (replaceVars ./bcache-udev-modern.patch { shell = "${bash}/bin/sh"; }) ./fix-static.patch diff --git a/pkgs/by-name/bo/bonnmotion/package.nix b/pkgs/by-name/bo/bonnmotion/package.nix index 502cd8c70d6931..28011069f553eb 100644 --- a/pkgs/by-name/bo/bonnmotion/package.nix +++ b/pkgs/by-name/bo/bonnmotion/package.nix @@ -2,7 +2,7 @@ stdenv, lib, fetchzip, - substituteAll, + replaceVars, bash, jre, }: @@ -20,8 +20,7 @@ stdenv.mkDerivation rec { # The software has a non-standard install bash script which kind of works. # However, to make it fully functional, the automatically detection of the # program paths must be substituted with full paths. - (substituteAll { - src = ./install.patch; + (replaceVars ./install.patch { inherit bash jre; }) ]; diff --git a/pkgs/by-name/bu/budgie-session/package.nix b/pkgs/by-name/bu/budgie-session/package.nix index 407902d824e70b..7170bf16474cfd 100644 --- a/pkgs/by-name/bu/budgie-session/package.nix +++ b/pkgs/by-name/bu/budgie-session/package.nix @@ -2,7 +2,7 @@ lib, stdenv, fetchFromGitHub, - substituteAll, + replaceVars, meson, ninja, pkg-config, @@ -46,8 +46,7 @@ stdenv.mkDerivation (finalAttrs: { ]; patches = [ - (substituteAll { - src = ./fix-paths.patch; + (replaceVars ./fix-paths.patch { gsettings = lib.getExe' glib "gsettings"; dbusLaunch = lib.getExe' dbus "dbus-launch"; bash = lib.getExe bash; diff --git a/pkgs/by-name/ca/cargo-benchcmp/package.nix b/pkgs/by-name/ca/cargo-benchcmp/package.nix index cbb86ed458e631..d889310df580af 100644 --- a/pkgs/by-name/ca/cargo-benchcmp/package.nix +++ b/pkgs/by-name/ca/cargo-benchcmp/package.nix @@ -2,7 +2,7 @@ lib, rustPlatform, fetchFromGitHub, - substituteAll, + replaceVars, stdenv, }: @@ -21,8 +21,7 @@ rustPlatform.buildRustPackage rec { patches = [ # patch the binary path so tests can find the binary when `--target` is present - (substituteAll { - src = ./fix-test-binary-path.patch; + (replaceVars ./fix-test-binary-path.patch { shortTarget = stdenv.hostPlatform.rust.rustcTarget; }) ]; diff --git a/pkgs/by-name/ch/chawan/package.nix b/pkgs/by-name/ch/chawan/package.nix index 35808fae238820..77abe682cf8ba3 100644 --- a/pkgs/by-name/ch/chawan/package.nix +++ b/pkgs/by-name/ch/chawan/package.nix @@ -11,7 +11,7 @@ , zlib , unstableGitUpdater , libseccomp -, substituteAll +, replaceVars }: stdenv.mkDerivation { @@ -28,8 +28,7 @@ stdenv.mkDerivation { patches = [ # Include chawan's man pages in mancha's search path - (substituteAll { - src = ./mancha-augment-path.diff; + (replaceVars ./mancha-augment-path.diff { out = placeholder "out"; }) ]; diff --git a/pkgs/by-name/cj/cjdns/package.nix b/pkgs/by-name/cj/cjdns/package.nix index 9d4bd485c7994e..b08ab4d6bb857d 100644 --- a/pkgs/by-name/cj/cjdns/package.nix +++ b/pkgs/by-name/cj/cjdns/package.nix @@ -11,7 +11,7 @@ nixosTests, libsodium, pkg-config, - substituteAll, + replaceVars, }: rustPlatform.buildRustPackage rec { @@ -26,8 +26,7 @@ rustPlatform.buildRustPackage rec { }; patches = [ - (substituteAll { - src = ./system-libsodium.patch; + (replaceVars ./system-libsodium.patch { libsodium_include_dir = "${libsodium.dev}/include"; }) ]; diff --git a/pkgs/by-name/co/cosmopolitan/package.nix b/pkgs/by-name/co/cosmopolitan/package.nix index f38c2778ba4e65..fd8821dd8a1a70 100644 --- a/pkgs/by-name/co/cosmopolitan/package.nix +++ b/pkgs/by-name/co/cosmopolitan/package.nix @@ -5,7 +5,7 @@ bintools-unwrapped, callPackage, coreutils, - substituteAll, + replaceVars, unzip, }: @@ -22,8 +22,7 @@ stdenv.mkDerivation (finalAttrs: { patches = [ # make sure tests set PATH correctly - (substituteAll { - src = ./fix-paths.patch; + (replaceVars ./fix-paths.patch { inherit coreutils; }) ]; diff --git a/pkgs/by-name/cu/curseradio/package.nix b/pkgs/by-name/cu/curseradio/package.nix index ef38287b2d328b..431d600830ca70 100644 --- a/pkgs/by-name/cu/curseradio/package.nix +++ b/pkgs/by-name/cu/curseradio/package.nix @@ -1,7 +1,7 @@ { lib, fetchFromGitHub, - substituteAll, + replaceVars, python3Packages, mpv, }: @@ -24,8 +24,7 @@ python3Packages.buildPythonApplication rec { ]; patches = [ - (substituteAll { - src = ./mpv.patch; + (replaceVars ./mpv.patch { inherit mpv; }) ]; diff --git a/pkgs/by-name/da/davfs2/package.nix b/pkgs/by-name/da/davfs2/package.nix index 529d963af30413..606659c0f46749 100644 --- a/pkgs/by-name/da/davfs2/package.nix +++ b/pkgs/by-name/da/davfs2/package.nix @@ -3,7 +3,7 @@ , autoreconfHook , neon , procps -, substituteAll +, replaceVars , zlib , wrapperDir ? "/run/wrappers/bin" }: @@ -28,12 +28,10 @@ stdenv.mkDerivation (finalAttrs: { patches = [ ./fix-sysconfdir.patch ./disable-suid.patch - (substituteAll { - src = ./0001-umount_davfs-substitute-ps-command.patch; + (replaceVars ./0001-umount_davfs-substitute-ps-command.patch { ps = "${procps}/bin/ps"; }) - (substituteAll { - src = ./0002-Make-sure-that-the-setuid-wrapped-umount-is-invoked.patch; + (replaceVars ./0002-Make-sure-that-the-setuid-wrapped-umount-is-invoked.patch { inherit wrapperDir; }) ]; diff --git a/pkgs/by-name/dc/dcm2niix/package.nix b/pkgs/by-name/dc/dcm2niix/package.nix index 5d73f8d5b46039..58f46098e6a0d0 100644 --- a/pkgs/by-name/dc/dcm2niix/package.nix +++ b/pkgs/by-name/dc/dcm2niix/package.nix @@ -2,7 +2,7 @@ lib, stdenv, fetchFromGitHub, - substituteAll, + replaceVars, cmake, openjpeg, yaml-cpp, @@ -34,8 +34,7 @@ stdenv.mkDerivation (finalAttrs: { }; patches = lib.optionals withCloudflareZlib [ - (substituteAll { - src = ./dont-fetch-external-libs.patch; + (replaceVars ./dont-fetch-external-libs.patch { inherit cloudflareZlib; }) ]; diff --git a/pkgs/by-name/de/deja-dup/package.nix b/pkgs/by-name/de/deja-dup/package.nix index 274920e92d1a90..607b4ec144f8f9 100644 --- a/pkgs/by-name/de/deja-dup/package.nix +++ b/pkgs/by-name/de/deja-dup/package.nix @@ -2,7 +2,7 @@ lib, stdenv, fetchFromGitLab, - substituteAll, + replaceVars, meson, ninja, pkg-config, @@ -36,8 +36,7 @@ stdenv.mkDerivation (finalAttrs: { }; patches = [ - (substituteAll { - src = ./fix-paths.patch; + (replaceVars ./fix-paths.patch { inherit coreutils; }) ]; diff --git a/pkgs/by-name/el/elvish/tests/expect-version.nix b/pkgs/by-name/el/elvish/tests/expect-version.nix index 123b94e3cbd026..ee9b8ed3969ca8 100644 --- a/pkgs/by-name/el/elvish/tests/expect-version.nix +++ b/pkgs/by-name/el/elvish/tests/expect-version.nix @@ -1,7 +1,7 @@ { stdenv, elvish, - substituteAll, + replaceVars, }: stdenv.mkDerivation { @@ -14,8 +14,7 @@ stdenv.mkDerivation { buildCommand = '' elvish ${ - substituteAll { - src = ./expect-version.elv; + replaceVars ./expect-version.elv { inherit (elvish) version; } } diff --git a/pkgs/by-name/eq/equibop/package.nix b/pkgs/by-name/eq/equibop/package.nix index dffa1bab8f7124..ca8b45fed41363 100644 --- a/pkgs/by-name/eq/equibop/package.nix +++ b/pkgs/by-name/eq/equibop/package.nix @@ -2,7 +2,7 @@ lib, stdenv, fetchFromGitHub, - substituteAll, + replaceVars, makeWrapper, makeDesktopItem, copyDesktopItems, @@ -64,9 +64,8 @@ stdenv.mkDerivation (finalAttrs: { patches = [ ./disable_update_checking.patch ] - ++ lib.optional withSystemEquicord (substituteAll { + ++ lib.optional withSystemEquicord (replaceVars ./use_system_equicord.patch { inherit equicord; - src = ./use_system_equicord.patch; }); env = { diff --git a/pkgs/by-name/fe/febio/package.nix b/pkgs/by-name/fe/febio/package.nix index 96657c506c0f14..698b0d81ea803d 100644 --- a/pkgs/by-name/fe/febio/package.nix +++ b/pkgs/by-name/fe/febio/package.nix @@ -3,7 +3,7 @@ stdenv, fetchFromGitHub, fetchpatch2, - substituteAll, + replaceVars, apple-sdk_11, cmake, darwinMinVersionHook, @@ -26,8 +26,7 @@ stdenv.mkDerivation (finalAttrs: { patches = [ # Fix library searching and installation - (substituteAll { - src = ./fix-cmake.patch; + (replaceVars ./fix-cmake.patch { so = stdenv.hostPlatform.extensions.sharedLibrary; }) diff --git a/pkgs/by-name/fl/flottbot/package.nix b/pkgs/by-name/fl/flottbot/package.nix index 0242d8f144823a..3257c2a421acb5 100644 --- a/pkgs/by-name/fl/flottbot/package.nix +++ b/pkgs/by-name/fl/flottbot/package.nix @@ -3,7 +3,7 @@ buildGoModule, fetchFromGitHub, nix-update-script, - substituteAll, + replaceVars, }: buildGoModule rec { pname = "flottbot"; @@ -18,8 +18,7 @@ buildGoModule rec { patches = [ # patch out debug.ReadBuidlInfo since version information is not available with buildGoModule - (substituteAll { - src = ./version.patch; + (replaceVars ./version.patch { version = version; vcsHash = version; # Maybe there is a way to get the git ref from src? idk. }) diff --git a/pkgs/by-name/fx/fxlinuxprintutil/package.nix b/pkgs/by-name/fx/fxlinuxprintutil/package.nix index 7d3ddd08ac6e88..f95b39c153e50e 100644 --- a/pkgs/by-name/fx/fxlinuxprintutil/package.nix +++ b/pkgs/by-name/fx/fxlinuxprintutil/package.nix @@ -2,7 +2,7 @@ stdenv, lib, fetchzip, - substituteAll, + replaceVars, dpkg, autoPatchelfHook, cups, @@ -41,8 +41,7 @@ stdenv.mkDerivation rec { # replaces the code that looks for X11’s locale.alias in /usr/share/X11/locale or # /usr/lib/X11/locale with /nix/store/libX11/share/X11/locale - (substituteAll { - src = ./fxlocalechk.tcl.patch; + (replaceVars ./fxlocalechk.tcl.patch { inherit (xorg) libX11; }) ]; diff --git a/pkgs/by-name/ga/gammu/package.nix b/pkgs/by-name/ga/gammu/package.nix index 95e28f821cd977..2ee0061850b969 100644 --- a/pkgs/by-name/ga/gammu/package.nix +++ b/pkgs/by-name/ga/gammu/package.nix @@ -2,7 +2,7 @@ lib, stdenv, fetchFromGitHub, - substituteAll, + replaceVars, pkg-config, cmake, bluez, @@ -34,8 +34,7 @@ stdenv.mkDerivation rec { patches = [ ./bashcomp-dir.patch ./systemd.patch - (substituteAll { - src = ./gammu-config-dialog.patch; + (replaceVars ./gammu-config-dialog.patch { dialog = "${dialog}/bin/dialog"; }) ]; diff --git a/pkgs/by-name/gl/glycin-loaders/package.nix b/pkgs/by-name/gl/glycin-loaders/package.nix index 76a9800952c683..6977f71a8b5542 100644 --- a/pkgs/by-name/gl/glycin-loaders/package.nix +++ b/pkgs/by-name/gl/glycin-loaders/package.nix @@ -2,7 +2,7 @@ stdenv, lib, fetchurl, - substituteAll, + replaceVars, bubblewrap, cairo, cargo, @@ -70,8 +70,7 @@ stdenv.mkDerivation (finalAttrs: { packageName = "glycin"; }; - glycinPathsPatch = substituteAll { - src = ./fix-glycin-paths.patch; + glycinPathsPatch = replaceVars ./fix-glycin-paths.patch { bwrap = "${bubblewrap}/bin/bwrap"; }; }; diff --git a/pkgs/by-name/go/govulncheck/package.nix b/pkgs/by-name/go/govulncheck/package.nix index a7d0b88eca40a6..b5cd36afea4b41 100644 --- a/pkgs/by-name/go/govulncheck/package.nix +++ b/pkgs/by-name/go/govulncheck/package.nix @@ -2,7 +2,7 @@ lib, buildGoModule, fetchFromGitHub, - substituteAll, + replaceVars, }: buildGoModule rec { @@ -18,8 +18,7 @@ buildGoModule rec { patches = [ # patch in version information - (substituteAll { - src = ./version.patch; + (replaceVars ./version.patch { inherit version; }) ]; diff --git a/pkgs/by-name/gr/grilo-plugins/package.nix b/pkgs/by-name/gr/grilo-plugins/package.nix index d2837d186a0526..873886d9504102 100644 --- a/pkgs/by-name/gr/grilo-plugins/package.nix +++ b/pkgs/by-name/gr/grilo-plugins/package.nix @@ -2,7 +2,7 @@ lib, stdenv, fetchurl, - substituteAll, + replaceVars, meson, ninja, pkg-config, @@ -45,8 +45,7 @@ stdenv.mkDerivation rec { # * fakesink (gstreamer) # * playbin (gst-plugins-base) # * chromaprint (gst-plugins-bad) - (substituteAll { - src = ./chromaprint-gst-plugins.patch; + (replaceVars ./chromaprint-gst-plugins.patch { load_plugins = lib.concatMapStrings (plugin: ''gst_registry_scan_path(gst_registry_get(), "${lib.getLib plugin}/lib/gstreamer-1.0");'') diff --git a/pkgs/by-name/hp/hplip/package.nix b/pkgs/by-name/hp/hplip/package.nix index d5d7e1cc99b30c..e1b96e2f233bda 100644 --- a/pkgs/by-name/hp/hplip/package.nix +++ b/pkgs/by-name/hp/hplip/package.nix @@ -2,7 +2,7 @@ lib, stdenv, fetchurl, - substituteAll, + replaceVars, pkg-config, autoreconfHook, gobject-introspection, @@ -47,9 +47,8 @@ let hash = "sha256-Hzxr3SVmGoouGBU2VdbwbwKMHZwwjWnI7P13Z6LQxao="; }; - hplipState = substituteAll { + hplipState = replaceVars ./hplip.state { inherit version; - src = ./hplip.state; }; hplipPlatforms = { diff --git a/pkgs/by-name/hy/hypnotix/package.nix b/pkgs/by-name/hy/hypnotix/package.nix index a9f8c306bf4a21..67e04b4e8ddb77 100644 --- a/pkgs/by-name/hy/hypnotix/package.nix +++ b/pkgs/by-name/hy/hypnotix/package.nix @@ -2,7 +2,7 @@ lib, stdenv, fetchFromGitHub, - substituteAll, + replaceVars, xapp, circle-flags, gettext, @@ -25,8 +25,7 @@ stdenv.mkDerivation rec { }; patches = [ - (substituteAll { - src = ./libmpv-path.patch; + (replaceVars ./libmpv-path.patch { libmpv = "${lib.getLib mpv}/lib/libmpv${stdenv.hostPlatform.extensions.sharedLibrary}"; }) ]; diff --git a/pkgs/by-name/ka/kazam/package.nix b/pkgs/by-name/ka/kazam/package.nix index f887b39f2d2e39..ad4c7a7dcc4d1e 100644 --- a/pkgs/by-name/ka/kazam/package.nix +++ b/pkgs/by-name/ka/kazam/package.nix @@ -1,7 +1,7 @@ { lib, fetchFromGitHub, - substituteAll, + replaceVars, python3Packages, gst_all_1, wrapGAppsHook3, @@ -54,8 +54,7 @@ python3Packages.buildPythonApplication rec { patches = [ # Fix paths - (substituteAll { - src = ./fix-paths.patch; + (replaceVars ./fix-paths.patch { libcanberra = libcanberra-gtk3; inherit libpulseaudio; }) diff --git a/pkgs/by-name/li/libelfin/package.nix b/pkgs/by-name/li/libelfin/package.nix index 663b5c3dd7f0fb..a76808dede96eb 100644 --- a/pkgs/by-name/li/libelfin/package.nix +++ b/pkgs/by-name/li/libelfin/package.nix @@ -3,7 +3,7 @@ stdenv, fetchFromGitHub, python3, - substituteAll, + replaceVars, }: stdenv.mkDerivation rec { @@ -18,8 +18,7 @@ stdenv.mkDerivation rec { }; patches = [ - (substituteAll { - src = ./0001-Don-t-detect-package-version-with-Git.patch; + (replaceVars ./0001-Don-t-detect-package-version-with-Git.patch { inherit version; }) ]; diff --git a/pkgs/by-name/li/libpam-wrapper/package.nix b/pkgs/by-name/li/libpam-wrapper/package.nix index 6ea6229f4ddac8..0dba2ed3253923 100644 --- a/pkgs/by-name/li/libpam-wrapper/package.nix +++ b/pkgs/by-name/li/libpam-wrapper/package.nix @@ -4,7 +4,7 @@ fetchgit, cmake, linux-pam, - substituteAll, + replaceVars, enablePython ? false, python ? null, }: @@ -22,8 +22,7 @@ stdenv.mkDerivation rec { }; patches = [ - (substituteAll { - src = ./python.patch; + (replaceVars ./python.patch { siteDir = lib.optionalString enablePython python.sitePackages; includeDir = lib.optionalString enablePython "include/${python.libPrefix}"; }) diff --git a/pkgs/by-name/li/librum/package.nix b/pkgs/by-name/li/librum/package.nix index 5e2844ed73cb01..821c9da8396a0b 100644 --- a/pkgs/by-name/li/librum/package.nix +++ b/pkgs/by-name/li/librum/package.nix @@ -3,7 +3,7 @@ mupdf, stdenv, fetchFromGitHub, - substituteAll, + replaceVars, cmake, qt6, desktopToDarwinBundle, @@ -25,8 +25,7 @@ stdenv.mkDerivation rec { }; patches = [ - (substituteAll { - src = ./use_mupdf_in_nixpkgs.patch; + (replaceVars ./use_mupdf_in_nixpkgs.patch { nixMupdfLibPath = "${mupdf-cxx.out}/lib"; nixMupdfIncludePath = "${mupdf-cxx.dev}/include"; }) diff --git a/pkgs/by-name/li/libvpl/package.nix b/pkgs/by-name/li/libvpl/package.nix index 61b4d79b8cfc6a..695f7ab3d49f8c 100644 --- a/pkgs/by-name/li/libvpl/package.nix +++ b/pkgs/by-name/li/libvpl/package.nix @@ -4,7 +4,7 @@ fetchFromGitHub, cmake, pkg-config, - substituteAll, + replaceVars, addDriverRunpath, }: @@ -29,8 +29,7 @@ stdenv.mkDerivation (finalAttrs: { ]; patches = [ - (substituteAll { - src = ./opengl-driver-lib.patch; + (replaceVars ./opengl-driver-lib.patch { inherit (addDriverRunpath) driverLink; }) ]; diff --git a/pkgs/by-name/li/likwid/package.nix b/pkgs/by-name/li/likwid/package.nix index 8a8a492fa0f46e..2740133001162d 100644 --- a/pkgs/by-name/li/likwid/package.nix +++ b/pkgs/by-name/li/likwid/package.nix @@ -2,7 +2,7 @@ , stdenv , fetchurl , perl -, substituteAll +, replaceVars , coreutils , gnugrep }: @@ -22,8 +22,7 @@ stdenv.mkDerivation rec { patches = [ ./nosetuid.patch - (substituteAll { - src = ./cat-grep-sort-wc.patch; + (replaceVars ./cat-grep-sort-wc.patch { coreutils = "${coreutils}/bin/"; gnugrep = "${gnugrep}/bin/"; }) diff --git a/pkgs/by-name/lu/luaformatter/package.nix b/pkgs/by-name/lu/luaformatter/package.nix index eedf1868adb64a..ca98f83dc73483 100644 --- a/pkgs/by-name/lu/luaformatter/package.nix +++ b/pkgs/by-name/lu/luaformatter/package.nix @@ -2,7 +2,7 @@ lib, stdenv, fetchFromGitHub, - substituteAll, + replaceVars, antlr4_9, libargs, catch2, @@ -24,8 +24,7 @@ stdenv.mkDerivation rec { }; patches = [ - (substituteAll { - src = ./fix-lib-paths.patch; + (replaceVars ./fix-lib-paths.patch { antlr4RuntimeCpp = antlr4.runtime.cpp.dev; yamlCpp = yaml-cpp; inherit libargs catch2; diff --git a/pkgs/by-name/ne/networkmanager-fortisslvpn/package.nix b/pkgs/by-name/ne/networkmanager-fortisslvpn/package.nix index 7e927c650cdd6e..c7bd34d4ee4eed 100644 --- a/pkgs/by-name/ne/networkmanager-fortisslvpn/package.nix +++ b/pkgs/by-name/ne/networkmanager-fortisslvpn/package.nix @@ -1,7 +1,7 @@ { stdenv , lib , fetchurl -, substituteAll +, replaceVars , openfortivpn , autoreconfHook , gettext @@ -30,8 +30,7 @@ stdenv.mkDerivation rec { }; patches = [ - (substituteAll { - src = ./fix-paths.patch; + (replaceVars ./fix-paths.patch { inherit openfortivpn; }) ./support-ppp-2.5.0.patch diff --git a/pkgs/by-name/ne/networkmanager-iodine/package.nix b/pkgs/by-name/ne/networkmanager-iodine/package.nix index c1fea9dcb77d88..c26a0ddfe9a91d 100644 --- a/pkgs/by-name/ne/networkmanager-iodine/package.nix +++ b/pkgs/by-name/ne/networkmanager-iodine/package.nix @@ -2,7 +2,7 @@ lib, stdenv, fetchFromGitLab, - substituteAll, + replaceVars, autoreconfHook, iodine, intltool, @@ -29,8 +29,7 @@ stdenv.mkDerivation { }; patches = [ - (substituteAll { - src = ./fix-paths.patch; + (replaceVars ./fix-paths.patch { inherit iodine; }) ]; diff --git a/pkgs/by-name/ne/networkmanager-l2tp/package.nix b/pkgs/by-name/ne/networkmanager-l2tp/package.nix index d44ae6a3209051..f0b9698fa65e88 100644 --- a/pkgs/by-name/ne/networkmanager-l2tp/package.nix +++ b/pkgs/by-name/ne/networkmanager-l2tp/package.nix @@ -1,7 +1,7 @@ { stdenv, lib, - substituteAll, + replaceVars, fetchFromGitHub, autoreconfHook, pkg-config, @@ -33,8 +33,7 @@ stdenv.mkDerivation rec { }; patches = [ - (substituteAll { - src = ./fix-paths.patch; + (replaceVars ./fix-paths.patch { inherit strongswan xl2tpd; }) ]; diff --git a/pkgs/by-name/ne/networkmanager-openconnect/package.nix b/pkgs/by-name/ne/networkmanager-openconnect/package.nix index 0e2a199d5c3a14..c33ba6644f90fc 100644 --- a/pkgs/by-name/ne/networkmanager-openconnect/package.nix +++ b/pkgs/by-name/ne/networkmanager-openconnect/package.nix @@ -2,7 +2,7 @@ stdenv, lib, fetchurl, - substituteAll, + replaceVars, glib, libxml2, openconnect, @@ -32,8 +32,7 @@ stdenv.mkDerivation rec { }; patches = [ - (substituteAll { - src = ./fix-paths.patch; + (replaceVars ./fix-paths.patch { inherit kmod openconnect; }) ]; diff --git a/pkgs/by-name/ne/networkmanager-openvpn/package.nix b/pkgs/by-name/ne/networkmanager-openvpn/package.nix index a7d7aa0732a0eb..964a51ddab9716 100644 --- a/pkgs/by-name/ne/networkmanager-openvpn/package.nix +++ b/pkgs/by-name/ne/networkmanager-openvpn/package.nix @@ -2,7 +2,7 @@ stdenv, lib, fetchurl, - substituteAll, + replaceVars, openvpn, gettext, libxml2, @@ -30,8 +30,7 @@ stdenv.mkDerivation (finalAttrs: { }; patches = [ - (substituteAll { - src = ./fix-paths.patch; + (replaceVars ./fix-paths.patch { inherit kmod openvpn; }) ]; diff --git a/pkgs/by-name/ne/networkmanager-vpnc/package.nix b/pkgs/by-name/ne/networkmanager-vpnc/package.nix index aa88991517530a..52f47d871199c4 100644 --- a/pkgs/by-name/ne/networkmanager-vpnc/package.nix +++ b/pkgs/by-name/ne/networkmanager-vpnc/package.nix @@ -1,7 +1,7 @@ { stdenv , lib , fetchurl -, substituteAll +, replaceVars , vpnc , pkg-config , networkmanager @@ -27,8 +27,7 @@ stdenv.mkDerivation rec { }; patches = [ - (substituteAll { - src = ./fix-paths.patch; + (replaceVars ./fix-paths.patch { inherit vpnc kmod; }) ]; diff --git a/pkgs/by-name/ni/nitter/package.nix b/pkgs/by-name/ni/nitter/package.nix index 0ff628f39416ed..d03f1e00641375 100644 --- a/pkgs/by-name/ni/nitter/package.nix +++ b/pkgs/by-name/ni/nitter/package.nix @@ -3,7 +3,7 @@ buildNimPackage, fetchFromGitHub, nixosTests, - substituteAll, + replaceVars, unstableGitUpdater, }: @@ -22,8 +22,7 @@ buildNimPackage ( lockFile = ./lock.json; patches = [ - (substituteAll { - src = ./nitter-version.patch; + (replaceVars ./nitter-version.patch { inherit (finalAttrs) version; inherit (finalAttrs.src) rev; url = builtins.replaceStrings [ "archive" ".tar.gz" ] [ "commit" "" ] finalAttrs.src.url; diff --git a/pkgs/by-name/no/novnc/package.nix b/pkgs/by-name/no/novnc/package.nix index cf5bf023ad9080..d46b03f8080a5e 100644 --- a/pkgs/by-name/no/novnc/package.nix +++ b/pkgs/by-name/no/novnc/package.nix @@ -2,7 +2,7 @@ lib, python3, stdenv, - substituteAll, + replaceVars, fetchFromGitHub, }: @@ -20,8 +20,7 @@ stdenv.mkDerivation rec { patches = with python3.pkgs; [ - (substituteAll { - src = ./websockify.patch; + (replaceVars ./websockify.patch { inherit websockify; }) ] diff --git a/pkgs/by-name/on/onionshare-gui/package.nix b/pkgs/by-name/on/onionshare-gui/package.nix index 85c3527522b0b9..7ec4761844a6c0 100644 --- a/pkgs/by-name/on/onionshare-gui/package.nix +++ b/pkgs/by-name/on/onionshare-gui/package.nix @@ -1,7 +1,7 @@ { python3Packages, onionshare, - substituteAll, + replaceVars, meek, obfs4, snowflake, @@ -23,8 +23,7 @@ python3Packages.buildPythonApplication rec { patches = [ # hardcode store paths of dependencies - (substituteAll { - src = ./fix-paths-gui.patch; + (replaceVars ./fix-paths-gui.patch { inherit meek obfs4 diff --git a/pkgs/by-name/on/onionshare/package.nix b/pkgs/by-name/on/onionshare/package.nix index 4b36c4ca5f011a..463bc38e02246e 100644 --- a/pkgs/by-name/on/onionshare/package.nix +++ b/pkgs/by-name/on/onionshare/package.nix @@ -5,7 +5,7 @@ fetchFromGitHub, # patches - substituteAll, + replaceVars, meek, obfs4, snowflake, @@ -32,8 +32,7 @@ python3Packages.buildPythonApplication rec { patches = [ # hardcode store paths of dependencies - (substituteAll { - src = ./fix-paths.patch; + (replaceVars ./fix-paths.patch { inherit meek obfs4 diff --git a/pkgs/by-name/or/org-stats/package.nix b/pkgs/by-name/or/org-stats/package.nix index f5699e2728d30f..297c76095bfa7e 100644 --- a/pkgs/by-name/or/org-stats/package.nix +++ b/pkgs/by-name/or/org-stats/package.nix @@ -2,7 +2,7 @@ lib, buildGoModule, fetchFromGitHub, - substituteAll, + replaceVars, installShellFiles, testers, org-stats, @@ -24,8 +24,7 @@ buildGoModule rec { patches = [ # patch in version information # since `debug.ReadBuildInfo` does not work with `go build - (substituteAll { - src = ./version.patch; + (replaceVars ./version.patch { inherit version; }) ]; diff --git a/pkgs/by-name/pa/passage/package.nix b/pkgs/by-name/pa/passage/package.nix index ac1b68a9d98378..42c44cea979a82 100644 --- a/pkgs/by-name/pa/passage/package.nix +++ b/pkgs/by-name/pa/passage/package.nix @@ -3,7 +3,7 @@ stdenv, fetchFromGitHub, makeBinaryWrapper, - substituteAll, + replaceVars, age, getopt, coreutils, @@ -31,8 +31,7 @@ stdenv.mkDerivation (finalAttrs: { }; patches = [ - (substituteAll { - src = ./darwin-getopt-path.patch; + (replaceVars ./darwin-getopt-path.patch { inherit getopt; }) ]; diff --git a/pkgs/by-name/pi/pika-backup/package.nix b/pkgs/by-name/pi/pika-backup/package.nix index 41644b5dcee779..c12fa42c692b7e 100644 --- a/pkgs/by-name/pi/pika-backup/package.nix +++ b/pkgs/by-name/pi/pika-backup/package.nix @@ -3,7 +3,7 @@ stdenv, fetchFromGitLab, rustPlatform, - substituteAll, + replaceVars, cargo, desktop-file-utils, git, @@ -39,8 +39,7 @@ stdenv.mkDerivation rec { }; patches = [ - (substituteAll { - src = ./borg-path.patch; + (replaceVars ./borg-path.patch { borg = lib.getExe borgbackup; }) ]; diff --git a/pkgs/by-name/r1/r128gain/package.nix b/pkgs/by-name/r1/r128gain/package.nix index e63664594568a3..63b7d312d5bd81 100644 --- a/pkgs/by-name/r1/r128gain/package.nix +++ b/pkgs/by-name/r1/r128gain/package.nix @@ -2,7 +2,7 @@ lib, fetchFromGitHub, gitUpdater, - substituteAll, + replaceVars, ffmpeg, python3Packages, sox, @@ -20,8 +20,7 @@ python3Packages.buildPythonApplication rec { }; patches = [ - (substituteAll { - src = ./ffmpeg-location.patch; + (replaceVars ./ffmpeg-location.patch { inherit ffmpeg; }) ]; diff --git a/pkgs/by-name/rt/rtfm/package.nix b/pkgs/by-name/rt/rtfm/package.nix index d097bf8f249947..3bf066ff18f0ee 100644 --- a/pkgs/by-name/rt/rtfm/package.nix +++ b/pkgs/by-name/rt/rtfm/package.nix @@ -11,7 +11,7 @@ libadwaita, gtk4, pango, - substituteAll, + replaceVars, }: let gtk4' = gtk4.override { x11Support = true; }; @@ -33,8 +33,7 @@ crystal.buildCrystalPackage rec { # 1) fixed gi-crystal binding generator command # 2) fixed docset generator command # 3) added commands to build gschemas and update icon-cache - (substituteAll { - src = ./make.patch; + (replaceVars ./make.patch { inherit crystal; }) # added chmod +w for copied docs to prevent error: diff --git a/pkgs/by-name/sc/scanservjs/package.nix b/pkgs/by-name/sc/scanservjs/package.nix index ccacd814a569a6..e320392d2f7f44 100644 --- a/pkgs/by-name/sc/scanservjs/package.nix +++ b/pkgs/by-name/sc/scanservjs/package.nix @@ -4,7 +4,7 @@ buildNpmPackage, fetchNpmDeps, nodejs, - substituteAll, + replaceVars, }: let @@ -66,8 +66,7 @@ buildNpmPackage { preBuild = '' chmod +w /build/source patch -p3 <${ - substituteAll { - src = ./decouple-from-source-tree.patch; + replaceVars ./decouple-from-source-tree.patch { inherit client; } } diff --git a/pkgs/by-name/sh/shotcut/package.nix b/pkgs/by-name/sh/shotcut/package.nix index a3746c8edc1fdd..a33b5a6b323ab3 100644 --- a/pkgs/by-name/sh/shotcut/package.nix +++ b/pkgs/by-name/sh/shotcut/package.nix @@ -2,7 +2,7 @@ lib, fetchFromGitHub, stdenv, - substituteAll, + replaceVars, SDL2, frei0r, ladspaPlugins, @@ -53,9 +53,8 @@ stdenv.mkDerivation (finalAttrs: { cmakeFlags = [ "-DSHOTCUT_VERSION=${finalAttrs.version}" ]; patches = [ - (substituteAll { + (replaceVars ./fix-mlt-ffmpeg-path.patch { inherit mlt ffmpeg; - src = ./fix-mlt-ffmpeg-path.patch; }) ]; diff --git a/pkgs/by-name/si/sing-geosite/package.nix b/pkgs/by-name/si/sing-geosite/package.nix index cedbdf3cd49004..f8be5c3357c1c6 100644 --- a/pkgs/by-name/si/sing-geosite/package.nix +++ b/pkgs/by-name/si/sing-geosite/package.nix @@ -2,13 +2,12 @@ lib, buildGoModule, fetchFromGitHub, - substituteAll, + replaceVars, v2ray-domain-list-community, }: let - patch = substituteAll { - src = ./main.go; + patch = replaceVars ./main.go { geosite_data = "${v2ray-domain-list-community}/share/v2ray/geosite.dat"; }; in diff --git a/pkgs/by-name/si/siyuan/package.nix b/pkgs/by-name/si/siyuan/package.nix index 544de347498c1a..154545960f56a9 100644 --- a/pkgs/by-name/si/siyuan/package.nix +++ b/pkgs/by-name/si/siyuan/package.nix @@ -3,7 +3,7 @@ stdenv, fetchFromGitHub, buildGo123Module, - substituteAll, + replaceVars, pandoc, nodejs, pnpm_9, @@ -51,8 +51,7 @@ stdenv.mkDerivation (finalAttrs: { vendorHash = "sha256-uK++FoWCoeb05TyUhh0PK+wkTmzTko0K7oLodoGAWt8="; patches = [ - (substituteAll { - src = ./set-pandoc-path.patch; + (replaceVars ./set-pandoc-path.patch { pandoc_path = lib.getExe pandoc; }) ]; diff --git a/pkgs/by-name/st/static-server/package.nix b/pkgs/by-name/st/static-server/package.nix index 443d6b9c71704c..57527d9e3c2c5c 100644 --- a/pkgs/by-name/st/static-server/package.nix +++ b/pkgs/by-name/st/static-server/package.nix @@ -6,7 +6,7 @@ stdenv, testers, static-server, - substituteAll, + replaceVars, }: buildGoModule rec { @@ -24,8 +24,7 @@ buildGoModule rec { patches = [ # patch out debug.ReadBuidlInfo since version information is not available with buildGoModule - (substituteAll { - src = ./version.patch; + (replaceVars ./version.patch { inherit version; }) ]; diff --git a/pkgs/by-name/st/stumpish/package.nix b/pkgs/by-name/st/stumpish/package.nix index a7bfd38c07a860..519d02ea597aca 100644 --- a/pkgs/by-name/st/stumpish/package.nix +++ b/pkgs/by-name/st/stumpish/package.nix @@ -1,7 +1,7 @@ { lib, stdenv, - substituteAll, + replaceVars, fetchFromGitHub, gnused, ncurses, @@ -28,8 +28,7 @@ stdenv.mkDerivation { ]; patches = [ - (substituteAll { - src = ./paths.patch; + (replaceVars ./paths.patch { sed = "${gnused}/bin/sed"; xprop = "${xorg.xprop}/bin/xprop"; rlwrap = "${rlwrap}/bin/rlwrap"; diff --git a/pkgs/by-name/te/teavpn2/package.nix b/pkgs/by-name/te/teavpn2/package.nix index 7b2e3060d2886a..98c35cc2fcbac0 100644 --- a/pkgs/by-name/te/teavpn2/package.nix +++ b/pkgs/by-name/te/teavpn2/package.nix @@ -2,7 +2,7 @@ lib, stdenv, fetchFromGitHub, - substituteAll, + replaceVars, iproute2, }: stdenv.mkDerivation { @@ -17,8 +17,7 @@ stdenv.mkDerivation { }; patches = [ - (substituteAll { - src = ./nix.patch; + (replaceVars ./nix.patch { inherit iproute2; }) ]; diff --git a/pkgs/by-name/ty/typescript-language-server/package.nix b/pkgs/by-name/ty/typescript-language-server/package.nix index 29265f3931a1f3..480abfd9ff5311 100644 --- a/pkgs/by-name/ty/typescript-language-server/package.nix +++ b/pkgs/by-name/ty/typescript-language-server/package.nix @@ -7,7 +7,7 @@ makeWrapper, nodejs, prefetch-yarn-deps, - substituteAll, + replaceVars, yarn, testers, typescript, @@ -25,8 +25,7 @@ stdenv.mkDerivation (finalAttrs: { }; patches = [ - (substituteAll { - src = ./default-fallbackTsserverPath.diff; + (replaceVars ./default-fallbackTsserverPath.diff { typescript = "${typescript}/lib/node_modules/typescript/lib/tsserver.js"; }) ]; diff --git a/pkgs/by-name/vd/vdhcoapp/package.nix b/pkgs/by-name/vd/vdhcoapp/package.nix index 64465bd2cc08d4..d4cad21ba3027a 100644 --- a/pkgs/by-name/vd/vdhcoapp/package.nix +++ b/pkgs/by-name/vd/vdhcoapp/package.nix @@ -5,7 +5,7 @@ nodejs, ffmpeg, callPackage, - substituteAll, + replaceVars, makeWrapper, toml2json, jq, @@ -32,8 +32,7 @@ buildNpmPackage rec { ]; patches = [ - (substituteAll { - src = ./ffmpeg-filepicker.patch; + (replaceVars ./ffmpeg-filepicker.patch { inherit ffmpeg; filepicker = lib.getExe (callPackage ./filepicker.nix { }); }) diff --git a/pkgs/by-name/ve/veracrypt/package.nix b/pkgs/by-name/ve/veracrypt/package.nix index fc41522a4b2049..4f2c08feb3580a 100644 --- a/pkgs/by-name/ve/veracrypt/package.nix +++ b/pkgs/by-name/ve/veracrypt/package.nix @@ -8,7 +8,7 @@ fuse, wxGTK32, lvm2, - substituteAll, + replaceVars, e2fsprogs, exfat, ntfs3g, @@ -27,8 +27,7 @@ stdenv.mkDerivation (finalAttrs: { }; patches = [ - (substituteAll { - src = ./fix-paths.patch; + (replaceVars ./fix-paths.patch { ext2 = "${e2fsprogs}/bin/mkfs.ext2"; ext3 = "${e2fsprogs}/bin/mkfs.ext3"; ext4 = "${e2fsprogs}/bin/mkfs.ext4"; diff --git a/pkgs/by-name/ve/vesktop/package.nix b/pkgs/by-name/ve/vesktop/package.nix index 9c3fedbf3ad639..0296aa9d06d859 100644 --- a/pkgs/by-name/ve/vesktop/package.nix +++ b/pkgs/by-name/ve/vesktop/package.nix @@ -2,7 +2,7 @@ lib, stdenv, fetchFromGitHub, - substituteAll, + replaceVars, makeBinaryWrapper, makeWrapper, makeDesktopItem, @@ -70,9 +70,8 @@ stdenv.mkDerivation (finalAttrs: { patches = [ ./disable_update_checking.patch ] - ++ lib.optional withSystemVencord (substituteAll { + ++ lib.optional withSystemVencord (replaceVars ./use_system_vencord.patch { inherit vencord; - src = ./use_system_vencord.patch; }); env = { diff --git a/pkgs/by-name/vy/vym/package.nix b/pkgs/by-name/vy/vym/package.nix index bafae7dad58ec3..b0cc88f17a30fd 100644 --- a/pkgs/by-name/vy/vym/package.nix +++ b/pkgs/by-name/vy/vym/package.nix @@ -5,7 +5,7 @@ pkg-config, qt5, stdenv, - substituteAll, + replaceVars, unzip, zip, }: @@ -35,8 +35,7 @@ stdenv.mkDerivation (finalAttrs: { ]; patches = [ - (substituteAll { - src = ./patches/0000-fix-zip-paths.diff; + (replaceVars ./patches/0000-fix-zip-paths.diff { zipPath = "${lib.getExe zip}"; unzipPath = "${lib.getExe unzip}"; }) diff --git a/pkgs/by-name/we/webcord-vencord/package.nix b/pkgs/by-name/we/webcord-vencord/package.nix index 2ac078def4eed3..de047eb43990be 100644 --- a/pkgs/by-name/we/webcord-vencord/package.nix +++ b/pkgs/by-name/we/webcord-vencord/package.nix @@ -2,7 +2,7 @@ # allow overriding electron electron, webcord, - substituteAll, + replaceVars, lib, vencord-web-extension, }: @@ -12,8 +12,7 @@ pname = "webcord-vencord"; patches = (old.patches or [ ]) ++ [ - (substituteAll { - src = ./add-extension.patch; + (replaceVars ./add-extension.patch { vencord = vencord-web-extension; }) ]; diff --git a/pkgs/by-name/wi/wingpanel-indicator-ayatana/package.nix b/pkgs/by-name/wi/wingpanel-indicator-ayatana/package.nix index e5e97bede0c43d..f50da741c1d31f 100644 --- a/pkgs/by-name/wi/wingpanel-indicator-ayatana/package.nix +++ b/pkgs/by-name/wi/wingpanel-indicator-ayatana/package.nix @@ -3,7 +3,7 @@ stdenv, fetchFromGitHub, unstableGitUpdater, - substituteAll, + replaceVars, meson, ninja, pkg-config, @@ -27,8 +27,7 @@ stdenv.mkDerivation rec { patches = [ # Tells the indicator the path for libapplication.so - (substituteAll { - src = ./fix-libapplication-dir.patch; + (replaceVars ./fix-libapplication-dir.patch { indicator_application = indicator-application-gtk3; }) ]; diff --git a/pkgs/by-name/xb/xborders/package.nix b/pkgs/by-name/xb/xborders/package.nix index b61315d9d6a2ce..ed5332d99058e5 100644 --- a/pkgs/by-name/xb/xborders/package.nix +++ b/pkgs/by-name/xb/xborders/package.nix @@ -7,7 +7,7 @@ libnotify, wrapGAppsHook3, gobject-introspection, - substituteAll, + replaceVars, }: python3Packages.buildPythonPackage rec { @@ -40,8 +40,7 @@ python3Packages.buildPythonPackage rec { postPatch = let - setup = substituteAll { - src = ./setup.py; + setup = replaceVars ./setup.py { desc = meta.description; # "description" is reserved inherit pname version; }; diff --git a/pkgs/by-name/yo/you-get/package.nix b/pkgs/by-name/yo/you-get/package.nix index cabd00e67b380c..2e4b9087713b33 100644 --- a/pkgs/by-name/yo/you-get/package.nix +++ b/pkgs/by-name/yo/you-get/package.nix @@ -2,7 +2,7 @@ lib, python3, fetchPypi, - substituteAll, + replaceVars, ffmpeg, installShellFiles, }: @@ -22,8 +22,7 @@ python3.pkgs.buildPythonApplication rec { }; patches = [ - (substituteAll { - src = ./ffmpeg-path.patch; + (replaceVars ./ffmpeg-path.patch { ffmpeg = "${lib.getBin ffmpeg}/bin/ffmpeg"; ffprobe = "${lib.getBin ffmpeg}/bin/ffmpeg"; version = lib.getVersion ffmpeg; diff --git a/pkgs/by-name/zs/zsh-powerlevel10k/package.nix b/pkgs/by-name/zs/zsh-powerlevel10k/package.nix index 2ca1cc0c4e0d3c..574e1f966b2762 100644 --- a/pkgs/by-name/zs/zsh-powerlevel10k/package.nix +++ b/pkgs/by-name/zs/zsh-powerlevel10k/package.nix @@ -2,7 +2,7 @@ lib, stdenv, fetchFromGitHub, - substituteAll, + replaceVars, gitstatus, bash, }: @@ -36,8 +36,7 @@ stdenv.mkDerivation rec { buildInputs = [ bash ]; patches = [ - (substituteAll { - src = ./gitstatusd.patch; + (replaceVars ./gitstatusd.patch { gitstatusdPath = "${gitstatus'}/bin/gitstatusd"; }) ]; diff --git a/pkgs/games/warsow/engine.nix b/pkgs/games/warsow/engine.nix index c824fadc8814dc..0d2ef4cfaae1fd 100644 --- a/pkgs/games/warsow/engine.nix +++ b/pkgs/games/warsow/engine.nix @@ -1,7 +1,7 @@ { stdenv, lib, - substituteAll, + replaceVars, fetchurl, cmake, libogg, @@ -27,8 +27,7 @@ stdenv.mkDerivation rec { }; patches = [ - (substituteAll { - src = ./libpath.patch; + (replaceVars ./libpath.patch { inherit zlib curl diff --git a/pkgs/misc/my-env/default.nix b/pkgs/misc/my-env/default.nix index 710536e9869ae9..1e48a93b16b216 100644 --- a/pkgs/misc/my-env/default.nix +++ b/pkgs/misc/my-env/default.nix @@ -58,7 +58,7 @@ { mkDerivation, - substituteAll, + replaceVars, pkgs, }: { @@ -80,8 +80,7 @@ mkDerivation { "buildPhase" "fixupPhase" ]; - setupNew = substituteAll { - src = ../../stdenv/generic/setup.sh; + setupNew = replaceVars ../../stdenv/generic/setup.sh { inherit gcc; }; diff --git a/pkgs/misc/tmux-plugins/tmux-fingers/default.nix b/pkgs/misc/tmux-plugins/tmux-fingers/default.nix index bb415d76935b76..b9cc9abb40bf0e 100644 --- a/pkgs/misc/tmux-plugins/tmux-fingers/default.nix +++ b/pkgs/misc/tmux-plugins/tmux-fingers/default.nix @@ -1,6 +1,6 @@ { mkTmuxPlugin, - substituteAll, + replaceVars, fetchFromGitHub, crystal, }: @@ -38,8 +38,7 @@ mkTmuxPlugin { rtpFilePath = "tmux-fingers.tmux"; patches = [ - (substituteAll { - src = ./fix.patch; + (replaceVars ./fix.patch { tmuxFingersDir = "${fingers}/bin"; }) ]; diff --git a/pkgs/misc/tmux-plugins/tmux-thumbs/default.nix b/pkgs/misc/tmux-plugins/tmux-thumbs/default.nix index d7abae1ed23a81..31e66dbf670660 100644 --- a/pkgs/misc/tmux-plugins/tmux-thumbs/default.nix +++ b/pkgs/misc/tmux-plugins/tmux-thumbs/default.nix @@ -1,7 +1,7 @@ { mkTmuxPlugin, thumbs, - substituteAll, + replaceVars, }: mkTmuxPlugin { @@ -12,8 +12,7 @@ mkTmuxPlugin { rtpFilePath = "tmux-thumbs.tmux"; patches = [ - (substituteAll { - src = ./fix.patch; + (replaceVars ./fix.patch { tmuxThumbsDir = "${thumbs}/bin"; }) ]; diff --git a/pkgs/servers/sql/postgresql/ext/pgvecto-rs/default.nix b/pkgs/servers/sql/postgresql/ext/pgvecto-rs/default.nix index 7af27a8300bd5e..b7a1496a37fe6a 100644 --- a/pkgs/servers/sql/postgresql/ext/pgvecto-rs/default.nix +++ b/pkgs/servers/sql/postgresql/ext/pgvecto-rs/default.nix @@ -11,7 +11,7 @@ postgresql, rustPlatform, stdenv, - substituteAll, + replaceVars, }: let @@ -42,8 +42,7 @@ in patches = [ # Tell the `c` crate to use the flags from the rust bindgen hook - (substituteAll { - src = ./0001-read-clang-flags-from-environment.diff; + (replaceVars ./0001-read-clang-flags-from-environment.diff { clang = lib.getExe clang; }) ]; diff --git a/pkgs/tools/audio/yabridge/default.nix b/pkgs/tools/audio/yabridge/default.nix index fc258317b1b228..ef97b99163f370 100644 --- a/pkgs/tools/audio/yabridge/default.nix +++ b/pkgs/tools/audio/yabridge/default.nix @@ -2,7 +2,7 @@ lib, multiStdenv, fetchFromGitHub, - substituteAll, + replaceVars, pkgsi686Linux, dbus, meson, @@ -99,8 +99,7 @@ multiStdenv.mkDerivation (finalAttrs: { patches = [ # Hard code bitbridge & runtime dependencies - (substituteAll { - src = ./hardcode-dependencies.patch; + (replaceVars ./hardcode-dependencies.patch { libdbus = dbus.lib; libxcb32 = pkgsi686Linux.xorg.libxcb; inherit wine; diff --git a/pkgs/tools/graphics/mangohud/default.nix b/pkgs/tools/graphics/mangohud/default.nix index 391234ae1903dd..034d74d7fbd360 100644 --- a/pkgs/tools/graphics/mangohud/default.nix +++ b/pkgs/tools/graphics/mangohud/default.nix @@ -3,7 +3,7 @@ , fetchFromGitLab , fetchFromGitHub , fetchurl -, substituteAll +, replaceVars , coreutils , curl , gnugrep @@ -127,8 +127,7 @@ stdenv.mkDerivation (finalAttrs: { # Hard code dependencies. Can't use makeWrapper since the Vulkan # layer can be used without the mangohud executable by setting MANGOHUD=1. - (substituteAll { - src = ./hardcode-dependencies.patch; + (replaceVars ./hardcode-dependencies.patch { path = lib.makeBinPath [ coreutils diff --git a/pkgs/tools/graphics/nifskope/default.nix b/pkgs/tools/graphics/nifskope/default.nix index 399d41ab1894db..609c75e6c1c821 100644 --- a/pkgs/tools/graphics/nifskope/default.nix +++ b/pkgs/tools/graphics/nifskope/default.nix @@ -5,7 +5,7 @@ qmake, qtbase, qttools, - substituteAll, + replaceVars, libGLU, wrapQtAppsHook, fetchpatch, @@ -25,8 +25,7 @@ stdenv.mkDerivation { patches = [ ./external-lib-paths.patch - (substituteAll { - src = ./qttools-bins.patch; + (replaceVars ./qttools-bins.patch { qttools = "${qttools.dev}/bin"; }) (fetchpatch { diff --git a/pkgs/tools/inputmethods/ibus-engines/ibus-hangul/default.nix b/pkgs/tools/inputmethods/ibus-engines/ibus-hangul/default.nix index 74fd01fff8afde..0db733c430348e 100644 --- a/pkgs/tools/inputmethods/ibus-engines/ibus-hangul/default.nix +++ b/pkgs/tools/inputmethods/ibus-engines/ibus-hangul/default.nix @@ -2,7 +2,7 @@ lib, stdenv, fetchFromGitHub, - substituteAll, + replaceVars, appstream-glib, gettext, pkg-config, @@ -27,8 +27,7 @@ stdenv.mkDerivation rec { }; patches = [ - (substituteAll { - src = ./fix-paths.patch; + (replaceVars ./fix-paths.patch { libhangul = "${libhangul}/lib/libhangul.so.1"; }) ]; diff --git a/pkgs/tools/networking/bitmask-vpn/default.nix b/pkgs/tools/networking/bitmask-vpn/default.nix index 5c8cbbe06db77e..bd7b819ecfea8e 100644 --- a/pkgs/tools/networking/bitmask-vpn/default.nix +++ b/pkgs/tools/networking/bitmask-vpn/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, - substituteAll, + replaceVars, git, fetchFromGitLab, buildGoModule, @@ -74,8 +74,7 @@ buildGoModule rec { patches = [ # This patch fixes the paths in the build script generated by qmake # to use the correct paths for qmlcachegen and lrelease - (substituteAll { - src = ./fix_paths.patch; + (replaceVars ./fix_paths.patch { inherit qtbase qtdeclarative qttools; }) diff --git a/pkgs/tools/networking/ebpf-verifier/default.nix b/pkgs/tools/networking/ebpf-verifier/default.nix index 431d8429471948..cd31356411c23f 100644 --- a/pkgs/tools/networking/ebpf-verifier/default.nix +++ b/pkgs/tools/networking/ebpf-verifier/default.nix @@ -6,7 +6,7 @@ cmake, catch2, pkg-config, - substituteAll, + replaceVars, yaml-cpp, }: @@ -23,9 +23,8 @@ stdenv.mkDerivation { }; patches = [ - (substituteAll { + (replaceVars ./remove-fetchcontent-usage.patch { # We will download them instead of cmake's fetchContent - src = ./remove-fetchcontent-usage.patch; catch2Src = catch2.src; }) ]; diff --git a/pkgs/tools/networking/edgedb/default.nix b/pkgs/tools/networking/edgedb/default.nix index 6a10d7e42fdf7c..e52c3b6dfc881b 100644 --- a/pkgs/tools/networking/edgedb/default.nix +++ b/pkgs/tools/networking/edgedb/default.nix @@ -9,7 +9,7 @@ curl, openssl, xz, - substituteAll, + replaceVars, # for passthru.tests: edgedb, testers, @@ -50,8 +50,7 @@ rustPlatform.buildRustPackage rec { checkFeatures = [ ]; patches = [ - (substituteAll { - src = ./0001-dynamically-patchelf-binaries.patch; + (replaceVars ./0001-dynamically-patchelf-binaries.patch { inherit patchelf; dynamicLinker = stdenv.cc.bintools.dynamicLinker; }) diff --git a/pkgs/tools/package-management/protontricks/default.nix b/pkgs/tools/package-management/protontricks/default.nix index 13b7158e79697f..700c4bd21d4043 100644 --- a/pkgs/tools/package-management/protontricks/default.nix +++ b/pkgs/tools/package-management/protontricks/default.nix @@ -2,7 +2,7 @@ lib, buildPythonApplication, fetchFromGitHub, - substituteAll, + replaceVars, writeShellScript, steam-run, fetchpatch2, @@ -30,8 +30,7 @@ buildPythonApplication rec { patches = [ # Use steam-run to run Proton binaries - (substituteAll { - src = ./steam-run.patch; + (replaceVars ./steam-run.patch { steamRun = lib.getExe steam-run; bash = writeShellScript "steam-run-bash" '' exec ${lib.getExe steam-run} bash "$@" diff --git a/pkgs/tools/security/keybase/default.nix b/pkgs/tools/security/keybase/default.nix index 44ec908dcf5477..c58852e05ab840 100644 --- a/pkgs/tools/security/keybase/default.nix +++ b/pkgs/tools/security/keybase/default.nix @@ -1,6 +1,6 @@ { stdenv, - substituteAll, + replaceVars, lib, buildGoModule, fetchFromGitHub, @@ -36,8 +36,7 @@ buildGoModule rec { vendorHash = "sha256-KHahkGzkXr6xp0XY9MyEeeiHnmphaNYi9dPBQ476+us="; patches = [ - (substituteAll { - src = ./fix-paths-keybase.patch; + (replaceVars ./fix-paths-keybase.patch { gpg = "${gnupg}/bin/gpg"; gpg2 = "${gnupg}/bin/gpg2"; })