lol

treewide: replace substituteAll with replaceVars (part 3)

Driving #237216 forward.

+110 -169
+2 -3
pkgs/by-name/ac/accountsservice/package.nix
··· 2 2 lib, 3 3 stdenv, 4 4 fetchurl, 5 - substituteAll, 5 + replaceVars, 6 6 pkg-config, 7 7 glib, 8 8 shadow, ··· 36 36 37 37 patches = [ 38 38 # Hardcode dependency paths. 39 - (substituteAll { 40 - src = ./fix-paths.patch; 39 + (replaceVars ./fix-paths.patch { 41 40 inherit shadow coreutils; 42 41 }) 43 42
+2 -3
pkgs/by-name/al/alvr/package.nix
··· 2 2 lib, 3 3 rustPlatform, 4 4 fetchFromGitHub, 5 - substituteAll, 5 + replaceVars, 6 6 nix-update-script, 7 7 pkg-config, 8 8 autoAddDriverRunpath, ··· 59 59 }; 60 60 61 61 patches = [ 62 - (substituteAll { 63 - src = ./fix-finding-libs.patch; 62 + (replaceVars ./fix-finding-libs.patch { 64 63 ffmpeg = lib.getDev ffmpeg; 65 64 x264 = lib.getDev x264; 66 65 })
+2 -3
pkgs/by-name/ap/appstream-glib/package.nix
··· 2 2 lib, 3 3 stdenv, 4 4 fetchFromGitHub, 5 - substituteAll, 5 + replaceVars, 6 6 docbook_xml_dtd_42, 7 7 docbook_xsl, 8 8 fontconfig, ··· 74 74 ]; 75 75 76 76 patches = [ 77 - (substituteAll { 78 - src = ./paths.patch; 77 + (replaceVars ./paths.patch { 79 78 pngquant = "${pngquant}/bin/pngquant"; 80 79 }) 81 80 ];
+2 -3
pkgs/by-name/cc/ccache/package.nix
··· 2 2 lib, 3 3 stdenv, 4 4 fetchFromGitHub, 5 - substituteAll, 5 + replaceVars, 6 6 binutils, 7 7 asciidoctor, 8 8 cmake, ··· 54 54 # Darwin. 55 55 # Additionally, when cross compiling, the correct target prefix 56 56 # needs to be set. 57 - (substituteAll { 58 - src = ./fix-objdump-path.patch; 57 + (replaceVars ./fix-objdump-path.patch { 59 58 objdump = "${binutils.bintools}/bin/${binutils.targetPrefix}objdump"; 60 59 }) 61 60 ];
+2 -3
pkgs/by-name/cm/cmake/package.nix
··· 1 1 { lib 2 2 , stdenv 3 3 , fetchurl 4 - , substituteAll 4 + , replaceVars 5 5 , buildPackages 6 6 , bzip2 7 7 , curlMinimal ··· 75 75 ++ lib.optional stdenv.hostPlatform.isDarwin ./006-darwin-always-set-runtime-c-flag.diff 76 76 # On platforms where ps is not part of stdenv, patch the invocation of ps to use an absolute path. 77 77 ++ lib.optional (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isFreeBSD) ( 78 - substituteAll { 79 - src = ./007-darwin-bsd-ps-abspath.diff; 78 + replaceVars ./007-darwin-bsd-ps-abspath.diff { 80 79 ps = lib.getExe ps; 81 80 }) 82 81 ++ [
+4 -7
pkgs/by-name/fl/flatpak/package.nix
··· 46 46 python3, 47 47 shared-mime-info, 48 48 socat, 49 - substituteAll, 49 + replaceVars, 50 50 systemd, 51 51 testers, 52 52 valgrind, ··· 84 84 patches = [ 85 85 # Hardcode paths used by tests and change test runtime generation to use files from Nix store. 86 86 # https://github.com/flatpak/flatpak/issues/1460 87 - (substituteAll { 88 - src = ./fix-test-paths.patch; 87 + (replaceVars ./fix-test-paths.patch { 89 88 inherit 90 89 coreutils 91 90 gettext ··· 98 97 }) 99 98 100 99 # Hardcode paths used by Flatpak itself. 101 - (substituteAll { 102 - src = ./fix-paths.patch; 100 + (replaceVars ./fix-paths.patch { 103 101 p11kit = "${p11-kit.bin}/bin/p11-kit"; 104 102 }) 105 103 ··· 235 233 ''; 236 234 237 235 passthru = { 238 - icon-validator-patch = substituteAll { 239 - src = ./fix-icon-validation.patch; 236 + icon-validator-patch = replaceVars ./fix-icon-validation.patch { 240 237 inherit (builtins) storeDir; 241 238 }; 242 239
+2 -3
pkgs/by-name/fo/formatter/package.nix
··· 9 9 pkg-config, 10 10 pantheon, 11 11 python3, 12 - substituteAll, 12 + replaceVars, 13 13 glib, 14 14 gtk3, 15 15 dosfstools, ··· 33 33 }; 34 34 35 35 patches = [ 36 - (substituteAll { 37 - src = ./fix-paths.patch; 36 + (replaceVars ./fix-paths.patch { 38 37 ext4 = "${e2fsprogs}/bin/mkfs.ext4"; 39 38 exfat = "${exfat}/bin/mkfs.exfat"; 40 39 fat = "${dosfstools}/bin/mkfs.fat";
+3 -5
pkgs/by-name/gd/gdm/package.nix
··· 3 3 stdenv, 4 4 fetchurl, 5 5 fetchpatch, 6 - substituteAll, 6 + replaceVars, 7 7 meson, 8 8 ninja, 9 9 pkg-config, ··· 35 35 36 36 let 37 37 38 - override = substituteAll { 39 - src = ./org.gnome.login-screen.gschema.override; 38 + override = replaceVars ./org.gnome.login-screen.gschema.override { 40 39 icon = "${nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake-white.svg"; 41 40 }; 42 41 ··· 105 104 }) 106 105 107 106 # Change hardcoded paths to nix store paths. 108 - (substituteAll { 109 - src = ./fix-paths.patch; 107 + (replaceVars ./fix-paths.patch { 110 108 inherit 111 109 coreutils 112 110 plymouth
+2 -3
pkgs/by-name/gl/glib-networking/package.nix
··· 2 2 stdenv, 3 3 lib, 4 4 fetchurl, 5 - substituteAll, 5 + replaceVars, 6 6 meson, 7 7 ninja, 8 8 nixosTests, ··· 33 33 }; 34 34 35 35 patches = [ 36 - (substituteAll { 37 - src = ./hardcode-gsettings.patch; 36 + (replaceVars ./hardcode-gsettings.patch { 38 37 gds_gsettings_path = glib.getSchemaPath gsettings-desktop-schemas; 39 38 }) 40 39
+2 -3
pkgs/by-name/gn/gnome-control-center/package.nix
··· 2 2 fetchurl, 3 3 lib, 4 4 stdenv, 5 - substituteAll, 5 + replaceVars, 6 6 accountsservice, 7 7 adwaita-icon-theme, 8 8 colord, ··· 82 82 }; 83 83 84 84 patches = [ 85 - (substituteAll { 86 - src = ./paths.patch; 85 + (replaceVars ./paths.patch { 87 86 gcm = gnome-color-manager; 88 87 inherit glibc tzdata shadow; 89 88 inherit cups networkmanagerapplet;
+2 -3
pkgs/by-name/gn/gnome-desktop/package.nix
··· 2 2 lib, 3 3 stdenv, 4 4 fetchurl, 5 - substituteAll, 5 + replaceVars, 6 6 pkg-config, 7 7 libxslt, 8 8 ninja, ··· 44 44 }; 45 45 46 46 patches = lib.optionals stdenv.hostPlatform.isLinux [ 47 - (substituteAll { 48 - src = ./bubblewrap-paths.patch; 47 + (replaceVars ./bubblewrap-paths.patch { 49 48 bubblewrap_bin = "${bubblewrap}/bin/bwrap"; 50 49 inherit (builtins) storeDir; 51 50 })
+2 -3
pkgs/by-name/gn/gnome-initial-setup/package.nix
··· 2 2 stdenv, 3 3 lib, 4 4 fetchurl, 5 - substituteAll, 5 + replaceVars, 6 6 dconf, 7 7 gettext, 8 8 meson, ··· 45 45 }; 46 46 47 47 patches = [ 48 - (substituteAll { 49 - src = ./0001-fix-paths.patch; 48 + (replaceVars ./0001-fix-paths.patch { 50 49 inherit tzdata; 51 50 tecla = gnome-tecla; 52 51 })
+2 -3
pkgs/by-name/gn/gnome-pomodoro/package.nix
··· 2 2 lib, 3 3 stdenv, 4 4 fetchFromGitHub, 5 - substituteAll, 5 + replaceVars, 6 6 meson, 7 7 ninja, 8 8 pkg-config, ··· 36 36 patches = [ 37 37 # Our glib setup hooks moves GSettings schemas to a subdirectory to prevent conflicts. 38 38 # We need to patch the build script so that the extension can find them. 39 - (substituteAll { 40 - src = ./fix-schema-path.patch; 39 + (replaceVars ./fix-schema-path.patch { 41 40 inherit pname version; 42 41 }) 43 42 ];
+2 -3
pkgs/by-name/gn/gnome-session/package.nix
··· 2 2 fetchurl, 3 3 lib, 4 4 stdenv, 5 - substituteAll, 5 + replaceVars, 6 6 meson, 7 7 ninja, 8 8 pkg-config, ··· 47 47 }; 48 48 49 49 patches = [ 50 - (substituteAll { 51 - src = ./fix-paths.patch; 50 + (replaceVars ./fix-paths.patch { 52 51 gsettings = "${glib.bin}/bin/gsettings"; 53 52 dbusLaunch = "${dbus.lib}/bin/dbus-launch"; 54 53 bash = "${bash}/bin/bash";
+2 -3
pkgs/by-name/gn/gnome-settings-daemon/package.nix
··· 1 1 { 2 2 stdenv, 3 3 lib, 4 - substituteAll, 4 + replaceVars, 5 5 buildPackages, 6 6 fetchurl, 7 7 meson, ··· 54 54 # https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/merge_requests/202 55 55 ./add-gnome-session-ctl-option.patch 56 56 57 - (substituteAll { 58 - src = ./fix-paths.patch; 57 + (replaceVars ./fix-paths.patch { 59 58 inherit tzdata; 60 59 }) 61 60 ];
+2 -3
pkgs/by-name/gn/gnome-settings-daemon46/package.nix
··· 1 1 { 2 2 stdenv, 3 3 lib, 4 - substituteAll, 4 + replaceVars, 5 5 fetchurl, 6 6 meson, 7 7 ninja, ··· 51 51 # https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/merge_requests/202 52 52 ./add-gnome-session-ctl-option.patch 53 53 54 - (substituteAll { 55 - src = ./fix-paths.patch; 54 + (replaceVars ./fix-paths.patch { 56 55 inherit tzdata; 57 56 }) 58 57 ];
+3 -5
pkgs/by-name/gn/gnome-shell-extensions/package.nix
··· 10 10 glib, 11 11 gnome, 12 12 gnome-menus, 13 - substituteAll, 13 + replaceVars, 14 14 }: 15 15 16 16 stdenv.mkDerivation (finalAttrs: { ··· 23 23 }; 24 24 25 25 patches = [ 26 - (substituteAll { 27 - src = ./fix_gmenu.patch; 26 + (replaceVars ./fix_gmenu.patch { 28 27 gmenu_path = "${gnome-menus}/lib/girepository-1.0"; 29 28 }) 30 - (substituteAll { 31 - src = ./fix_gtop.patch; 29 + (replaceVars ./fix_gtop.patch { 32 30 gtop_path = "${libgtop}/lib/girepository-1.0"; 33 31 }) 34 32 ];
+2 -3
pkgs/by-name/gn/gnome-shell/package.nix
··· 1 1 { 2 2 fetchurl, 3 3 fetchpatch, 4 - substituteAll, 4 + replaceVars, 5 5 lib, 6 6 stdenv, 7 7 docutils, ··· 84 84 85 85 patches = [ 86 86 # Hardcode paths to various dependencies so that they can be found at runtime. 87 - (substituteAll { 88 - src = ./fix-paths.patch; 87 + (replaceVars ./fix-paths.patch { 89 88 glib_compile_schemas = "${glib.dev}/bin/glib-compile-schemas"; 90 89 gsettings = "${glib.bin}/bin/gsettings"; 91 90 tecla = "${lib.getBin gnome-tecla}/bin/tecla";
+2 -3
pkgs/by-name/gn/gnome-software/package.nix
··· 2 2 lib, 3 3 stdenv, 4 4 fetchurl, 5 - substituteAll, 5 + replaceVars, 6 6 pkg-config, 7 7 meson, 8 8 ninja, ··· 56 56 }; 57 57 58 58 patches = [ 59 - (substituteAll { 60 - src = ./fix-paths.patch; 59 + (replaceVars ./fix-paths.patch { 61 60 inherit isocodes; 62 61 }) 63 62 ];
+2 -3
pkgs/by-name/go/google-cloud-cpp/package.nix
··· 2 2 lib, 3 3 stdenv, 4 4 fetchFromGitHub, 5 - substituteAll, 5 + replaceVars, 6 6 c-ares, 7 7 cmake, 8 8 crc32c, ··· 43 43 }; 44 44 45 45 patches = [ 46 - (substituteAll { 47 - src = ./hardcode-googleapis-path.patch; 46 + (replaceVars ./hardcode-googleapis-path.patch { 48 47 url = googleapis; 49 48 }) 50 49 ];
+2 -3
pkgs/by-name/gp/gparted/package.nix
··· 20 20 util-linux, 21 21 polkit, 22 22 wrapGAppsHook3, 23 - substituteAll, 23 + replaceVars, 24 24 mtools, 25 25 dosfstools, 26 26 xhost, ··· 39 39 # however the binary won't be suid so it returns 40 40 # an error preventing the program from detection 41 41 patches = [ 42 - (substituteAll { 43 - src = ./polkit.patch; 42 + (replaceVars ./polkit.patch { 44 43 polkit_version = polkit.version; 45 44 }) 46 45 ];
+2 -3
pkgs/by-name/gu/gusb/package.nix
··· 2 2 lib, 3 3 stdenv, 4 4 fetchFromGitHub, 5 - substituteAll, 5 + replaceVars, 6 6 meson, 7 7 ninja, 8 8 pkg-config, ··· 46 46 }; 47 47 48 48 patches = [ 49 - (substituteAll { 50 - src = ./fix-python-path.patch; 49 + (replaceVars ./fix-python-path.patch { 51 50 python = "${pythonEnv}/bin/python3"; 52 51 }) 53 52 ];
+2 -3
pkgs/by-name/gv/gvfs/package.nix
··· 5 5 meson, 6 6 ninja, 7 7 pkg-config, 8 - substituteAll, 8 + replaceVars, 9 9 gettext, 10 10 dbus, 11 11 glib, ··· 55 55 }; 56 56 57 57 patches = [ 58 - (substituteAll { 59 - src = ./hardcode-ssh-path.patch; 58 + (replaceVars ./hardcode-ssh-path.patch { 60 59 ssh_program = "${lib.getBin openssh}/bin/ssh"; 61 60 }) 62 61 ];
+4 -7
pkgs/by-name/ha/hare/package.nix
··· 6 6 scdoc, 7 7 tzdata, 8 8 mailcap, 9 - substituteAll, 9 + replaceVars, 10 10 callPackage, 11 11 enableCrossCompilation ? (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.is64bit), 12 12 pkgsCross, ··· 92 92 93 93 patches = [ 94 94 # Replace FHS paths with nix store 95 - (substituteAll { 96 - src = ./001-tzdata.patch; 95 + (replaceVars ./001-tzdata.patch { 97 96 inherit tzdata; 98 97 }) 99 98 # Don't build haredoc since it uses the build `hare` bin, which breaks 100 99 # cross-compilation. 101 100 ./002-dont-build-haredoc.patch 102 101 # Hardcode harec and qbe. 103 - (substituteAll { 104 - src = ./003-hardcode-qbe-and-harec.patch; 102 + (replaceVars ./003-hardcode-qbe-and-harec.patch { 105 103 harec_bin = lib.getExe harec; 106 104 qbe_bin = lib.getExe qbe; 107 105 }) 108 106 # Use mailcap `/etc/mime.types` for Hare's mime module 109 - (substituteAll { 110 - src = ./004-use-mailcap-for-mimetypes.patch; 107 + (replaceVars ./004-use-mailcap-for-mimetypes.patch { 111 108 inherit mailcap; 112 109 }) 113 110 ];
+2 -3
pkgs/by-name/ha/haredo/package.nix
··· 7 7 nix-update-script, 8 8 makeWrapper, 9 9 bash, 10 - substituteAll, 10 + replaceVars, 11 11 }: 12 12 stdenv.mkDerivation (finalAttrs: { 13 13 pname = "haredo"; ··· 27 27 28 28 patches = [ 29 29 # Use nix store's bash instead of sh. `@bash@/bin/sh` is used, since haredo expects a posix shell. 30 - (substituteAll { 31 - src = ./001-use-nix-store-sh.patch; 30 + (replaceVars ./001-use-nix-store-sh.patch { 32 31 inherit bash; 33 32 }) 34 33 ];
+2 -3
pkgs/by-name/ho/howard-hinnant-date/package.nix
··· 1 - { lib, stdenv, fetchFromGitHub, cmake, tzdata, fetchpatch, substituteAll }: 1 + { lib, stdenv, fetchFromGitHub, cmake, tzdata, fetchpatch, replaceVars }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 pname = "howard-hinnant-date"; ··· 22 22 # Without this patch, this library will drop a `tzdata` directory into 23 23 # `~/Downloads` if it cannot find `/usr/share/zoneinfo`. Make the path it 24 24 # searches for `zoneinfo` be the one from the `tzdata` package. 25 - (substituteAll { 26 - src = ./make-zoneinfo-available.diff; 25 + (replaceVars ./make-zoneinfo-available.diff { 27 26 inherit tzdata; 28 27 }) 29 28 ];
+2 -3
pkgs/by-name/in/iniparser/package.nix
··· 3 3 stdenv, 4 4 fetchFromGitLab, 5 5 fetchFromGitHub, 6 - substituteAll, 6 + replaceVars, 7 7 symlinkJoin, 8 8 cmake, 9 9 doxygen, ··· 24 24 }; 25 25 26 26 patches = lib.optionals finalAttrs.finalPackage.doCheck [ 27 - (substituteAll { 27 + (replaceVars ./remove-fetchcontent-usage.patch { 28 28 # Do not let cmake's fetchContent download unity 29 - src = ./remove-fetchcontent-usage.patch; 30 29 unitySrc = symlinkJoin { 31 30 name = "unity-with-iniparser-config"; 32 31 paths = [
+2 -3
pkgs/by-name/is/isc-cron/package.nix
··· 2 2 lib, 3 3 fetchurl, 4 4 stdenv, 5 - substituteAll, 5 + replaceVars, 6 6 vim, 7 7 sendmailPath ? "/usr/sbin/sendmail", 8 8 }: ··· 17 17 }; 18 18 19 19 patches = [ 20 - (substituteAll { 21 - src = ./0000-nixpkgs-specific.diff; 20 + (replaceVars ./0000-nixpkgs-specific.diff { 22 21 inherit sendmailPath; 23 22 viPath = lib.getExe' vim "vim"; 24 23 defPath = lib.concatStringsSep ":" [
+2 -3
pkgs/by-name/jo/john/package.nix
··· 19 19 ocl-icd, 20 20 # include non-free ClamAV unrar code 21 21 enableUnfree ? false, 22 - substituteAll, 22 + replaceVars, 23 23 makeWrapper, 24 24 }: 25 25 ··· 35 35 }; 36 36 37 37 patches = lib.optionals withOpenCL [ 38 - (substituteAll { 39 - src = ./opencl.patch; 38 + (replaceVars ./opencl.patch { 40 39 ocl_icd = ocl-icd; 41 40 }) 42 41 ];
+2 -3
pkgs/by-name/ke/keepass/package.nix
··· 6 6 mono, 7 7 makeWrapper, 8 8 icoutils, 9 - substituteAll, 9 + replaceVars, 10 10 xsel, 11 11 xorg, 12 12 xdotool, ··· 37 37 buildInputs = [ icoutils ]; 38 38 39 39 patches = [ 40 - (substituteAll { 41 - src = ./fix-paths.patch; 40 + (replaceVars ./fix-paths.patch { 42 41 xsel = "${xsel}/bin/xsel"; 43 42 xprop = "${xorg.xprop}/bin/xprop"; 44 43 xdotool = "${xdotool}/bin/xdotool";
+2 -3
pkgs/by-name/la/lalrpop/package.nix
··· 2 2 lib, 3 3 rustPlatform, 4 4 fetchFromGitHub, 5 - substituteAll, 5 + replaceVars, 6 6 stdenv, 7 7 }: 8 8 ··· 20 20 cargoHash = "sha256-zkPLas+fQQzm7LlWNpTooUR/e30KMS9OET6PMwQ2yAA="; 21 21 22 22 patches = [ 23 - (substituteAll { 24 - src = ./use-correct-binary-path-in-tests.patch; 23 + (replaceVars ./use-correct-binary-path-in-tests.patch { 25 24 target_triple = stdenv.hostPlatform.rust.rustcTarget; 26 25 }) 27 26 ];
+2 -3
pkgs/by-name/li/libosinfo/package.nix
··· 19 19 perl, 20 20 hwdata, 21 21 osinfo-db, 22 - substituteAll, 22 + replaceVars, 23 23 vala ? null, 24 24 }: 25 25 ··· 61 61 ]; 62 62 63 63 patches = [ 64 - (substituteAll { 65 - src = ./osinfo-db-data-dir.patch; 64 + (replaceVars ./osinfo-db-data-dir.patch { 66 65 osinfo_db_data_dir = "${osinfo-db}/share"; 67 66 }) 68 67
+2 -3
pkgs/by-name/me/metacity/package.nix
··· 13 13 libstartup_notification, 14 14 libxml2, 15 15 pkg-config, 16 - substituteAll, 16 + replaceVars, 17 17 wrapGAppsHook3, 18 18 zenity, 19 19 }: ··· 28 28 }; 29 29 30 30 patches = [ 31 - (substituteAll { 32 - src = ./fix-paths.patch; 31 + (replaceVars ./fix-paths.patch { 33 32 inherit zenity; 34 33 }) 35 34 ];
+2 -3
pkgs/by-name/mi/minigalaxy/package.nix
··· 8 8 libnotify, 9 9 python3Packages, 10 10 steam-run, 11 - substituteAll, 11 + replaceVars, 12 12 unzip, 13 13 webkitgtk_4_0, 14 14 wrapGAppsHook3, ··· 26 26 }; 27 27 28 28 patches = [ 29 - (substituteAll { 30 - src = ./inject-launcher-steam-run.diff; 29 + (replaceVars ./inject-launcher-steam-run.diff { 31 30 steamrun = lib.getExe steam-run; 32 31 }) 33 32 ];
+2 -3
pkgs/by-name/mi/mirakurun/package.nix
··· 7 7 installShellFiles, 8 8 makeWrapper, 9 9 nodejs, 10 - substituteAll, 10 + replaceVars, 11 11 v4l-utils, 12 12 which, 13 13 }: ··· 46 46 nodejs 47 47 which 48 48 ] ++ lib.optionals stdenv.hostPlatform.isLinux [ v4l-utils ]; 49 - crc32Patch = substituteAll { 50 - src = ./fix-musl-detection.patch; 49 + crc32Patch = replaceVars ./fix-musl-detection.patch { 51 50 isMusl = if stdenv.hostPlatform.isMusl then "true" else "false"; 52 51 }; 53 52 in
+2 -3
pkgs/by-name/mu/muffin/package.nix
··· 2 2 stdenv, 3 3 lib, 4 4 fetchFromGitHub, 5 - substituteAll, 5 + replaceVars, 6 6 cairo, 7 7 cinnamon-desktop, 8 8 dbus, ··· 58 58 }; 59 59 60 60 patches = [ 61 - (substituteAll { 62 - src = ./fix-paths.patch; 61 + (replaceVars ./fix-paths.patch { 63 62 inherit zenity; 64 63 }) 65 64 ];
+2 -3
pkgs/by-name/mu/music-assistant/package.nix
··· 4 4 fetchFromGitHub, 5 5 ffmpeg-headless, 6 6 nixosTests, 7 - substituteAll, 7 + replaceVars, 8 8 providers ? [ ], 9 9 }: 10 10 ··· 38 38 }; 39 39 40 40 patches = [ 41 - (substituteAll { 42 - src = ./ffmpeg.patch; 41 + (replaceVars ./ffmpeg.patch { 43 42 ffmpeg = "${lib.getBin ffmpeg-headless}/bin/ffmpeg"; 44 43 ffprobe = "${lib.getBin ffmpeg-headless}/bin/ffprobe"; 45 44 })
+2 -3
pkgs/by-name/na/nautilus-python/package.nix
··· 1 1 { 2 2 stdenv, 3 3 lib, 4 - substituteAll, 4 + replaceVars, 5 5 fetchurl, 6 6 meson, 7 7 ninja, ··· 32 32 33 33 patches = [ 34 34 # Make PyGObject’s gi library available. 35 - (substituteAll { 36 - src = ./fix-paths.patch; 35 + (replaceVars ./fix-paths.patch { 37 36 pythonPaths = lib.concatMapStringsSep ", " (pkg: "'${pkg}/${python3.sitePackages}'") [ 38 37 python3.pkgs.pygobject3 39 38 ];
+2 -3
pkgs/by-name/nu/nut/package.nix
··· 17 17 net-snmp, 18 18 openssl, 19 19 pkg-config, 20 - substituteAll, 20 + replaceVars, 21 21 systemd, 22 22 udev, 23 23 gnused, ··· 40 40 # trying to install directly into /etc/nut which predictably fails 41 41 ./nutshutdown-conf-default.patch 42 42 43 - (substituteAll { 44 - src = ./hardcode-paths.patch; 43 + (replaceVars ./hardcode-paths.patch { 45 44 avahi = "${avahi}/lib"; 46 45 freeipmi = "${freeipmi}/lib"; 47 46 libgpiod = "${libgpiod_1}/lib";
+3 -5
pkgs/by-name/oc/octoprint/package.nix
··· 6 6 fetchFromGitHub, 7 7 fetchPypi, 8 8 python3, 9 - substituteAll, 9 + replaceVars, 10 10 nix-update-script, 11 11 nixosTests, 12 12 # To include additional plugins, pass them here as an overlay. ··· 194 194 195 195 patches = [ 196 196 # substitute pip and let it find out, that it can't write anywhere 197 - (substituteAll { 198 - src = ./pip-path.patch; 197 + (replaceVars ./pip-path.patch { 199 198 pip = "${self.pip}/bin/pip"; 200 199 }) 201 200 202 201 # hardcore path to ffmpeg and hide related settings 203 - (substituteAll { 204 - src = ./ffmpeg-path.patch; 202 + (replaceVars ./ffmpeg-path.patch { 205 203 ffmpeg = "${pkgs.ffmpeg}/bin/ffmpeg"; 206 204 }) 207 205 ];
+2 -3
pkgs/by-name/on/onboard/package.nix
··· 3 3 fetchpatch, 4 4 stdenv, 5 5 lib, 6 - substituteAll, 6 + replaceVars, 7 7 aspellWithDicts, 8 8 at-spi2-core ? null, 9 9 atspiSupport ? true, ··· 51 51 }; 52 52 53 53 patches = [ 54 - (substituteAll { 55 - src = ./fix-paths.patch; 54 + (replaceVars ./fix-paths.patch { 56 55 inherit mousetweaks; 57 56 }) 58 57 # Allow loading hunspell dictionaries installed in NixOS system path
+2 -3
pkgs/by-name/or/orca/package.nix
··· 12 12 python3, 13 13 gtk3, 14 14 gnome, 15 - substituteAll, 15 + replaceVars, 16 16 at-spi2-atk, 17 17 at-spi2-core, 18 18 dbus, ··· 39 39 }; 40 40 41 41 patches = [ 42 - (substituteAll { 43 - src = ./fix-paths.patch; 42 + (replaceVars ./fix-paths.patch { 44 43 cat = "${coreutils}/bin/cat"; 45 44 lsof = "${lsof}/bin/lsof"; 46 45 pgrep = "${procps}/bin/pgrep";
+3 -5
pkgs/by-name/pa/patchPpdFilesHook/test.nix
··· 1 1 { 2 - substituteAll, 2 + replaceVars, 3 3 diffutils, 4 4 stdenv, 5 5 patchPpdFilesHook, 6 6 }: 7 7 8 8 let 9 - input = substituteAll { 10 - src = ./test.ppd; 9 + input = replaceVars ./test.ppd { 11 10 keep = "cmp"; 12 11 patch = "cmp"; 13 12 pathkeep = "/bin/cmp"; 14 13 pathpatch = "/bin/cmp"; 15 14 }; 16 15 17 - output = substituteAll { 18 - src = ./test.ppd; 16 + output = replaceVars ./test.ppd { 19 17 keep = "cmp"; 20 18 patch = "${diffutils}/bin/cmp"; 21 19 pathkeep = "/bin/cmp";
+2 -3
pkgs/by-name/pl/plymouth/package.nix
··· 3 3 stdenv, 4 4 fetchFromGitLab, 5 5 writeText, 6 - substituteAll, 6 + replaceVars, 7 7 meson, 8 8 pkg-config, 9 9 ninja, ··· 44 44 # add support for loading plugins from /run to assist NixOS module 45 45 ./add-runtime-plugin-path.patch 46 46 # fix FHS hardcoded paths 47 - (substituteAll { 48 - src = ./fix-paths.patch; 47 + (replaceVars ./fix-paths.patch { 49 48 fcmatch = "${fontconfig}/bin/fc-match"; 50 49 }) 51 50 ];
+2 -3
pkgs/by-name/po/podman/package.nix
··· 19 19 makeWrapper, 20 20 runtimeShell, 21 21 symlinkJoin, 22 - substituteAll, 22 + replaceVars, 23 23 extraPackages ? [ ], 24 24 crun, 25 25 runc, ··· 85 85 }; 86 86 87 87 patches = [ 88 - (substituteAll { 89 - src = ./hardcode-paths.patch; 88 + (replaceVars ./hardcode-paths.patch { 90 89 bin_path = helpersBin; 91 90 }) 92 91
+2 -3
pkgs/by-name/pr/pretix/plugins/passbook.nix
··· 2 2 lib, 3 3 buildPythonPackage, 4 4 fetchFromGitHub, 5 - substituteAll, 5 + replaceVars, 6 6 7 7 # build-system 8 8 pretix-plugin-build, ··· 29 29 }; 30 30 31 31 patches = [ 32 - (substituteAll { 33 - src = ./passbook-openssl.patch; 32 + (replaceVars ./passbook-openssl.patch { 34 33 openssl = lib.getExe openssl; 35 34 }) 36 35 ];
+2 -3
pkgs/by-name/st/streamlink/package.nix
··· 2 2 lib, 3 3 python3Packages, 4 4 fetchPypi, 5 - substituteAll, 5 + replaceVars, 6 6 ffmpeg, 7 7 }: 8 8 ··· 17 17 }; 18 18 19 19 patches = [ 20 - (substituteAll { 21 - src = ./ffmpeg-path.patch; 20 + (replaceVars ./ffmpeg-path.patch { 22 21 ffmpeg = lib.getExe ffmpeg; 23 22 }) 24 23 ];
+2 -3
pkgs/by-name/sw/sway-unwrapped/package.nix
··· 1 - { lib, stdenv, fetchFromGitHub, fetchpatch, substituteAll, swaybg 1 + { lib, stdenv, fetchFromGitHub, fetchpatch, replaceVars, swaybg 2 2 , meson, ninja, pkg-config, wayland-scanner, scdoc 3 3 , libGL, wayland, libxkbcommon, pcre2, json_c, libevdev 4 4 , pango, cairo, libinput, gdk-pixbuf, librsvg ··· 26 26 patches = [ 27 27 ./load-configuration-from-etc.patch 28 28 29 - (substituteAll { 30 - src = ./fix-paths.patch; 29 + (replaceVars ./fix-paths.patch { 31 30 inherit swaybg; 32 31 }) 33 32
+2 -3
pkgs/by-name/sw/swayfx-unwrapped/package.nix
··· 4 4 stdenv, 5 5 systemd, 6 6 meson, 7 - substituteAll, 7 + replaceVars, 8 8 swaybg, 9 9 ninja, 10 10 pkg-config, ··· 57 57 [ 58 58 ./load-configuration-from-etc.patch 59 59 60 - (substituteAll { 61 - src = ./fix-paths.patch; 60 + (replaceVars ./fix-paths.patch { 62 61 inherit swaybg; 63 62 }) 64 63 ]
+2 -3
pkgs/by-name/um/umockdev/package.nix
··· 13 13 ninja, 14 14 pkg-config, 15 15 python3, 16 - substituteAll, 16 + replaceVars, 17 17 systemdMinimal, 18 18 usbutils, 19 19 vala, ··· 44 44 # Replace references to udevadm with an absolute paths, so programs using 45 45 # umockdev will just work without having to provide it in their test environment 46 46 # $PATH. 47 - (substituteAll { 48 - src = ./substitute-udevadm.patch; 47 + (replaceVars ./substitute-udevadm.patch { 49 48 udevadm = "${systemdMinimal}/bin/udevadm"; 50 49 }) 51 50 ];
+2 -3
pkgs/by-name/xs/xscreensaver/package.nix
··· 29 29 forceInstallAllHacks ? true, 30 30 withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd, 31 31 nixosTests, 32 - substituteAll, 32 + replaceVars, 33 33 wrapperPrefix ? "/run/wrappers/bin", 34 34 }: 35 35 ··· 83 83 ''; 84 84 85 85 patches = [ 86 - (substituteAll { 87 - src = ./xscreensaver-wrapper-prefix.patch; 86 + (replaceVars ./xscreensaver-wrapper-prefix.patch { 88 87 inherit wrapperPrefix; 89 88 }) 90 89 ];