diff --git a/pkgs/applications/audio/espeak-ng/default.nix b/pkgs/applications/audio/espeak-ng/default.nix index e7463c8c6613dd..14835a9e0b605c 100644 --- a/pkgs/applications/audio/espeak-ng/default.nix +++ b/pkgs/applications/audio/espeak-ng/default.nix @@ -9,7 +9,7 @@ libtool, pkg-config, ronn, - substituteAll, + replaceVars, buildPackages, mbrolaSupport ? true, mbrola, @@ -45,8 +45,7 @@ stdenv.mkDerivation rec { ] ++ lib.optionals mbrolaSupport [ # Hardcode correct mbrola paths. - (substituteAll { - src = ./mbrola.patch; + (replaceVars ./mbrola.patch { inherit mbrola; }) ]; diff --git a/pkgs/applications/display-managers/lightdm/default.nix b/pkgs/applications/display-managers/lightdm/default.nix index c3988cdd4e681a..45fa03377e6979 100644 --- a/pkgs/applications/display-managers/lightdm/default.nix +++ b/pkgs/applications/display-managers/lightdm/default.nix @@ -4,7 +4,7 @@ buildPackages, fetchFromGitHub, nix-update-script, - substituteAll, + replaceVars, plymouth, pam, pkg-config, @@ -85,8 +85,7 @@ stdenv.mkDerivation rec { # Hardcode plymouth to fix transitions. # For some reason it can't find `plymouth` # even when it's in PATH in environment.systemPackages. - (substituteAll { - src = ./fix-paths.patch; + (replaceVars ./fix-paths.patch { plymouth = "${plymouth}/bin/plymouth"; }) ]; diff --git a/pkgs/applications/editors/emacs/elisp-packages/manual-packages/codeium/default.nix b/pkgs/applications/editors/emacs/elisp-packages/manual-packages/codeium/default.nix index 59be7f543d1c56..bb6ad95c94b527 100644 --- a/pkgs/applications/editors/emacs/elisp-packages/manual-packages/codeium/default.nix +++ b/pkgs/applications/editors/emacs/elisp-packages/manual-packages/codeium/default.nix @@ -3,7 +3,7 @@ codeium, fetchFromGitHub, melpaBuild, - substituteAll, + replaceVars, gitUpdater, }: @@ -19,8 +19,7 @@ melpaBuild { }; patches = [ - (substituteAll { - src = ./0000-set-codeium-command-executable.patch; + (replaceVars ./0000-set-codeium-command-executable.patch { codeium = lib.getExe' codeium "codeium_language_server"; }) ]; diff --git a/pkgs/applications/editors/vim/plugins/overrides.nix b/pkgs/applications/editors/vim/plugins/overrides.nix index 47053c2da49a9f..5ec7d3937c5552 100644 --- a/pkgs/applications/editors/vim/plugins/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/overrides.nix @@ -11,7 +11,6 @@ fetchurl, neovimUtils, replaceVars, - substituteAll, # Language dependencies fetchYarnDeps, mkYarnModules, @@ -181,8 +180,7 @@ in aw-watcher-vim = super.aw-watcher-vim.overrideAttrs { patches = [ - (substituteAll { - src = ./patches/aw-watcher-vim/program_paths.patch; + (replaceVars ./patches/aw-watcher-vim/program_paths.patch { curl = lib.getExe curl; }) ]; @@ -1096,8 +1094,7 @@ in super.fruzzy.overrideAttrs (old: { buildInputs = [ nim1 ]; patches = [ - (substituteAll { - src = ./patches/fruzzy/get_version.patch; + (replaceVars ./patches/fruzzy/get_version.patch { inherit (old) version; }) ]; @@ -1236,8 +1233,7 @@ in gx-nvim = super.gx-nvim.overrideAttrs { patches = lib.optionals stdenv.hostPlatform.isLinux [ - (substituteAll { - src = ./patches/gx-nvim/fix-paths.patch; + (replaceVars ./patches/gx-nvim/fix-paths.patch { inherit xdg-utils; }) ]; @@ -1523,10 +1519,7 @@ in # https://github.com/NixOS/nixpkgs/pull/105810#issuecomment-740007985 # https://github.com/camspiers/lens.vim/pull/40/files patches = [ - (substituteAll { - src = ./patches/lens-vim/remove_duplicate_g_lens_animate.patch; - inherit languagetool; - }) + ./patches/lens-vim/remove_duplicate_g_lens_animate.patch ]; }; @@ -1655,8 +1648,7 @@ in in super.markdown-preview-nvim.overrideAttrs { patches = [ - (substituteAll { - src = ./markdown-preview-nvim/fix-node-paths.patch; + (replaceVars ./markdown-preview-nvim/fix-node-paths.patch { node = "${nodejs}/bin/node"; }) ]; @@ -2566,8 +2558,7 @@ in "openscad.utilities" ]; patches = [ - (substituteAll { - src = ./patches/openscad.nvim/program_paths.patch; + (replaceVars ./patches/openscad.nvim/program_paths.patch { htop = lib.getExe htop; openscad = lib.getExe openscad; zathura = lib.getExe zathura; @@ -2676,8 +2667,7 @@ in Preview-nvim = super.Preview-nvim.overrideAttrs { patches = [ - (substituteAll { - src = ./patches/preview-nvim/hardcode-mdt-binary-path.patch; + (replaceVars ./patches/preview-nvim/hardcode-mdt-binary-path.patch { mdt = lib.getExe md-tui; }) ]; @@ -3521,8 +3511,7 @@ in # let g:grammarous#show_first_error = 1 # see https://github.com/rhysd/vim-grammarous/issues/39 patches = [ - (substituteAll { - src = ./patches/vim-grammarous/set_default_languagetool.patch; + (replaceVars ./patches/vim-grammarous/set_default_languagetool.patch { inherit languagetool; }) ]; diff --git a/pkgs/applications/emulators/wine/packages.nix b/pkgs/applications/emulators/wine/packages.nix index 3d87723f440419..c0dc9e9af2bb47 100644 --- a/pkgs/applications/emulators/wine/packages.nix +++ b/pkgs/applications/emulators/wine/packages.nix @@ -5,7 +5,7 @@ pkgsi686Linux, pkgsCross, callPackage, - substituteAll, + replaceVars, moltenvk, wineRelease ? "stable", supportFlags, @@ -80,8 +80,7 @@ with src; mingwW64.buildPackages.gcc ]; monos = [ mono ]; - buildScript = substituteAll { - src = ./builder-wow.sh; + buildScript = replaceVars ./builder-wow.sh { # pkgconfig has trouble picking the right architecture pkgconfig64remove = lib.makeSearchPathOutput "dev" "lib/pkgconfig" [ pkgs.glib diff --git a/pkgs/applications/graphics/gimp/default.nix b/pkgs/applications/graphics/gimp/default.nix index 9258defc289d55..e5e552f299f989 100644 --- a/pkgs/applications/graphics/gimp/default.nix +++ b/pkgs/applications/graphics/gimp/default.nix @@ -2,7 +2,7 @@ stdenv, lib, fetchurl, - substituteAll, + replaceVars, autoreconfHook, pkg-config, intltool, @@ -74,8 +74,7 @@ stdenv.mkDerivation (finalAttrs: { patches = [ # to remove compiler from the runtime closure, reference was retained via # gimp --version --verbose output - (substituteAll { - src = ./remove-cc-reference.patch; + (replaceVars ./remove-cc-reference.patch { cc_version = stdenv.cc.cc.name; }) diff --git a/pkgs/applications/graphics/inkscape/default.nix b/pkgs/applications/graphics/inkscape/default.nix index b1c8f5a9ea094a..46c863a3c3dc1e 100644 --- a/pkgs/applications/graphics/inkscape/default.nix +++ b/pkgs/applications/graphics/inkscape/default.nix @@ -41,7 +41,7 @@ , potrace , python3 , runCommand -, substituteAll +, replaceVars , wrapGAppsHook3 , libepoxy , zlib @@ -92,15 +92,13 @@ stdenv.mkDerivation (finalAttrs: { url = "https://gitlab.com/inkscape/inkscape/-/commit/eb6dadcf1a5c660167ba43f3606c8e7cc6529787.patch"; hash = "sha256-FvbJV/YrBwhHg0kFdbhyd/Y9g7YV2nPIrRqZt7yJ50Q="; }) - (substituteAll { - src = ./fix-python-paths.patch; + (replaceVars ./fix-python-paths.patch { # Python is used at run-time to execute scripts, # e.g., those from the "Effects" menu. python3 = lib.getExe python3Env; }) - (substituteAll { + (replaceVars ./fix-ps2pdf-path.patch { # Fix path to ps2pdf binary - src = ./fix-ps2pdf-path.patch; inherit ghostscript; }) ]; diff --git a/pkgs/applications/graphics/inkscape/extensions/textext/default.nix b/pkgs/applications/graphics/inkscape/extensions/textext/default.nix index 840ba0333bb5b5..669ae89edd4323 100644 --- a/pkgs/applications/graphics/inkscape/extensions/textext/default.nix +++ b/pkgs/applications/graphics/inkscape/extensions/textext/default.nix @@ -2,7 +2,7 @@ lib, writeScript, fetchFromGitHub, - substituteAll, + replaceVars, inkscape, pdflatex, lualatex, @@ -33,8 +33,7 @@ python3.pkgs.buildPythonApplication rec { patches = [ # Make sure we can point directly to pdflatex in the extension, # instead of relying on the PATH (which might not have it) - (substituteAll { - src = ./fix-paths.patch; + (replaceVars ./fix-paths.patch { inherit pdflatex lualatex; }) diff --git a/pkgs/applications/virtualization/virtualbox/default.nix b/pkgs/applications/virtualization/virtualbox/default.nix index be348027945a08..8ec8874f51e4a3 100644 --- a/pkgs/applications/virtualization/virtualbox/default.nix +++ b/pkgs/applications/virtualization/virtualbox/default.nix @@ -38,7 +38,7 @@ libvpx, nettools, dbus, - substituteAll, + replaceVars, gsoap, zlib, xz, @@ -235,10 +235,11 @@ stdenv.mkDerivation (finalAttrs: { # these issues by patching the code to set QT_PLUGIN_PATH to the necessary paths, # after the code that unsets it. Note that qtsvg is included so that SVG icons from # the user's icon theme can be loaded. - ++ optional (!headless && enableHardening) (substituteAll { - src = ./qt-env-vars.patch; - qtPluginPath = "${qtbase}/bin/${qtbase.qtPluginPrefix}:${qtsvg}/bin/${qtbase.qtPluginPrefix}:${qtwayland}/bin/${qtbase.qtPluginPrefix}"; - }) + ++ optional (!headless && enableHardening) ( + replaceVars ./qt-env-vars.patch { + qtPluginPath = "${qtbase}/bin/${qtbase.qtPluginPrefix}:${qtsvg}/bin/${qtbase.qtPluginPrefix}:${qtwayland}/bin/${qtbase.qtPluginPrefix}"; + } + ) # While the KVM patch should not break any other behavior if --with-kvm is not specified, # we don't take any chances and only apply it if people actually want to use KVM support. ++ optional enableKvm ( diff --git a/pkgs/build-support/mitm-cache/default.nix b/pkgs/build-support/mitm-cache/default.nix index 80287e60a33a1a..8d206034f7ea73 100644 --- a/pkgs/build-support/mitm-cache/default.nix +++ b/pkgs/build-support/mitm-cache/default.nix @@ -4,7 +4,7 @@ fetchFromGitHub, callPackage, rustPlatform, - substituteAll, + replaceVars, openssl, Security, python3Packages, @@ -27,8 +27,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-6eYOSSlswJGR2IrFo17qVnwI+h2FkyTjLFvwf62nG2c="; - setupHook = substituteAll { - src = ./setup-hook.sh; + setupHook = replaceVars ./setup-hook.sh { inherit openssl; ephemeral_port_reserve = python3Packages.ephemeral-port-reserve; }; diff --git a/pkgs/desktops/deepin/go-package/dde-daemon/default.nix b/pkgs/desktops/deepin/go-package/dde-daemon/default.nix index bbc43448b04414..44120eae4e5c97 100644 --- a/pkgs/desktops/deepin/go-package/dde-daemon/default.nix +++ b/pkgs/desktops/deepin/go-package/dde-daemon/default.nix @@ -1,7 +1,7 @@ { lib, fetchFromGitHub, - substituteAll, + replaceVars, buildGoModule, pkg-config, deepin-gettext-tools, @@ -48,12 +48,10 @@ buildGoModule rec { patches = [ ./0001-dont-set-PATH.diff - (substituteAll { - src = ./0002-fix-custom-wallpapers-path.diff; + (replaceVars ./0002-fix-custom-wallpapers-path.diff { inherit coreutils; }) - (substituteAll { - src = ./0003-aviod-use-hardcode-path.diff; + (replaceVars ./0003-aviod-use-hardcode-path.diff { inherit dbus; }) ]; diff --git a/pkgs/desktops/gnome/extensions/EasyScreenCast/default.nix b/pkgs/desktops/gnome/extensions/EasyScreenCast/default.nix index d331f1eae6a6c4..12d79cbbf9f4ba 100644 --- a/pkgs/desktops/gnome/extensions/EasyScreenCast/default.nix +++ b/pkgs/desktops/gnome/extensions/EasyScreenCast/default.nix @@ -2,7 +2,7 @@ lib, stdenv, fetchFromGitHub, - substituteAll, + replaceVars, glib, gnome-shell, gettext, @@ -22,8 +22,7 @@ stdenv.mkDerivation (finalAttrs: { }; patches = [ - (substituteAll { - src = ./fix-gi-path.patch; + (replaceVars ./fix-gi-path.patch { gnomeShell = gnome-shell; }) ]; diff --git a/pkgs/desktops/gnome/extensions/arcmenu/default.nix b/pkgs/desktops/gnome/extensions/arcmenu/default.nix index 9e78ddc152257f..8fc92494caade9 100644 --- a/pkgs/desktops/gnome/extensions/arcmenu/default.nix +++ b/pkgs/desktops/gnome/extensions/arcmenu/default.nix @@ -4,7 +4,7 @@ fetchFromGitLab, glib, gettext, - substituteAll, + replaceVars, gnome-menus, }: @@ -20,8 +20,7 @@ stdenv.mkDerivation rec { }; patches = [ - (substituteAll { - src = ./fix_gmenu.patch; + (replaceVars ./fix_gmenu.patch { gmenu_path = "${gnome-menus}/lib/girepository-1.0"; }) ]; diff --git a/pkgs/desktops/gnome/extensions/drop-down-terminal/default.nix b/pkgs/desktops/gnome/extensions/drop-down-terminal/default.nix index e5302645d5605c..d95679f601c5c6 100644 --- a/pkgs/desktops/gnome/extensions/drop-down-terminal/default.nix +++ b/pkgs/desktops/gnome/extensions/drop-down-terminal/default.nix @@ -2,7 +2,7 @@ lib, stdenv, fetchFromGitHub, - substituteAll, + replaceVars, gjs, vte, gnome, @@ -25,8 +25,7 @@ stdenv.mkDerivation rec { }; patches = [ - (substituteAll { - src = ./fix_vte_and_gjs.patch; + (replaceVars ./fix_vte_and_gjs.patch { inherit gjs vte; }) ]; diff --git a/pkgs/desktops/gnome/extensions/extensionOverrides.nix b/pkgs/desktops/gnome/extensions/extensionOverrides.nix index 30fef8c4e2383b..530470a4824df6 100644 --- a/pkgs/desktops/gnome/extensions/extensionOverrides.nix +++ b/pkgs/desktops/gnome/extensions/extensionOverrides.nix @@ -17,7 +17,7 @@ , nvme-cli , procps , smartmontools -, substituteAll +, replaceVars , touchegg , util-linux , vte @@ -72,8 +72,7 @@ super: lib.trivial.pipe super [ (patchExtension "eepresetselector@ulville.github.io" (old: { patches = [ # Needed to find the currently set preset - (substituteAll { - src = ./extensionOverridesPatches/eepresetselector_at_ulville.github.io.patch; + (replaceVars ./extensionOverridesPatches/eepresetselector_at_ulville.github.io.patch { easyeffects_gsettings_path = "${glib.getSchemaPath easyeffects}"; }) ]; @@ -81,8 +80,7 @@ super: lib.trivial.pipe super [ (patchExtension "freon@UshakovVasilii_Github.yahoo.com" (old: { patches = [ - (substituteAll { - src = ./extensionOverridesPatches/freon_at_UshakovVasilii_Github.yahoo.com.patch; + (replaceVars ./extensionOverridesPatches/freon_at_UshakovVasilii_Github.yahoo.com.patch { inherit hddtemp liquidctl lm_sensors procps smartmontools; netcat = netcat-gnu; nvmecli = nvme-cli; @@ -103,11 +101,10 @@ super: lib.trivial.pipe super [ (patchExtension "gtk4-ding@smedius.gitlab.com" (old: { nativeBuildInputs = [ wrapGAppsHook3 ]; patches = [ - (substituteAll { + (replaceVars ./extensionOverridesPatches/gtk4-ding_at_smedius.gitlab.com.patch { inherit gjs; util_linux = util-linux; xdg_utils = xdg-utils; - src = ./extensionOverridesPatches/gtk4-ding_at_smedius.gitlab.com.patch; nautilus_gsettings_path = "${glib.getSchemaPath nautilus}"; }) ]; @@ -129,8 +126,7 @@ super: lib.trivial.pipe super [ (patchExtension "system-monitor@gnome-shell-extensions.gcampax.github.com" (old: { patches = [ - (substituteAll { - src = ./extensionOverridesPatches/system-monitor_at_gnome-shell-extensions.gcampax.github.com.patch; + (replaceVars ./extensionOverridesPatches/system-monitor_at_gnome-shell-extensions.gcampax.github.com.patch { gtop_path = "${libgtop}/lib/girepository-1.0"; }) ]; @@ -138,8 +134,7 @@ super: lib.trivial.pipe super [ (patchExtension "system-monitor-next@paradoxxx.zero.gmail.com" (old: { patches = [ - (substituteAll { - src = ./extensionOverridesPatches/system-monitor-next_at_paradoxxx.zero.gmail.com.patch; + (replaceVars ./extensionOverridesPatches/system-monitor-next_at_paradoxxx.zero.gmail.com.patch { gtop_path = "${libgtop}/lib/girepository-1.0"; }) ]; @@ -148,8 +143,7 @@ super: lib.trivial.pipe super [ (patchExtension "Vitals@CoreCoding.com" (old: { patches = [ - (substituteAll { - src = ./extensionOverridesPatches/vitals_at_corecoding.com.patch; + (replaceVars ./extensionOverridesPatches/vitals_at_corecoding.com.patch { gtop_path = "${libgtop}/lib/girepository-1.0"; }) ]; diff --git a/pkgs/desktops/gnome/extensions/no-title-bar/default.nix b/pkgs/desktops/gnome/extensions/no-title-bar/default.nix index f8a2ef12b80fae..2e6d23855ba759 100644 --- a/pkgs/desktops/gnome/extensions/no-title-bar/default.nix +++ b/pkgs/desktops/gnome/extensions/no-title-bar/default.nix @@ -2,7 +2,7 @@ lib, stdenv, fetchFromGitHub, - substituteAll, + replaceVars, glib, gettext, xorg, @@ -25,8 +25,7 @@ stdenv.mkDerivation rec { ]; patches = [ - (substituteAll { - src = ./fix-paths.patch; + (replaceVars ./fix-paths.patch { xprop = "${xorg.xprop}/bin/xprop"; xwininfo = "${xorg.xwininfo}/bin/xwininfo"; }) diff --git a/pkgs/desktops/gnome/extensions/sound-output-device-chooser/default.nix b/pkgs/desktops/gnome/extensions/sound-output-device-chooser/default.nix index 431784e78d9c68..d70d1bb1e03199 100644 --- a/pkgs/desktops/gnome/extensions/sound-output-device-chooser/default.nix +++ b/pkgs/desktops/gnome/extensions/sound-output-device-chooser/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, - substituteAll, + replaceVars, fetchFromGitHub, libpulseaudio, python3, @@ -21,8 +21,7 @@ stdenv.mkDerivation rec { patches = [ # Fix paths to libpulse and python - (substituteAll { - src = ./fix-paths.patch; + (replaceVars ./fix-paths.patch { libpulse = "${libpulseaudio}/lib/libpulse.so"; python = python3.interpreter; }) diff --git a/pkgs/desktops/lomiri/applications/lomiri/default.nix b/pkgs/desktops/lomiri/applications/lomiri/default.nix index f4d14750e6c7ea..bf7881659864c5 100644 --- a/pkgs/desktops/lomiri/applications/lomiri/default.nix +++ b/pkgs/desktops/lomiri/applications/lomiri/default.nix @@ -6,7 +6,7 @@ fetchpatch2, gitUpdater, linkFarm, - substituteAll, + replaceVars, nixosTests, ayatana-indicator-datetime, bash, @@ -117,8 +117,7 @@ stdenv.mkDerivation (finalAttrs: { }) ./9901-lomiri-Disable-Wizard.patch - (substituteAll { - src = ./9902-Layout-fallback-file.patch; + (replaceVars ./9902-Layout-fallback-file.patch { nixosLayoutFile = "/etc/" + finalAttrs.finalPackage.passthru.etcLayoutsFile; }) ]; diff --git a/pkgs/desktops/pantheon/apps/switchboard-plugs/datetime/default.nix b/pkgs/desktops/pantheon/apps/switchboard-plugs/datetime/default.nix index e72aed12a73a89..be02539380285a 100644 --- a/pkgs/desktops/pantheon/apps/switchboard-plugs/datetime/default.nix +++ b/pkgs/desktops/pantheon/apps/switchboard-plugs/datetime/default.nix @@ -5,7 +5,7 @@ nix-update-script, meson, ninja, - substituteAll, + replaceVars, pkg-config, vala, libadwaita, @@ -30,8 +30,7 @@ stdenv.mkDerivation rec { }; patches = [ - (substituteAll { - src = ./fix-paths.patch; + (replaceVars ./fix-paths.patch { tzdata = tzdata; }) ]; diff --git a/pkgs/desktops/pantheon/apps/switchboard-plugs/keyboard/default.nix b/pkgs/desktops/pantheon/apps/switchboard-plugs/keyboard/default.nix index 0e0860e34a0936..8f066762993916 100644 --- a/pkgs/desktops/pantheon/apps/switchboard-plugs/keyboard/default.nix +++ b/pkgs/desktops/pantheon/apps/switchboard-plugs/keyboard/default.nix @@ -2,7 +2,7 @@ , stdenv , fetchFromGitHub , nix-update-script -, substituteAll +, replaceVars , meson , ninja , pkg-config @@ -37,8 +37,7 @@ stdenv.mkDerivation rec { # https://github.com/elementary/switchboard-plug-keyboard/issues/324 ./hide-install-unlisted-engines-button.patch - (substituteAll { - src = ./fix-paths.patch; + (replaceVars ./fix-paths.patch { inherit onboard libgnomekbd; }) ]; diff --git a/pkgs/desktops/pantheon/apps/switchboard-plugs/mouse-touchpad/default.nix b/pkgs/desktops/pantheon/apps/switchboard-plugs/mouse-touchpad/default.nix index 4f0d896dc29045..ad51131b9579c8 100644 --- a/pkgs/desktops/pantheon/apps/switchboard-plugs/mouse-touchpad/default.nix +++ b/pkgs/desktops/pantheon/apps/switchboard-plugs/mouse-touchpad/default.nix @@ -3,7 +3,7 @@ stdenv, fetchFromGitHub, nix-update-script, - substituteAll, + replaceVars, meson, ninja, pkg-config, @@ -31,8 +31,7 @@ stdenv.mkDerivation rec { }; patches = [ - (substituteAll { - src = ./fix-paths.patch; + (replaceVars ./fix-paths.patch { touchegg = touchegg; }) ]; diff --git a/pkgs/desktops/pantheon/apps/switchboard-plugs/network/default.nix b/pkgs/desktops/pantheon/apps/switchboard-plugs/network/default.nix index 3c58ca7ef4d4d4..1a4eccfe26c102 100644 --- a/pkgs/desktops/pantheon/apps/switchboard-plugs/network/default.nix +++ b/pkgs/desktops/pantheon/apps/switchboard-plugs/network/default.nix @@ -6,7 +6,7 @@ meson, ninja, pkg-config, - substituteAll, + replaceVars, vala, libadwaita, libgee, @@ -31,8 +31,7 @@ stdenv.mkDerivation rec { }; patches = [ - (substituteAll { - src = ./fix-paths.patch; + (replaceVars ./fix-paths.patch { inherit networkmanagerapplet; }) ]; diff --git a/pkgs/desktops/pantheon/desktop/elementary-greeter/default.nix b/pkgs/desktops/pantheon/desktop/elementary-greeter/default.nix index 115eb32558dfd7..55fe603c7b4825 100644 --- a/pkgs/desktops/pantheon/desktop/elementary-greeter/default.nix +++ b/pkgs/desktops/pantheon/desktop/elementary-greeter/default.nix @@ -3,7 +3,7 @@ , fetchFromGitHub , nix-update-script , linkFarm -, substituteAll +, replaceVars , elementary-greeter , pkg-config , meson @@ -43,8 +43,7 @@ stdenv.mkDerivation rec { patches = [ ./sysconfdir-install.patch # Needed until https://github.com/elementary/greeter/issues/360 is fixed - (substituteAll { - src = ./hardcode-fallback-background.patch; + (replaceVars ./hardcode-fallback-background.patch { default_wallpaper = "${nixos-artwork.wallpapers.simple-dark-gray.gnomeFilePath}"; }) ]; diff --git a/pkgs/desktops/pantheon/desktop/file-roller-contract/default.nix b/pkgs/desktops/pantheon/desktop/file-roller-contract/default.nix index 3ac8f42b87abf0..64a126da880759 100644 --- a/pkgs/desktops/pantheon/desktop/file-roller-contract/default.nix +++ b/pkgs/desktops/pantheon/desktop/file-roller-contract/default.nix @@ -3,7 +3,7 @@ stdenv, fetchFromGitHub, unstableGitUpdater, - substituteAll, + replaceVars, file-roller, }: @@ -19,8 +19,7 @@ stdenv.mkDerivation rec { }; patches = [ - (substituteAll { - src = ./exec-path.patch; + (replaceVars ./exec-path.patch { file_roller = file-roller; }) ]; diff --git a/pkgs/desktops/pantheon/desktop/wingpanel-indicators/applications-menu/default.nix b/pkgs/desktops/pantheon/desktop/wingpanel-indicators/applications-menu/default.nix index 7b3b95b2c8341c..bd93ae6b256573 100644 --- a/pkgs/desktops/pantheon/desktop/wingpanel-indicators/applications-menu/default.nix +++ b/pkgs/desktops/pantheon/desktop/wingpanel-indicators/applications-menu/default.nix @@ -2,7 +2,7 @@ , stdenv , fetchFromGitHub , nix-update-script -, substituteAll +, replaceVars , meson , ninja , pkg-config @@ -32,8 +32,7 @@ stdenv.mkDerivation rec { }; patches = [ - (substituteAll { - src = ./fix-paths.patch; + (replaceVars ./fix-paths.patch { bc = "${bc}/bin/bc"; }) ]; diff --git a/pkgs/desktops/pantheon/desktop/wingpanel-indicators/datetime/default.nix b/pkgs/desktops/pantheon/desktop/wingpanel-indicators/datetime/default.nix index ba30fb48469f7a..dc8d244b1c6af1 100644 --- a/pkgs/desktops/pantheon/desktop/wingpanel-indicators/datetime/default.nix +++ b/pkgs/desktops/pantheon/desktop/wingpanel-indicators/datetime/default.nix @@ -3,7 +3,7 @@ stdenv, fetchFromGitHub, nix-update-script, - substituteAll, + replaceVars, pkg-config, meson, ninja, @@ -32,8 +32,7 @@ stdenv.mkDerivation rec { }; patches = [ - (substituteAll { - src = ./fix-paths.patch; + (replaceVars ./fix-paths.patch { elementary_calendar = elementary-calendar; }) ]; diff --git a/pkgs/desktops/pantheon/desktop/wingpanel-indicators/keyboard/default.nix b/pkgs/desktops/pantheon/desktop/wingpanel-indicators/keyboard/default.nix index 24ab81ba006817..53992f8c7b36cc 100644 --- a/pkgs/desktops/pantheon/desktop/wingpanel-indicators/keyboard/default.nix +++ b/pkgs/desktops/pantheon/desktop/wingpanel-indicators/keyboard/default.nix @@ -6,7 +6,7 @@ pkg-config, meson, ninja, - substituteAll, + replaceVars, vala, gtk3, granite, @@ -30,8 +30,7 @@ stdenv.mkDerivation rec { }; patches = [ - (substituteAll { - src = ./fix-paths.patch; + (replaceVars ./fix-paths.patch { gkbd_keyboard_display = "${libgnomekbd}/bin/gkbd-keyboard-display"; }) ]; diff --git a/pkgs/desktops/pantheon/desktop/wingpanel-indicators/power/default.nix b/pkgs/desktops/pantheon/desktop/wingpanel-indicators/power/default.nix index 895615d37426dd..3f0d1ecdfd4b36 100644 --- a/pkgs/desktops/pantheon/desktop/wingpanel-indicators/power/default.nix +++ b/pkgs/desktops/pantheon/desktop/wingpanel-indicators/power/default.nix @@ -2,7 +2,7 @@ lib, stdenv, fetchFromGitHub, - substituteAll, + replaceVars, nix-update-script, gnome-power-manager, pkg-config, @@ -31,8 +31,7 @@ stdenv.mkDerivation rec { }; patches = [ - (substituteAll { - src = ./fix-paths.patch; + (replaceVars ./fix-paths.patch { gnome_power_manager = gnome-power-manager; }) ]; diff --git a/pkgs/desktops/plasma-5/plasma-nm/default.nix b/pkgs/desktops/plasma-5/plasma-nm/default.nix index dc7e8259eeb68e..55818dffbe2534 100644 --- a/pkgs/desktops/plasma-5/plasma-nm/default.nix +++ b/pkgs/desktops/plasma-5/plasma-nm/default.nix @@ -1,6 +1,6 @@ { mkDerivation, - substituteAll, + replaceVars, extra-cmake-modules, kdoctools, kcmutils, @@ -75,8 +75,7 @@ mkDerivation { ]; patches = [ - (substituteAll { - src = ./0002-openvpn-binary-path.patch; + (replaceVars ./0002-openvpn-binary-path.patch { inherit openvpn; }) ]; diff --git a/pkgs/kde/gear/audiocd-kio/default.nix b/pkgs/kde/gear/audiocd-kio/default.nix index b4fa60026b1823..c99990ff606c67 100644 --- a/pkgs/kde/gear/audiocd-kio/default.nix +++ b/pkgs/kde/gear/audiocd-kio/default.nix @@ -5,7 +5,7 @@ flac, libogg, libvorbis, - substituteAll, + replaceVars, lame, opusTools, }: @@ -13,8 +13,7 @@ mkKdeDerivation { pname = "audiocd-kio"; patches = [ - (substituteAll { - src = ./encoder-paths.patch; + (replaceVars ./encoder-paths.patch { lame = lib.getExe lame; opusenc = "${opusTools}/bin/opusenc"; }) diff --git a/pkgs/kde/gear/kdeconnect-kde/default.nix b/pkgs/kde/gear/kdeconnect-kde/default.nix index 3bc3abd422eaa1..d81c487e452ffd 100644 --- a/pkgs/kde/gear/kdeconnect-kde/default.nix +++ b/pkgs/kde/gear/kdeconnect-kde/default.nix @@ -1,7 +1,7 @@ { lib, mkKdeDerivation, - substituteAll, + replaceVars, sshfs, qtconnectivity, qtmultimedia, @@ -15,8 +15,7 @@ mkKdeDerivation { pname = "kdeconnect-kde"; patches = [ - (substituteAll { - src = ./hardcode-sshfs-path.patch; + (replaceVars ./hardcode-sshfs-path.patch { sshfs = lib.getExe sshfs; }) ]; diff --git a/pkgs/kde/gear/kdenetwork-filesharing/default.nix b/pkgs/kde/gear/kdenetwork-filesharing/default.nix index 4127b9c24f94e5..597cb8cc80de5f 100644 --- a/pkgs/kde/gear/kdenetwork-filesharing/default.nix +++ b/pkgs/kde/gear/kdenetwork-filesharing/default.nix @@ -1,7 +1,7 @@ { lib, mkKdeDerivation, - substituteAll, + replaceVars, samba, shadow, qtdeclarative, @@ -10,8 +10,7 @@ mkKdeDerivation { pname = "kdenetwork-filesharing"; patches = [ - (substituteAll { - src = ./dependency-paths.patch; + (replaceVars ./dependency-paths.patch { inherit samba; usermod = lib.getExe' shadow "usermod"; }) diff --git a/pkgs/kde/gear/kdenlive/default.nix b/pkgs/kde/gear/kdenlive/default.nix index 6bc08951f3cc4d..7746320e4d7bbf 100644 --- a/pkgs/kde/gear/kdenlive/default.nix +++ b/pkgs/kde/gear/kdenlive/default.nix @@ -1,6 +1,6 @@ { mkKdeDerivation, - substituteAll, + replaceVars, qtsvg, qtmultimedia, qtnetworkauth, @@ -17,8 +17,7 @@ mkKdeDerivation { pname = "kdenlive"; patches = [ - (substituteAll { - src = ./dependency-paths.patch; + (replaceVars ./dependency-paths.patch { inherit mediainfo mlt glaxnimate; ffmpeg = ffmpeg-full; }) diff --git a/pkgs/kde/plasma/drkonqi/default.nix b/pkgs/kde/plasma/drkonqi/default.nix index d9f0978068991e..965ba59b308d39 100644 --- a/pkgs/kde/plasma/drkonqi/default.nix +++ b/pkgs/kde/plasma/drkonqi/default.nix @@ -4,7 +4,7 @@ systemd, gdb, python3, - substituteAll, + replaceVars, }: let gdb' = gdb.override { @@ -20,8 +20,7 @@ mkKdeDerivation { pname = "drkonqi"; patches = [ - (substituteAll { - src = ./gdb-path.patch; + (replaceVars ./gdb-path.patch { gdb = "${gdb'}/bin/gdb"; }) ]; diff --git a/pkgs/kde/plasma/kde-gtk-config/default.nix b/pkgs/kde/plasma/kde-gtk-config/default.nix index c9b5a827eea88f..0ffc06da84515d 100644 --- a/pkgs/kde/plasma/kde-gtk-config/default.nix +++ b/pkgs/kde/plasma/kde-gtk-config/default.nix @@ -1,7 +1,7 @@ { lib, mkKdeDerivation, - substituteAll, + replaceVars, procps, xsettingsd, pkg-config, @@ -17,8 +17,7 @@ mkKdeDerivation { # aren't found. patches = [ ./0001-gsettings-schemas-path.patch - (substituteAll { - src = ./dependency-paths.patch; + (replaceVars ./dependency-paths.patch { pgrep = lib.getExe' procps "pgrep"; xsettingsd = lib.getExe xsettingsd; }) diff --git a/pkgs/kde/plasma/krdp/default.nix b/pkgs/kde/plasma/krdp/default.nix index 8dd95c1a76591e..dc8d7afcb1c019 100644 --- a/pkgs/kde/plasma/krdp/default.nix +++ b/pkgs/kde/plasma/krdp/default.nix @@ -1,7 +1,7 @@ { lib, mkKdeDerivation, - substituteAll, + replaceVars, openssl, pkg-config, qtkeychain, @@ -14,8 +14,7 @@ mkKdeDerivation { pname = "krdp"; patches = [ - (substituteAll { - src = ./hardcode-openssl-path.patch; + (replaceVars ./hardcode-openssl-path.patch { openssl = lib.getExe openssl; }) ]; diff --git a/pkgs/kde/plasma/plasma-desktop/default.nix b/pkgs/kde/plasma/plasma-desktop/default.nix index 46a0a73fb453d9..53c270cb5905d2 100644 --- a/pkgs/kde/plasma/plasma-desktop/default.nix +++ b/pkgs/kde/plasma/plasma-desktop/default.nix @@ -5,7 +5,7 @@ makeWrapper, glib, gsettings-desktop-schemas, - substituteAll, + replaceVars, util-linux, pkg-config, qtsvg, @@ -31,18 +31,15 @@ mkKdeDerivation { pname = "plasma-desktop"; patches = [ - (substituteAll { - src = ./hwclock-path.patch; + (replaceVars ./hwclock-path.patch { hwclock = "${lib.getBin util-linux}/bin/hwclock"; }) - (substituteAll { - src = ./kcm-access.patch; + (replaceVars ./kcm-access.patch { gsettings = "${gsettings-wrapper}/bin/gsettings"; }) ./tzdir.patch ./no-discover-shortcut.patch - (substituteAll { - src = ./wallpaper-paths.patch; + (replaceVars ./wallpaper-paths.patch { wallpapers = "${lib.getBin breeze}/share/wallpapers"; }) ]; diff --git a/pkgs/kde/plasma/plasma-disks/default.nix b/pkgs/kde/plasma/plasma-disks/default.nix index 5941fe0dec5471..db687bcbb8dee2 100644 --- a/pkgs/kde/plasma/plasma-disks/default.nix +++ b/pkgs/kde/plasma/plasma-disks/default.nix @@ -1,16 +1,15 @@ { mkKdeDerivation, lib, - substituteAll, + replaceVars, smartmontools, }: mkKdeDerivation { pname = "plasma-disks"; patches = [ - (substituteAll { + (replaceVars ./smartctl-path.patch { smartctl = lib.getExe smartmontools; - src = ./smartctl-path.patch; }) ]; } diff --git a/pkgs/kde/plasma/plasma-nm/default.nix b/pkgs/kde/plasma/plasma-nm/default.nix index 6d93b623477b35..3662452bad7bf2 100644 --- a/pkgs/kde/plasma/plasma-nm/default.nix +++ b/pkgs/kde/plasma/plasma-nm/default.nix @@ -1,6 +1,6 @@ { mkKdeDerivation, - substituteAll, + replaceVars, pkg-config, qtwebengine, mobile-broadband-provider-info, @@ -11,8 +11,7 @@ mkKdeDerivation { pname = "plasma-nm"; patches = [ - (substituteAll { - src = ./0002-openvpn-binary-path.patch; + (replaceVars ./0002-openvpn-binary-path.patch { inherit openvpn; }) ];