0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 06:00:33 +03:00

treewide: replace substituteAll with replaceVars

This commit is contained in:
Wolfgang Walther 2025-01-25 16:28:57 +01:00
parent 2e43b87c62
commit b19d0f6d3d
No known key found for this signature in database
GPG key ID: B39893FA5F65CAE1
175 changed files with 444 additions and 608 deletions

View file

@ -16,8 +16,7 @@
# copy the config for nixos-rebuild # copy the config for nixos-rebuild
system.activationScripts.config = system.activationScripts.config =
let let
config = pkgs.substituteAll { config = pkgs.replaceVars ./incus-container-image-inner.nix {
src = ./incus-container-image-inner.nix;
stateVersion = lib.trivial.release; stateVersion = lib.trivial.release;
}; };
in in

View file

@ -16,8 +16,7 @@
# copy the config for nixos-rebuild # copy the config for nixos-rebuild
system.activationScripts.config = system.activationScripts.config =
let let
config = pkgs.substituteAll { config = pkgs.replaceVars ./incus-virtual-machine-image-inner.nix {
src = ./incus-virtual-machine-image-inner.nix;
stateVersion = lib.trivial.release; stateVersion = lib.trivial.release;
}; };
in in

View file

@ -18,8 +18,7 @@
# copy the config for nixos-rebuild # copy the config for nixos-rebuild
system.activationScripts.config = system.activationScripts.config =
let let
config = pkgs.substituteAll { config = pkgs.replaceVars ./lxd-container-image-inner.nix {
src = ./lxd-container-image-inner.nix;
stateVersion = lib.trivial.release; stateVersion = lib.trivial.release;
}; };
in in

View file

@ -18,8 +18,7 @@
# copy the config for nixos-rebuild # copy the config for nixos-rebuild
system.activationScripts.config = system.activationScripts.config =
let let
config = pkgs.substituteAll { config = pkgs.replaceVars ./lxd-virtual-machine-image-inner.nix {
src = ./lxd-virtual-machine-image-inner.nix;
stateVersion = lib.trivial.release; stateVersion = lib.trivial.release;
}; };
in in

View file

@ -832,11 +832,7 @@ in
{ source = config.isoImage.splashImage; { source = config.isoImage.splashImage;
target = "/isolinux/background.png"; target = "/isolinux/background.png";
} }
{ source = pkgs.substituteAll { { source = isolinuxCfg;
name = "isolinux.cfg";
src = pkgs.writeText "isolinux.cfg-in" isolinuxCfg;
bootRoot = "/boot";
};
target = "/isolinux/isolinux.cfg"; target = "/isolinux/isolinux.cfg";
} }
{ source = "${pkgs.syslinux}/share/syslinux"; { source = "${pkgs.syslinux}/share/syslinux";

View file

@ -142,8 +142,7 @@ let
src = pkgs.runCommand "nixos-taskserver-src" { preferLocalBuild = true; } '' src = pkgs.runCommand "nixos-taskserver-src" { preferLocalBuild = true; } ''
mkdir -p "$out" mkdir -p "$out"
cat "${ cat "${
pkgs.substituteAll { pkgs.replaceVars ./helper-tool.py {
src = ./helper-tool.py;
inherit taskd certtool; inherit taskd certtool;
inherit (cfg) inherit (cfg)
dataDir dataDir

View file

@ -727,11 +727,13 @@ in
system.build.installBootLoader = system.build.installBootLoader =
let let
install-grub-pl = pkgs.substituteAll { install-grub-pl = pkgs.replaceVars ./install-grub.pl {
src = ./install-grub.pl;
utillinux = pkgs.util-linux; utillinux = pkgs.util-linux;
btrfsprogs = pkgs.btrfs-progs; btrfsprogs = pkgs.btrfs-progs;
inherit (config.system.nixos) distroName; inherit (config.system.nixos) distroName;
# targets of a replacement in code
bootPath = null;
bootRoot = null;
}; };
perl = pkgs.perl.withPackages (p: with p; [ perl = pkgs.perl.withPackages (p: with p; [
FileSlurp FileCopyRecursive FileSlurp FileCopyRecursive

View file

@ -185,7 +185,6 @@ mkDerivation (finalAttrs: {
./native-comp-driver-options-30.patch ./native-comp-driver-options-30.patch
) )
{ {
backendPath = ( backendPath = (
lib.concatStringsSep " " ( lib.concatStringsSep " " (
builtins.map (x: ''"-B${x}"'') ( builtins.map (x: ''"-B${x}"'') (

View file

@ -1,7 +1,7 @@
{ {
lib, lib,
stdenv, stdenv,
substituteAll, replaceVars,
autoreconfHook, autoreconfHook,
pkg-config, pkg-config,
fetchurl, fetchurl,
@ -34,9 +34,10 @@ stdenv.mkDerivation {
strictDeps = true; strictDeps = true;
patches = [ patches = [
(substituteAll { (replaceVars ./fix-cli-paths.patch {
src = ./fix-cli-paths.patch;
inherit dropboxd; inherit dropboxd;
# patch context
DESKTOP_FILE_DIR = null;
}) })
]; ];

View file

@ -150,7 +150,7 @@ let
}; };
# replace @dir@ in the path of the given list of patches # replace @dir@ in the path of the given list of patches
fixupPatches = dir: map (patch: replaceVars patch { dir = dir; }); fixupPatches = dir: map (patch: replaceVars patch { inherit dir; });
in in
{ {
z3_4_13 = common { z3_4_13 = common {

View file

@ -11,7 +11,7 @@
nlohmann_json, nlohmann_json,
qt5, qt5,
spdlog, spdlog,
substituteAll, replaceVars,
buildDayZLauncher ? false, buildDayZLauncher ? false,
}: }:
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
@ -27,8 +27,7 @@ stdenv.mkDerivation (finalAttrs: {
patches = [ patches = [
# prevent CMake from trying to get libraries on the internet # prevent CMake from trying to get libraries on the internet
(substituteAll { (replaceVars ./dont_fetch_dependencies.patch {
src = ./dont_fetch_dependencies.patch;
argparse_src = fetchFromGitHub { argparse_src = fetchFromGitHub {
owner = "p-ranav"; owner = "p-ranav";
repo = "argparse"; repo = "argparse";

View file

@ -4,7 +4,7 @@
fetchFromGitLab, fetchFromGitLab,
go-md2man, go-md2man,
coreutils, coreutils,
substituteAll, replaceVars,
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -19,9 +19,10 @@ stdenv.mkDerivation rec {
}; };
patches = [ patches = [
(substituteAll { (replaceVars ./udev-rule.patch {
src = ./udev-rule.patch;
inherit coreutils; inherit coreutils;
# patch context
group = null;
}) })
]; ];

View file

@ -2,7 +2,7 @@
lib, lib,
stdenv, stdenv,
fetchFromGitHub, fetchFromGitHub,
substituteAll, replaceVars,
accountsservice, accountsservice,
adwaita-icon-theme, adwaita-icon-theme,
budgie-desktop, budgie-desktop,
@ -81,13 +81,11 @@ stdenv.mkDerivation (finalAttrs: {
}; };
patches = [ patches = [
(substituteAll { (replaceVars ./paths.patch {
src = ./paths.patch;
budgie_desktop = budgie-desktop; budgie_desktop = budgie-desktop;
gcm = gnome-color-manager; gcm = gnome-color-manager;
inherit inherit
cups cups
glibc
libgnomekbd libgnomekbd
shadow shadow
; ;

View file

@ -17,7 +17,7 @@ index 2c1289a..8128362 100644
download_project(PROJ cudd download_project(PROJ cudd
- URL https://sourceforge.net/projects/cudd-mirror/files/cudd-3.0.0.tar.gz/download - URL https://sourceforge.net/projects/cudd-mirror/files/cudd-3.0.0.tar.gz/download
- URL_MD5 4fdafe4924b81648b908881c81fe6c30 - URL_MD5 4fdafe4924b81648b908881c81fe6c30
+ SOURCE_DIR @cudd.src@ + SOURCE_DIR @cudd@
) )
if(NOT EXISTS ${cudd_SOURCE_DIR}/Makefile) if(NOT EXISTS ${cudd_SOURCE_DIR}/Makefile)

View file

@ -8,7 +8,7 @@
flex, flex,
makeWrapper, makeWrapper,
perl, perl,
substituteAll, replaceVars,
cudd, cudd,
nix-update-script, nix-update-script,
fetchpatch, fetchpatch,
@ -47,9 +47,8 @@ stdenv.mkDerivation (finalAttrs: {
]; ];
patches = [ patches = [
(substituteAll { (replaceVars ./0001-Do-not-download-sources-in-cmake.patch {
src = ./0001-Do-not-download-sources-in-cmake.patch; cudd = cudd.src;
inherit cudd;
}) })
./0002-Do-not-download-sources-in-cmake.patch ./0002-Do-not-download-sources-in-cmake.patch
# Fixes build with libc++ >= 19 due to the removal of std::char_traits<unsigned>. # Fixes build with libc++ >= 19 due to the removal of std::char_traits<unsigned>.

View file

@ -5,7 +5,7 @@
gnused, gnused,
makeWrapper, makeWrapper,
perlPackages, perlPackages,
substituteAll, replaceVars,
xorg, xorg,
wrapGAppsHook3, wrapGAppsHook3,
gitUpdater, gitUpdater,
@ -23,10 +23,11 @@ perlPackages.buildPerlPackage rec {
}; };
patches = [ patches = [
(substituteAll { (replaceVars ./0001-Fix-paths.patch {
src = ./0001-Fix-paths.patch;
xmessage = xorg.xmessage; xmessage = xorg.xmessage;
inherit fluxbox gnused; inherit fluxbox gnused;
# replaced in postPatch
fbmenugen = null;
}) })
]; ];

View file

@ -8,7 +8,7 @@
gradle_8, gradle_8,
bash, bash,
coreutils, coreutils,
substituteAll, replaceVars,
nixosTests, nixosTests,
writeText, writeText,
}: }:
@ -50,14 +50,15 @@ stdenv.mkDerivation rec {
jdk jdk
]; ];
wrapper = substituteAll { wrapper = replaceVars ./freenetWrapper {
src = ./freenetWrapper;
inherit inherit
bash bash
coreutils coreutils
jre jre
seednodes seednodes
; ;
# replaced in installPhase
CLASSPATH = null;
}; };
mitmCache = gradle.fetchDeps { mitmCache = gradle.fetchDeps {

View file

@ -27,7 +27,6 @@ stdenv.mkDerivation (finalAttrs: {
(replaceVars ./remove-fetchcontent-usage.patch { (replaceVars ./remove-fetchcontent-usage.patch {
# Do not let cmake's fetchContent download unity # Do not let cmake's fetchContent download unity
unitySrc = symlinkJoin { unitySrc = symlinkJoin {
name = "unity-with-iniparser-config";
paths = [ paths = [
(fetchFromGitHub { (fetchFromGitHub {
owner = "throwtheswitch"; owner = "throwtheswitch";

View file

@ -12,7 +12,7 @@
ninja, ninja,
pkg-config, pkg-config,
python3, python3,
substituteAll, replaceVars,
zlib, zlib,
}: }:
@ -46,8 +46,7 @@ python3.pkgs.buildPythonApplication rec {
# are not as predictable, therefore we need to keep them in the RPATH. # are not as predictable, therefore we need to keep them in the RPATH.
# At the moment we are keeping the paths starting with /nix/store. # At the moment we are keeping the paths starting with /nix/store.
# https://github.com/NixOS/nixpkgs/issues/31222#issuecomment-365811634 # https://github.com/NixOS/nixpkgs/issues/31222#issuecomment-365811634
(substituteAll { (replaceVars ./001-fix-rpath.patch {
src = ./001-fix-rpath.patch;
inherit (builtins) storeDir; inherit (builtins) storeDir;
}) })

View file

@ -1,7 +1,7 @@
{ {
lib, lib,
runtimeShell, runtimeShell,
substituteAll, replaceVarsWith,
nix, nix,
coreutils, coreutils,
jq, jq,
@ -12,13 +12,14 @@
cacert, cacert,
}: }:
substituteAll { replaceVarsWith {
name = "nuget-to-json"; name = "nuget-to-json";
dir = "bin"; dir = "bin";
src = ./nuget-to-json.sh; src = ./nuget-to-json.sh;
isExecutable = true; isExecutable = true;
replacements = {
inherit runtimeShell cacert; inherit runtimeShell cacert;
binPath = lib.makeBinPath [ binPath = lib.makeBinPath [
nix nix
@ -29,6 +30,7 @@ substituteAll {
gnugrep gnugrep
gawk gawk
]; ];
};
meta = { meta = {
description = "Convert a nuget packages directory to a lockfile for buildDotnetModule"; description = "Convert a nuget packages directory to a lockfile for buildDotnetModule";

View file

@ -1,7 +1,7 @@
{ {
lib, lib,
runtimeShell, runtimeShell,
substituteAll, replaceVarsWith,
nix, nix,
coreutils, coreutils,
jq, jq,
@ -13,13 +13,14 @@
cacert, cacert,
}: }:
substituteAll { replaceVarsWith {
name = "nuget-to-nix"; name = "nuget-to-nix";
dir = "bin"; dir = "bin";
src = ./nuget-to-nix.sh; src = ./nuget-to-nix.sh;
isExecutable = true; isExecutable = true;
replacements = {
inherit runtimeShell cacert; inherit runtimeShell cacert;
binPath = lib.makeBinPath [ binPath = lib.makeBinPath [
nix nix
@ -31,6 +32,7 @@ substituteAll {
gawk gawk
nuget-to-json nuget-to-json
]; ];
};
meta = { meta = {
description = "Convert a nuget packages directory to a lockfile for buildDotnetModule"; description = "Convert a nuget packages directory to a lockfile for buildDotnetModule";

View file

@ -1,7 +1,7 @@
{ {
stdenv, stdenv,
lib, lib,
substituteAll, replaceVars,
pkg-config, pkg-config,
fetchurl, fetchurl,
python3Packages, python3Packages,
@ -47,16 +47,16 @@ stdenv.mkDerivation rec {
patches = patches =
[ [
(substituteAll { (replaceVars ./fix-paths.patch {
src = ./fix-paths.patch;
utillinux = util-linux; utillinux = util-linux;
# patch context
bindir = null;
}) })
] ]
++ lib.optionals (withEspeak && espeak.mbrolaSupport) [ ++ lib.optionals (withEspeak && espeak.mbrolaSupport) [
# Replace FHS paths. # Replace FHS paths.
(substituteAll { (replaceVars ./fix-mbrola-paths.patch {
src = ./fix-mbrola-paths.patch; inherit mbrola;
inherit espeak mbrola;
}) })
]; ];

View file

@ -2,7 +2,7 @@
lib, lib,
stdenv, stdenv,
fetchurl, fetchurl,
substituteAll, replaceVars,
fetchpatch, fetchpatch,
meson, meson,
ninja, ninja,
@ -23,8 +23,7 @@ stdenv.mkDerivation rec {
patches = patches =
[ [
(substituteAll { (replaceVars ./fix-paths.patch {
src = ./fix-paths.patch;
inherit hwdata; inherit hwdata;
}) })
] ]

View file

@ -1,7 +1,7 @@
{ {
lib, lib,
stdenv, stdenv,
substituteAll, replaceVars,
fetchurl, fetchurl,
fetchpatch, fetchpatch,
findXMLCatalogs, findXMLCatalogs,
@ -50,8 +50,7 @@ let
}) })
# Add legacy sourceforge.net URIs to the catalog # Add legacy sourceforge.net URIs to the catalog
(substituteAll { (replaceVars ./catalog-legacy-uris.patch {
src = ./catalog-legacy-uris.patch;
inherit legacySuffix suffix version; inherit legacySuffix suffix version;
}) })
] ]

View file

@ -21,7 +21,6 @@
, smartmontools , smartmontools
, replaceVars , replaceVars
, stdenvNoCC , stdenvNoCC
, substituteAll
, touchegg , touchegg
, util-linux , util-linux
, vte , vte
@ -136,8 +135,7 @@ super: lib.trivial.pipe super [
}); });
in { in {
patches = [ patches = [
(substituteAll { (replaceVars ./extensionOverridesPatches/lunarcal_at_ailin.nemui.patch {
src = ./extensionOverridesPatches/lunarcal_at_ailin.nemui.patch;
chinese_calendar_path = chinese-calendar; chinese_calendar_path = chinese-calendar;
}) })
]; ];

View file

@ -1,7 +1,7 @@
{ stdenv { stdenv
, lib , lib
, fetchFromGitHub , fetchFromGitHub
, substituteAll , replaceVars
, openssl , openssl
, gsound , gsound
, meson , meson
@ -35,9 +35,10 @@ stdenv.mkDerivation rec {
patches = [ patches = [
# Make typelibs available in the extension # Make typelibs available in the extension
(substituteAll { (replaceVars ./fix-paths.patch {
src = ./fix-paths.patch;
gapplication = "${glib.bin}/bin/gapplication"; gapplication = "${glib.bin}/bin/gapplication";
# Replaced in postPatch
typelibPath = null;
}) })
# Allow installing installed tests to a separate output # Allow installing installed tests to a separate output

View file

@ -1,7 +1,7 @@
{ {
lib, lib,
stdenv, stdenv,
substituteAll, replaceVars,
fetchFromGitHub, fetchFromGitHub,
taskwarrior2, taskwarrior2,
gettext, gettext,
@ -37,10 +37,8 @@ stdenv.mkDerivation rec {
]; ];
patches = [ patches = [
(substituteAll { (replaceVars ./fix-paths.patch {
src = ./fix-paths.patch;
task = "${taskwarrior2}/bin/task"; task = "${taskwarrior2}/bin/task";
shell = runtimeShell;
}) })
]; ];

View file

@ -3,7 +3,7 @@
lib, lib,
fetchFromGitLab, fetchFromGitLab,
gitUpdater, gitUpdater,
substituteAll, replaceVars,
testers, testers,
dbus-test-runner, dbus-test-runner,
dpkg, dpkg,
@ -63,9 +63,7 @@ stdenv.mkDerivation (finalAttrs: {
patches = [ patches = [
./2001-Mark-problematic-tests.patch ./2001-Mark-problematic-tests.patch
(substituteAll { (replaceVars ./2002-Nixpkgs-versioned-QML-path.patch.in {
src = ./2002-Nixpkgs-versioned-QML-path.patch.in;
name = "2002-Nixpkgs-versioned-QML-path.patch";
qtVersion = lib.versions.major qtbase.version; qtVersion = lib.versions.major qtbase.version;
}) })
]; ];

View file

@ -2,7 +2,7 @@
lib, lib,
stdenv, stdenv,
fetchurl, fetchurl,
substituteAll, replaceVars,
pkg-config, pkg-config,
gobject-introspection, gobject-introspection,
gdk-pixbuf, gdk-pixbuf,
@ -26,9 +26,10 @@ stdenv.mkDerivation rec {
}; };
patches = [ patches = [
(substituteAll { (replaceVars ./fix-cli-paths.patch {
src = ./fix-cli-paths.patch;
inherit dropboxd; inherit dropboxd;
# patch context
DESKTOP_FILE_DIR = null;
}) })
]; ];

View file

@ -4,7 +4,7 @@
, fetchurl , fetchurl
, fetchpatch , fetchpatch
, lib , lib
, substituteAll , replaceVars
# Dependencies # Dependencies
, boehmgc , boehmgc
, coreutils , coreutils
@ -95,8 +95,7 @@ let
}; };
patches = [ patches = [
(substituteAll { (replaceVars ./tzdata.patch {
src = ./tzdata.patch;
inherit tzdata; inherit tzdata;
}) })
] ]

View file

@ -1,12 +1,11 @@
{ {
substituteAll, replaceVars,
callPackage, callPackage,
}: }:
let let
sigtool = callPackage ./sigtool.nix { }; sigtool = callPackage ./sigtool.nix { };
in in
substituteAll { replaceVars ./sign-apphost.proj {
src = ./sign-apphost.proj;
codesign = "${sigtool}/bin/codesign"; codesign = "${sigtool}/bin/codesign";
} }

View file

@ -15,7 +15,7 @@
darwin, darwin,
icu, icu,
lndir, lndir,
substituteAll, replaceVars,
nugetPackageHook, nugetPackageHook,
xmlstarlet, xmlstarlet,
}: }:
@ -42,10 +42,11 @@ stdenvNoCC.mkDerivation (finalAttrs: {
[ [
./dotnet-setup-hook.sh ./dotnet-setup-hook.sh
] ]
++ lib.optional (type == "sdk") (substituteAll { ++ lib.optional (type == "sdk") (
src = ./dotnet-sdk-setup-hook.sh; replaceVars ./dotnet-sdk-setup-hook.sh {
inherit lndir xmlstarlet; inherit lndir xmlstarlet;
}); }
);
propagatedSandboxProfile = toString unwrapped.__propagatedSandboxProfile; propagatedSandboxProfile = toString unwrapped.__propagatedSandboxProfile;

View file

@ -10,7 +10,7 @@
llvmPackages, llvmPackages,
symlinkJoin, symlinkJoin,
makeWrapper, makeWrapper,
substituteAll, replaceVars,
buildNpmPackage, buildNpmPackage,
emscripten, emscripten,
}: }:
@ -57,8 +57,7 @@ stdenv.mkDerivation rec {
]; ];
patches = [ patches = [
(substituteAll { (replaceVars ./0001-emulate-clang-sysroot-include-logic.patch {
src = ./0001-emulate-clang-sysroot-include-logic.patch;
resourceDir = "${llvmEnv}/lib/clang/${lib.versions.major llvmPackages.llvm.version}/"; resourceDir = "${llvmEnv}/lib/clang/${lib.versions.major llvmPackages.llvm.version}/";
}) })
]; ];

View file

@ -3,7 +3,7 @@
stdenv, stdenv,
fetchurl, fetchurl,
tzdata, tzdata,
substituteAll, replaceVars,
iana-etc, iana-etc,
xcbuild, xcbuild,
mailcap, mailcap,
@ -75,20 +75,17 @@ stdenv.mkDerivation (finalAttrs: {
''; '';
patches = [ patches = [
(substituteAll { (replaceVars ./iana-etc-1.17.patch {
src = ./iana-etc-1.17.patch;
iana = iana-etc; iana = iana-etc;
}) })
# Patch the mimetype database location which is missing on NixOS. # Patch the mimetype database location which is missing on NixOS.
# but also allow static binaries built with NixOS to run outside nix # but also allow static binaries built with NixOS to run outside nix
(substituteAll { (replaceVars ./mailcap-1.17.patch {
src = ./mailcap-1.17.patch;
inherit mailcap; inherit mailcap;
}) })
# prepend the nix path to the zoneinfo files but also leave the original value for static binaries # prepend the nix path to the zoneinfo files but also leave the original value for static binaries
# that run outside a nix server # that run outside a nix server
(substituteAll { (replaceVars ./tzdata-1.19.patch {
src = ./tzdata-1.19.patch;
inherit tzdata; inherit tzdata;
}) })
./remove-tools-1.11.patch ./remove-tools-1.11.patch

View file

@ -3,7 +3,7 @@
stdenv, stdenv,
fetchurl, fetchurl,
tzdata, tzdata,
substituteAll, replaceVars,
iana-etc, iana-etc,
xcbuild, xcbuild,
mailcap, mailcap,
@ -75,20 +75,17 @@ stdenv.mkDerivation (finalAttrs: {
''; '';
patches = [ patches = [
(substituteAll { (replaceVars ./iana-etc-1.17.patch {
src = ./iana-etc-1.17.patch;
iana = iana-etc; iana = iana-etc;
}) })
# Patch the mimetype database location which is missing on NixOS. # Patch the mimetype database location which is missing on NixOS.
# but also allow static binaries built with NixOS to run outside nix # but also allow static binaries built with NixOS to run outside nix
(substituteAll { (replaceVars ./mailcap-1.17.patch {
src = ./mailcap-1.17.patch;
inherit mailcap; inherit mailcap;
}) })
# prepend the nix path to the zoneinfo files but also leave the original value for static binaries # prepend the nix path to the zoneinfo files but also leave the original value for static binaries
# that run outside a nix server # that run outside a nix server
(substituteAll { (replaceVars ./tzdata-1.19.patch {
src = ./tzdata-1.19.patch;
inherit tzdata; inherit tzdata;
}) })
./remove-tools-1.11.patch ./remove-tools-1.11.patch

View file

@ -3,7 +3,7 @@
stdenv, stdenv,
fetchurl, fetchurl,
tzdata, tzdata,
substituteAll, replaceVars,
iana-etc, iana-etc,
xcbuild, xcbuild,
mailcap, mailcap,
@ -75,20 +75,17 @@ stdenv.mkDerivation (finalAttrs: {
''; '';
patches = [ patches = [
(substituteAll { (replaceVars ./iana-etc-1.17.patch {
src = ./iana-etc-1.17.patch;
iana = iana-etc; iana = iana-etc;
}) })
# Patch the mimetype database location which is missing on NixOS. # Patch the mimetype database location which is missing on NixOS.
# but also allow static binaries built with NixOS to run outside nix # but also allow static binaries built with NixOS to run outside nix
(substituteAll { (replaceVars ./mailcap-1.17.patch {
src = ./mailcap-1.17.patch;
inherit mailcap; inherit mailcap;
}) })
# prepend the nix path to the zoneinfo files but also leave the original value for static binaries # prepend the nix path to the zoneinfo files but also leave the original value for static binaries
# that run outside a nix server # that run outside a nix server
(substituteAll { (replaceVars ./tzdata-1.19.patch {
src = ./tzdata-1.19.patch;
inherit tzdata; inherit tzdata;
}) })
./remove-tools-1.11.patch ./remove-tools-1.11.patch

View file

@ -13,7 +13,7 @@
python3, python3,
# Not really used for anything real, just at build time. # Not really used for anything real, just at build time.
git, git,
substituteAll, replaceVars,
which, which,
z3, z3,
cctools, cctools,
@ -67,8 +67,7 @@ stdenv.mkDerivation (rec {
./disable-networking-tests.patch ./disable-networking-tests.patch
] ]
++ lib.optionals stdenv.hostPlatform.isDarwin [ ++ lib.optionals stdenv.hostPlatform.isDarwin [
(substituteAll { (replaceVars ./fix-darwin-build.patch {
src = ./fix-darwin-build.patch;
libSystem = darwin.Libsystem; libSystem = darwin.Libsystem;
}) })
]; ];

View file

@ -28,7 +28,7 @@
, glibc , glibc
, libuuid , libuuid
# Darwin-specific # Darwin-specific
, substituteAll , replaceVars
, fixDarwinDylibNames , fixDarwinDylibNames
, xcbuild , xcbuild
, cctools # libtool , cctools # libtool
@ -300,12 +300,10 @@ in stdenv.mkDerivation {
patch -p1 -d swift -i ${./patches/swift-linux-fix-libc-paths.patch} patch -p1 -d swift -i ${./patches/swift-linux-fix-libc-paths.patch}
patch -p1 -d swift -i ${./patches/swift-linux-fix-linking.patch} patch -p1 -d swift -i ${./patches/swift-linux-fix-linking.patch}
patch -p1 -d swift -i ${./patches/swift-darwin-libcxx-flags.patch} patch -p1 -d swift -i ${./patches/swift-darwin-libcxx-flags.patch}
patch -p1 -d swift -i ${substituteAll { patch -p1 -d swift -i ${replaceVars ./patches/swift-darwin-plistbuddy-workaround.patch {
src = ./patches/swift-darwin-plistbuddy-workaround.patch;
inherit swiftArch; inherit swiftArch;
}} }}
patch -p1 -d swift -i ${substituteAll { patch -p1 -d swift -i ${replaceVars ./patches/swift-prevent-sdk-dirs-warning.patch {
src = ./patches/swift-prevent-sdk-dirs-warning.patch;
inherit (builtins) storeDir; inherit (builtins) storeDir;
}} }}

View file

@ -10,7 +10,7 @@
XCTest, XCTest,
sqlite, sqlite,
ncurses, ncurses,
substituteAll, replaceVars,
}: }:
let let
sources = callPackage ../sources.nix { }; sources = callPackage ../sources.nix { };
@ -50,8 +50,7 @@ stdenv.mkDerivation {
hash = "sha256-eVBaKN6uzj48ZnHtwGV0k5ChKjak1tDCyE+wTdyGq2c="; hash = "sha256-eVBaKN6uzj48ZnHtwGV0k5ChKjak1tDCyE+wTdyGq2c=";
}) })
# Prevent a warning about SDK directories we don't have. # Prevent a warning about SDK directories we don't have.
(substituteAll { (replaceVars ./patches/prevent-sdk-dirs-warnings.patch {
src = ./patches/prevent-sdk-dirs-warnings.patch;
inherit (builtins) storeDir; inherit (builtins) storeDir;
}) })
]; ];

View file

@ -13,7 +13,7 @@
pkg-config, pkg-config,
sqlite, sqlite,
ncurses, ncurses,
substituteAll, replaceVars,
runCommandLocal, runCommandLocal,
makeWrapper, makeWrapper,
DarwinTools, # sw_vers DarwinTools, # sw_vers
@ -45,8 +45,7 @@ let
./patches/disable-xctest.patch ./patches/disable-xctest.patch
./patches/fix-clang-cxx.patch ./patches/fix-clang-cxx.patch
./patches/nix-pkgconfig-vars.patch ./patches/nix-pkgconfig-vars.patch
(substituteAll { (replaceVars ./patches/fix-stdlib-path.patch {
src = ./patches/fix-stdlib-path.patch;
inherit (builtins) storeDir; inherit (builtins) storeDir;
swiftLib = swift.swift.lib; swiftLib = swift.swift.lib;
}) })
@ -429,8 +428,7 @@ stdenv.mkDerivation (
# Prevent a warning about SDK directories we don't have. # Prevent a warning about SDK directories we don't have.
swiftpmMakeMutable swift-driver swiftpmMakeMutable swift-driver
patch -p1 -d .build/checkouts/swift-driver -i ${ patch -p1 -d .build/checkouts/swift-driver -i ${
substituteAll { replaceVars ../swift-driver/patches/prevent-sdk-dirs-warnings.patch {
src = ../swift-driver/patches/prevent-sdk-dirs-warnings.patch;
inherit (builtins) storeDir; inherit (builtins) storeDir;
} }
} }

View file

@ -15,7 +15,7 @@
libintl, libintl,
libtool, libtool,
expat, expat,
substituteAll, replaceVars,
vala, vala,
gobject-introspection, gobject-introspection,
}: }:
@ -45,8 +45,7 @@ let
pname = "vala"; pname = "vala";
inherit version; inherit version;
setupHook = substituteAll { setupHook = replaceVars ./setup-hook.sh {
src = ./setup-hook.sh;
apiVersion = lib.versions.majorMinor version; apiVersion = lib.versions.majorMinor version;
}; };

View file

@ -6,7 +6,7 @@
installShellFiles, installShellFiles,
git, git,
spdx-license-list-data, spdx-license-list-data,
substituteAll, replaceVars,
}: }:
with python3Packages; with python3Packages;
@ -29,12 +29,10 @@ buildPythonApplication rec {
]; ];
patches = [ patches = [
(substituteAll { (replaceVars ./interpreter.patch {
src = ./interpreter.patch;
interpreter = (python3Packages.python.withPackages (_: propagatedBuildInputs)).interpreter; interpreter = (python3Packages.python.withPackages (_: propagatedBuildInputs)).interpreter;
}) })
(substituteAll { (replaceVars ./use-local-spdx-license-list.patch {
src = ./use-local-spdx-license-list.patch;
spdx_license_list_data = spdx-license-list-data.json; spdx_license_list_data = spdx-license-list-data.json;
}) })
./missing-udev-rules-nixos.patch ./missing-udev-rules-nixos.patch

View file

@ -1325,9 +1325,11 @@ self: super: builtins.intersectAttrs super {
# whatever graphviz is in PATH. # whatever graphviz is in PATH.
graphviz = overrideCabal (drv: { graphviz = overrideCabal (drv: {
patches = [ patches = [
(pkgs.substituteAll { (pkgs.replaceVars ./patches/graphviz-hardcode-graphviz-store-path.patch {
src = ./patches/graphviz-hardcode-graphviz-store-path.patch;
inherit (pkgs) graphviz; inherit (pkgs) graphviz;
# patch context
dot = null;
PATH = null;
}) })
] ++ (drv.patches or []); ] ++ (drv.patches or []);
}) super.graphviz; }) super.graphviz;

View file

@ -6,7 +6,7 @@
fetchpatch, fetchpatch,
runCommandLocal, runCommandLocal,
makeWrapper, makeWrapper,
substituteAll, replaceVars,
sbcl, sbcl,
bash, bash,
which, which,
@ -52,8 +52,7 @@ stdenv.mkDerivation rec {
libipasir = callPackage ./libipasirglucose4 { }; libipasir = callPackage ./libipasirglucose4 { };
patches = [ patches = [
(substituteAll { (replaceVars ./0001-Fix-some-paths-for-Nix-build.patch {
src = ./0001-Fix-some-paths-for-Nix-build.patch;
libipasir = "${libipasir}/lib/${libipasir.libname}"; libipasir = "${libipasir}/lib/${libipasir.libname}";
libssl = "${lib.getLib openssl}/lib/libssl${stdenv.hostPlatform.extensions.sharedLibrary}"; libssl = "${lib.getLib openssl}/lib/libssl${stdenv.hostPlatform.extensions.sharedLibrary}";
libcrypto = "${lib.getLib openssl}/lib/libcrypto${stdenv.hostPlatform.extensions.sharedLibrary}"; libcrypto = "${lib.getLib openssl}/lib/libcrypto${stdenv.hostPlatform.extensions.sharedLibrary}";

View file

@ -1,4 +1,4 @@
{ lib, stdenv, substituteAll, fetchurl { lib, stdenv, replaceVars, fetchurl
, zlibSupport ? true, zlib , zlibSupport ? true, zlib
, bzip2, pkg-config, libffi , bzip2, pkg-config, libffi
, sqlite, openssl, ncurses, python, expat, tcl, tk, tclPackages, libX11 , sqlite, openssl, ncurses, python, expat, tcl, tk, tclPackages, libX11
@ -76,8 +76,7 @@ in with passthru; stdenv.mkDerivation rec {
patches = [ patches = [
./dont_fetch_vendored_deps.patch ./dont_fetch_vendored_deps.patch
(substituteAll { (replaceVars ./tk_tcl_paths.patch {
src = ./tk_tcl_paths.patch;
inherit tk tcl; inherit tk tcl;
tk_dev = tk.dev; tk_dev = tk.dev;
tcl_dev = tcl; tcl_dev = tcl;
@ -85,8 +84,7 @@ in with passthru; stdenv.mkDerivation rec {
tcl_libprefix = tcl.libPrefix; tcl_libprefix = tcl.libPrefix;
}) })
(substituteAll { (replaceVars ./sqlite_paths.patch {
src = ./sqlite_paths.patch;
inherit (sqlite) out dev; inherit (sqlite) out dev;
}) })
]; ];

View file

@ -1,6 +1,6 @@
{ lib { lib
, stdenv , stdenv
, substituteAll , replaceVars
, fetchFromGitHub , fetchFromGitHub
, meson , meson
, mesonEmulatorHook , mesonEmulatorHook
@ -50,8 +50,7 @@ stdenv.mkDerivation (finalAttrs: {
patches = [ patches = [
# Fix hardcoded paths # Fix hardcoded paths
(substituteAll { (replaceVars ./fix-paths.patch {
src = ./fix-paths.patch;
libstemmer_includedir = "${lib.getDev libstemmer}/include"; libstemmer_includedir = "${lib.getDev libstemmer}/include";
}) })

View file

@ -1,7 +1,7 @@
{ {
stdenv, stdenv,
lib, lib,
substituteAll, replaceVars,
meson, meson,
ninja, ninja,
pkg-config, pkg-config,
@ -18,8 +18,7 @@ stdenv.mkDerivation rec {
patches = [ patches = [
# Allow building tools separately from the library. # Allow building tools separately from the library.
# This is needed to break the depenency cycle. # This is needed to break the depenency cycle.
(substituteAll { (replaceVars ./standalone-tools.patch {
src = ./standalone-tools.patch;
inherit version; inherit version;
}) })
]; ];

View file

@ -2,7 +2,7 @@
, stdenv , stdenv
, fetchurl , fetchurl
, fetchpatch , fetchpatch
, substituteAll , replaceVars
, meson , meson
, ninja , ninja
, gettext , gettext
@ -127,8 +127,7 @@ stdenv.mkDerivation rec {
patches = [ patches = [
# Add fallback paths for nvidia userspace libraries # Add fallback paths for nvidia userspace libraries
(substituteAll { (replaceVars ./fix-paths.patch {
src = ./fix-paths.patch;
inherit (addDriverRunpath) driverLink; inherit (addDriverRunpath) driverLink;
}) })
# Add support for newer AJA SDK from next GStreamer release # Add support for newer AJA SDK from next GStreamer release

View file

@ -1,6 +1,6 @@
{ lib, stdenv { lib, stdenv
, fetchurl , fetchurl
, substituteAll , replaceVars
, meson , meson
, nasm , nasm
, ninja , ninja
@ -71,8 +71,7 @@ stdenv.mkDerivation rec {
# Reenable dynamic loading of libsoup on Darwin and use a different approach to do it. # Reenable dynamic loading of libsoup on Darwin and use a different approach to do it.
./souploader-darwin.diff ./souploader-darwin.diff
# dlopen libsoup_3 with an absolute path # dlopen libsoup_3 with an absolute path
(substituteAll { (replaceVars ./souploader.diff {
src = ./souploader.diff;
nixLibSoup3Path = "${lib.getLib libsoup_3}/lib"; nixLibSoup3Path = "${lib.getLib libsoup_3}/lib";
}) })
]; ];

View file

@ -22,7 +22,7 @@
pango, pango,
perl, perl,
pkg-config, pkg-config,
substituteAll, replaceVars,
testers, testers,
AppKit, AppKit,
Cocoa, Cocoa,
@ -32,8 +32,7 @@
}: }:
let let
gtkCleanImmodulesCache = substituteAll { gtkCleanImmodulesCache = replaceVars ./hooks/clean-immodules-cache.sh {
src = ./hooks/clean-immodules-cache.sh;
gtk_module_path = "gtk-2.0"; gtk_module_path = "gtk-2.0";
gtk_binary_version = "2.10.0"; gtk_binary_version = "2.10.0";
}; };

View file

@ -1,6 +1,6 @@
{ lib { lib
, stdenv , stdenv
, substituteAll , replaceVars
, fetchurl , fetchurl
, pkg-config , pkg-config
, gettext , gettext
@ -53,8 +53,7 @@
let let
gtkCleanImmodulesCache = substituteAll { gtkCleanImmodulesCache = replaceVars ./hooks/clean-immodules-cache.sh {
src = ./hooks/clean-immodules-cache.sh;
gtk_module_path = "gtk-3.0"; gtk_module_path = "gtk-3.0";
gtk_binary_version = "3.0.0"; gtk_binary_version = "3.0.0";
}; };

View file

@ -1,7 +1,7 @@
{ lib { lib
, stdenv , stdenv
, buildPackages , buildPackages
, substituteAll , replaceVars
, fetchurl , fetchurl
, pkg-config , pkg-config
, docutils , docutils
@ -58,8 +58,7 @@
let let
gtkCleanImmodulesCache = substituteAll { gtkCleanImmodulesCache = replaceVars ./hooks/clean-immodules-cache.sh {
src = ./hooks/clean-immodules-cache.sh;
gtk_module_path = "gtk-4.0"; gtk_module_path = "gtk-4.0";
gtk_binary_version = "4.0.0"; gtk_binary_version = "4.0.0";
}; };

View file

@ -3,7 +3,7 @@
stdenv, stdenv,
fetchurl, fetchurl,
fetchpatch2, fetchpatch2,
substituteAll, replaceVars,
libtool, libtool,
gettext, gettext,
zlib, zlib,
@ -60,8 +60,7 @@ stdenv.mkDerivation rec {
++ lib.optionals gstreamerSupport [ ++ lib.optionals gstreamerSupport [
# Libraries cannot be wrapped so we need to hardcode the plug-in paths. # Libraries cannot be wrapped so we need to hardcode the plug-in paths.
(substituteAll { (replaceVars ./gst-hardcode-plugins.patch {
src = ./gst-hardcode-plugins.patch;
load_gst_plugins = lib.concatMapStrings ( load_gst_plugins = lib.concatMapStrings (
plugin: ''gst_registry_scan_path(gst_registry_get(), "${lib.getLib plugin}/lib/gstreamer-1.0");'' plugin: ''gst_registry_scan_path(gst_registry_get(), "${lib.getLib plugin}/lib/gstreamer-1.0");''
) (gstPlugins gst_all_1); ) (gstPlugins gst_all_1);

View file

@ -3,7 +3,7 @@
, buildPackages , buildPackages
, fetchurl , fetchurl
, pkgsCross , pkgsCross
, substituteAll , replaceVars
, pkg-config , pkg-config
, gi-docgen , gi-docgen
, gobject-introspection , gobject-introspection
@ -34,8 +34,7 @@ stdenv.mkDerivation rec {
patches = [ patches = [
# Make PyGObjects gi library available. # Make PyGObjects gi library available.
(substituteAll { (replaceVars ./fix-paths.patch {
src = ./fix-paths.patch;
pythonPaths = lib.concatMapStringsSep ", " (pkg: "'${pkg}/${python3.sitePackages}'") [ pythonPaths = lib.concatMapStringsSep ", " (pkg: "'${pkg}/${python3.sitePackages}'") [
python3.pkgs.pygobject3 python3.pkgs.pygobject3
]; ];

View file

@ -2,7 +2,7 @@
stdenv, stdenv,
lib, lib,
fetchurl, fetchurl,
substituteAll, replaceVars,
meson, meson,
ninja, ninja,
pkg-config, pkg-config,
@ -34,8 +34,7 @@ stdenv.mkDerivation rec {
patches = [ patches = [
# Make PyGObjects gi library available. # Make PyGObjects gi library available.
(substituteAll { (replaceVars ./fix-paths.patch {
src = ./fix-paths.patch;
pythonPaths = lib.concatMapStringsSep ", " (pkg: "'${pkg}/${python3.sitePackages}'") [ pythonPaths = lib.concatMapStringsSep ", " (pkg: "'${pkg}/${python3.sitePackages}'") [
python3.pkgs.pygobject3 python3.pkgs.pygobject3
]; ];

View file

@ -15,7 +15,7 @@
ninja, ninja,
pkg-config, pkg-config,
stdenv, stdenv,
substituteAll, replaceVars,
vala, vala,
}: }:
@ -46,8 +46,7 @@ stdenv.mkDerivation (finalAttrs: {
# Hardcode path to Settings schemas for GNOME & related desktops. # Hardcode path to Settings schemas for GNOME & related desktops.
# Otherwise every app using libproxy would need to be wrapped individually. # Otherwise every app using libproxy would need to be wrapped individually.
(substituteAll { (replaceVars ./hardcode-gsettings.patch {
src = ./hardcode-gsettings.patch;
gds = glib.getSchemaPath gsettings-desktop-schemas; gds = glib.getSchemaPath gsettings-desktop-schemas;
}) })
]; ];

View file

@ -1,6 +1,6 @@
{ {
lib, lib,
substituteAll, replaceVars,
mkDerivation, mkDerivation,
fetchFromGitHub, fetchFromGitHub,
gitUpdater, gitUpdater,
@ -22,8 +22,7 @@ mkDerivation rec {
}; };
patches = [ patches = [
(substituteAll { (replaceVars ./0001-NixOS-provide-mobile-broadband-provider-info-path.patch {
src = ./0001-NixOS-provide-mobile-broadband-provider-info-path.patch;
mobileBroadbandProviderInfo = mobile-broadband-provider-info; mobileBroadbandProviderInfo = mobile-broadband-provider-info;
}) })
./0001-NixOS-Skip-tests-they-re-shock-full-of-hardcoded-FHS.patch ./0001-NixOS-Skip-tests-they-re-shock-full-of-hardcoded-FHS.patch

View file

@ -2,7 +2,7 @@
lib, lib,
stdenv, stdenv,
fetchurl, fetchurl,
substituteAll, replaceVars,
pname, pname,
version, version,
url, url,
@ -19,8 +19,7 @@ stdenv.mkDerivation rec {
patches = [ patches = [
# Fix buidling on platforms other than x86 # Fix buidling on platforms other than x86
(substituteAll { (replaceVars ./configure.patch {
src = ./configure.patch;
msse = lib.optionalString stdenv.hostPlatform.isx86_64 "-msse"; msse = lib.optionalString stdenv.hostPlatform.isx86_64 "-msse";
}) })
]; ];

View file

@ -32,7 +32,7 @@
, readline , readline
, rpcsvc-proto , rpcsvc-proto
, stdenv , stdenv
, substituteAll , replaceVars
, xhtml1 , xhtml1
, json_c , json_c
, writeScript , writeScript
@ -127,8 +127,7 @@ stdenv.mkDerivation rec {
patches = [ patches = [
./0001-meson-patch-in-an-install-prefix-for-building-on-nix.patch ./0001-meson-patch-in-an-install-prefix-for-building-on-nix.patch
] ++ lib.optionals enableZfs [ ] ++ lib.optionals enableZfs [
(substituteAll { (replaceVars ./0002-substitute-zfs-and-zpool-commands.patch {
src = ./0002-substitute-zfs-and-zpool-commands.patch;
zfs = "${zfs}/bin/zfs"; zfs = "${zfs}/bin/zfs";
zpool = "${zfs}/bin/zpool"; zpool = "${zfs}/bin/zpool";
}) })

View file

@ -11,7 +11,7 @@
gtk3, gtk3,
qtbase, qtbase,
qtwayland, qtwayland,
substituteAll, replaceVars,
gsettings-desktop-schemas, gsettings-desktop-schemas,
useQt6 ? false, useQt6 ? false,
}: }:
@ -29,8 +29,7 @@ stdenv.mkDerivation rec {
patches = [ patches = [
# Hardcode GSettings schema path to avoid crashes from missing schemas # Hardcode GSettings schema path to avoid crashes from missing schemas
(substituteAll { (replaceVars ./hardcode-gsettings.patch {
src = ./hardcode-gsettings.patch;
gds_gsettings_path = glib.getSchemaPath gsettings-desktop-schemas; gds_gsettings_path = glib.getSchemaPath gsettings-desktop-schemas;
}) })

View file

@ -4,7 +4,7 @@
lib, lib,
qtbase, qtbase,
qtdeclarative, qtdeclarative,
substituteAll, replaceVars,
llvmPackages, llvmPackages,
}: }:
@ -29,13 +29,11 @@ qtModule {
patches = [ patches = [
# fixQtBuiltinPaths overwrites builtin paths we should keep # fixQtBuiltinPaths overwrites builtin paths we should keep
(substituteAll { (replaceVars ./qttools-QT_HOST_DATA-refs.patch {
src = ./qttools-QT_HOST_DATA-refs.patch;
qtbaseDev = lib.getDev qtbase; qtbaseDev = lib.getDev qtbase;
}) })
(substituteAll { (replaceVars ./qttools-libclang-main-header.patch {
src = ./qttools-libclang-main-header.patch;
libclangDev = lib.getDev llvmPackages.libclang; libclangDev = lib.getDev llvmPackages.libclang;
}) })
]; ];

View file

@ -7,7 +7,7 @@
eigen, eigen,
ensureNewerSourcesForZipFilesHook, ensureNewerSourcesForZipFilesHook,
fetchFromGitHub, fetchFromGitHub,
substituteAll, replaceVars,
glpk, glpk,
lib, lib,
pkg-config, pkg-config,
@ -40,8 +40,7 @@ stdenv.mkDerivation rec {
}; };
patches = [ patches = [
(substituteAll { (replaceVars ./offline.patch {
src = ./offline.patch;
pybind11_protobuf = "../../pybind11_protobuf"; pybind11_protobuf = "../../pybind11_protobuf";
}) })
]; ];

View file

@ -2,7 +2,7 @@
stdenv, stdenv,
lib, lib,
fetchFromGitLab, fetchFromGitLab,
substituteAll, replaceVars,
meson, meson,
pkg-config, pkg-config,
qttools, qttools,
@ -25,8 +25,7 @@ stdenv.mkDerivation (finalAttrs: {
patches = [ patches = [
# qmake get qtbase's path, but wayqt need qtwayland # qmake get qtbase's path, but wayqt need qtwayland
(substituteAll { (replaceVars ./fix-qtwayland-header-path.diff {
src = ./fix-qtwayland-header-path.diff;
qtWaylandPath = "${qtwayland}/include"; qtWaylandPath = "${qtwayland}/include";
}) })
]; ];

View file

@ -65,7 +65,7 @@
libbacktrace, libbacktrace,
systemd, systemd,
xdg-dbus-proxy, xdg-dbus-proxy,
substituteAll, replaceVars,
glib, glib,
unifdef, unifdef,
addDriverRunpath, addDriverRunpath,
@ -103,8 +103,7 @@ clangStdenv.mkDerivation (finalAttrs: {
}; };
patches = lib.optionals clangStdenv.hostPlatform.isLinux [ patches = lib.optionals clangStdenv.hostPlatform.isLinux [
(substituteAll { (replaceVars ./fix-bubblewrap-paths.patch {
src = ./fix-bubblewrap-paths.patch;
inherit (builtins) storeDir; inherit (builtins) storeDir;
inherit (addDriverRunpath) driverLink; inherit (addDriverRunpath) driverLink;
}) })

View file

@ -59,7 +59,7 @@ let
; ;
inherit (pkgs) inherit (pkgs)
substituteAll replaceVars
; ;
# Stolen from python-packages.nix # Stolen from python-packages.nix
@ -209,8 +209,7 @@ let
; ;
}; };
buildScript = substituteAll { buildScript = replaceVars ./builder.lisp {
src = ./builder.lisp;
asdf = "${asdfFasl}/asdf.${faslExt}"; asdf = "${asdfFasl}/asdf.${faslExt}";
}; };

View file

@ -5,7 +5,7 @@
lua, lua,
pkg-config, pkg-config,
lib, lib,
substituteAll, replaceVars,
zenity, zenity,
AppKit, AppKit,
}: }:
@ -24,8 +24,7 @@ buildLuarocksPackage {
# use zenity because default gtk impl just crashes # use zenity because default gtk impl just crashes
patches = [ patches = [
(substituteAll { (replaceVars ./zenity.patch {
src = ./zenity.patch;
inherit zenity; inherit zenity;
}) })
]; ];

View file

@ -27,7 +27,7 @@
cmdliner, cmdliner,
hxd, hxd,
getconf, getconf,
substituteAll, replaceVars,
}: }:
buildDunePackage rec { buildDunePackage rec {
@ -42,8 +42,7 @@ buildDunePackage rec {
}; };
patches = [ patches = [
(substituteAll { (replaceVars ./carton-find-getconf.patch {
src = ./carton-find-getconf.patch;
getconf = "${getconf}"; getconf = "${getconf}";
}) })
]; ];

View file

@ -1,6 +1,6 @@
{ {
buildDunePackage, buildDunePackage,
substituteAll, replaceVars,
ocaml, ocaml,
menhirLib, menhirLib,
menhirSdk, menhirSdk,
@ -19,8 +19,7 @@ buildDunePackage rec {
]; ];
patches = [ patches = [
(substituteAll { (replaceVars ./menhir-suggest-menhirLib.patch {
src = ./menhir-suggest-menhirLib.patch;
libdir = "${menhirLib}/lib/ocaml/${ocaml.version}/site-lib/menhirLib"; libdir = "${menhirLib}/lib/ocaml/${ocaml.version}/site-lib/menhirLib";
}) })
]; ];

View file

@ -1,7 +1,7 @@
{ {
lib, lib,
buildDunePackage, buildDunePackage,
substituteAll, replaceVars,
base64, base64,
cmdliner, cmdliner,
digestif, digestif,
@ -24,8 +24,7 @@ buildDunePackage rec {
minimalOCamlVersion = "4.09"; minimalOCamlVersion = "4.09";
patches = [ patches = [
(substituteAll { (replaceVars ./fix-paths.patch {
src = ./fix-paths.patch;
inherit coreutils imagemagick; inherit coreutils imagemagick;
}) })
]; ];

View file

@ -4,7 +4,7 @@
fetchFromGitHub, fetchFromGitHub,
libcouchbase, libcouchbase,
zlib, zlib,
substituteAll, replaceVars,
php, php,
}: }:
let let
@ -29,8 +29,7 @@ buildPecl {
]; ];
patches = [ patches = [
(substituteAll { (replaceVars ./libcouchbase.patch {
src = ./libcouchbase.patch;
inherit libcouchbase; inherit libcouchbase;
}) })
]; ];

View file

@ -4,7 +4,7 @@
buildPythonPackage, buildPythonPackage,
fetchFromGitHub, fetchFromGitHub,
fetchpatch2, fetchpatch2,
substituteAll, replaceVars,
isPy310, isPy310,
isPyPy, isPyPy,
@ -57,8 +57,7 @@ buildPythonPackage rec {
}; };
patches = [ patches = [
(substituteAll { (replaceVars ./unvendor-llhttp.patch {
src = ./unvendor-llhttp.patch;
llhttpDev = lib.getDev llhttp; llhttpDev = lib.getDev llhttp;
llhttpLib = lib.getLib llhttp; llhttpLib = lib.getLib llhttp;
}) })

View file

@ -8,7 +8,7 @@
pytest7CheckHook, pytest7CheckHook,
pythonOlder, pythonOlder,
six, six,
substituteAll, replaceVars,
withGraphviz ? true, withGraphviz ? true,
}: }:
@ -27,8 +27,7 @@ buildPythonPackage rec {
}; };
patches = lib.optionals withGraphviz [ patches = lib.optionals withGraphviz [
(substituteAll { (replaceVars ./graphviz.patch {
src = ./graphviz.patch;
inherit graphviz; inherit graphviz;
}) })
]; ];

View file

@ -4,7 +4,7 @@
buildPythonPackage, buildPythonPackage,
fetchPypi, fetchPypi,
pythonOlder, pythonOlder,
substituteAll, replaceVars,
hatchling, hatchling,
}: }:
@ -20,9 +20,8 @@ buildPythonPackage rec {
}; };
patches = [ patches = [
(substituteAll { (replaceVars ./remove-hatch-plugins.patch {
# hatch-vcs and hatch-fancy-pypi-readme depend on pytest, which depends on attrs # hatch-vcs and hatch-fancy-pypi-readme depend on pytest, which depends on attrs
src = ./remove-hatch-plugins.patch;
inherit version; inherit version;
}) })
]; ];

View file

@ -8,7 +8,7 @@
python, python,
pexpect, pexpect,
bashInteractive, bashInteractive,
substituteAll, replaceVars,
}: }:
buildPythonPackage rec { buildPythonPackage rec {
@ -23,8 +23,7 @@ buildPythonPackage rec {
}; };
patches = [ patches = [
(substituteAll { (replaceVars ./bash-path.patch {
src = ./bash-path.patch;
bash = lib.getExe bashInteractive; bash = lib.getExe bashInteractive;
}) })
]; ];

View file

@ -4,7 +4,7 @@
fetchPypi, fetchPypi,
fetchFromGitHub, fetchFromGitHub,
pythonOlder, pythonOlder,
substituteAll, replaceVars,
colorama, colorama,
contourpy, contourpy,
jinja2, jinja2,
@ -64,8 +64,7 @@ buildPythonPackage rec {
}; };
patches = [ patches = [
(substituteAll { (replaceVars ./hardcode-nodejs-npmjs-paths.patch {
src = ./hardcode-nodejs-npmjs-paths.patch;
node_bin = "${nodejs}/bin/node"; node_bin = "${nodejs}/bin/node";
npm_bin = "${nodejs}/bin/npm"; npm_bin = "${nodejs}/bin/npm";
}) })

View file

@ -5,7 +5,7 @@
pythonOlder, pythonOlder,
fetchPypi, fetchPypi,
lib, lib,
substituteAll, replaceVars,
pikepdf, pikepdf,
pytestCheckHook, pytestCheckHook,
cairo, cairo,
@ -32,8 +32,7 @@ buildPythonPackage rec {
patches = [ patches = [
# OSError: dlopen() failed to load a library: gdk-pixbuf-2.0 / gdk-pixbuf-2.0-0 # OSError: dlopen() failed to load a library: gdk-pixbuf-2.0 / gdk-pixbuf-2.0-0
(substituteAll { (replaceVars ./dlopen-paths.patch {
src = ./dlopen-paths.patch;
ext = stdenv.hostPlatform.extensions.sharedLibrary; ext = stdenv.hostPlatform.extensions.sharedLibrary;
cairo = cairo.out; cairo = cairo.out;
glib = glib.out; glib = glib.out;

View file

@ -2,7 +2,7 @@
lib, lib,
buildPythonPackage, buildPythonPackage,
fetchFromGitHub, fetchFromGitHub,
substituteAll, replaceVars,
cmdstan, cmdstan,
setuptools, setuptools,
pandas, pandas,
@ -27,8 +27,7 @@ buildPythonPackage rec {
}; };
patches = [ patches = [
(substituteAll { (replaceVars ./use-nix-cmdstan-path.patch {
src = ./use-nix-cmdstan-path.patch;
cmdstan = "${cmdstan}/opt/cmdstan"; cmdstan = "${cmdstan}/opt/cmdstan";
}) })
]; ];

View file

@ -5,7 +5,7 @@
pythonOlder, pythonOlder,
pythonAtLeast, pythonAtLeast,
fetchFromGitHub, fetchFromGitHub,
substituteAll, replaceVars,
gdb, gdb,
lldb, lldb,
pytestCheckHook, pytestCheckHook,
@ -39,8 +39,7 @@ buildPythonPackage rec {
patches = patches =
[ [
# Use nixpkgs version instead of versioneer # Use nixpkgs version instead of versioneer
(substituteAll { (replaceVars ./hardcode-version.patch {
src = ./hardcode-version.patch;
inherit version; inherit version;
}) })
@ -62,15 +61,13 @@ buildPythonPackage rec {
] ]
++ lib.optionals stdenv.hostPlatform.isLinux [ ++ lib.optionals stdenv.hostPlatform.isLinux [
# Hard code GDB path (used to attach to process) # Hard code GDB path (used to attach to process)
(substituteAll { (replaceVars ./hardcode-gdb.patch {
src = ./hardcode-gdb.patch;
inherit gdb; inherit gdb;
}) })
] ]
++ lib.optionals stdenv.hostPlatform.isDarwin [ ++ lib.optionals stdenv.hostPlatform.isDarwin [
# Hard code LLDB path (used to attach to process) # Hard code LLDB path (used to attach to process)
(substituteAll { (replaceVars ./hardcode-lldb.patch {
src = ./hardcode-lldb.patch;
inherit lldb; inherit lldb;
}) })
]; ];

View file

@ -4,7 +4,7 @@
buildPythonPackage, buildPythonPackage,
deltachat-rpc-server, deltachat-rpc-server,
setuptools-scm, setuptools-scm,
substituteAll, replaceVars,
}: }:
buildPythonPackage rec { buildPythonPackage rec {
@ -20,8 +20,7 @@ buildPythonPackage rec {
}; };
patches = [ patches = [
(substituteAll { (replaceVars ./paths.patch {
src = ./paths.patch;
deltachatrpcserver = lib.getExe deltachat-rpc-server; deltachatrpcserver = lib.getExe deltachat-rpc-server;
}) })
]; ];

View file

@ -3,7 +3,7 @@
stdenv, stdenv,
buildPythonPackage, buildPythonPackage,
fetchPypi, fetchPypi,
substituteAll, replaceVars,
geos_3_9, geos_3_9,
gdal, gdal,
asgiref, asgiref,
@ -28,17 +28,17 @@ buildPythonPackage rec {
patches = patches =
[ [
(substituteAll { (replaceVars ./django_3_set_zoneinfo_dir.patch {
src = ./django_3_set_zoneinfo_dir.patch;
zoneinfo = tzdata + "/share/zoneinfo"; zoneinfo = tzdata + "/share/zoneinfo";
}) })
] ]
++ lib.optional withGdal (substituteAll { ++ lib.optional withGdal (
src = ./django_3_set_geos_gdal_lib.patch; replaceVars ./django_3_set_geos_gdal_lib.patch {
inherit geos_3_9; inherit geos_3_9;
inherit gdal; inherit gdal;
extension = stdenv.hostPlatform.extensions.sharedLibrary; extension = stdenv.hostPlatform.extensions.sharedLibrary;
}); }
);
propagatedBuildInputs = [ propagatedBuildInputs = [
asgiref asgiref

View file

@ -6,7 +6,7 @@
fetchpatch, fetchpatch,
pythonAtLeast, pythonAtLeast,
pythonOlder, pythonOlder,
substituteAll, replaceVars,
# build # build
setuptools, setuptools,
@ -59,8 +59,7 @@ buildPythonPackage rec {
patches = patches =
[ [
(substituteAll { (replaceVars ./django_4_set_zoneinfo_dir.patch {
src = ./django_4_set_zoneinfo_dir.patch;
zoneinfo = tzdata + "/share/zoneinfo"; zoneinfo = tzdata + "/share/zoneinfo";
}) })
# make sure the tests don't remove packages from our pythonpath # make sure the tests don't remove packages from our pythonpath
@ -75,8 +74,7 @@ buildPythonPackage rec {
}) })
] ]
++ lib.optionals withGdal [ ++ lib.optionals withGdal [
(substituteAll { (replaceVars ./django_4_set_geos_gdal_lib.patch {
src = ./django_4_set_geos_gdal_lib.patch;
geos = geos; geos = geos;
gdal = gdal; gdal = gdal;
extension = stdenv.hostPlatform.extensions.sharedLibrary; extension = stdenv.hostPlatform.extensions.sharedLibrary;

View file

@ -5,7 +5,7 @@
fetchFromGitHub, fetchFromGitHub,
fetchpatch, fetchpatch,
pythonOlder, pythonOlder,
substituteAll, replaceVars,
# build-system # build-system
setuptools, setuptools,
@ -58,8 +58,7 @@ buildPythonPackage rec {
patches = patches =
[ [
(substituteAll { (replaceVars ./django_5_set_zoneinfo_dir.patch {
src = ./django_5_set_zoneinfo_dir.patch;
zoneinfo = tzdata + "/share/zoneinfo"; zoneinfo = tzdata + "/share/zoneinfo";
}) })
# prevent tests from messing with our pythonpath # prevent tests from messing with our pythonpath
@ -75,8 +74,7 @@ buildPythonPackage rec {
}) })
] ]
++ lib.optionals withGdal [ ++ lib.optionals withGdal [
(substituteAll { (replaceVars ./django_5_set_geos_gdal_lib.patch {
src = ./django_5_set_geos_gdal_lib.patch;
geos = geos; geos = geos;
gdal = gdal; gdal = gdal;
extension = stdenv.hostPlatform.extensions.sharedLibrary; extension = stdenv.hostPlatform.extensions.sharedLibrary;

View file

@ -2,7 +2,7 @@
lib, lib,
buildPythonPackage, buildPythonPackage,
fetchPypi, fetchPypi,
substituteAll, replaceVars,
pyparsing, pyparsing,
graphviz, graphviz,
pytestCheckHook, pytestCheckHook,
@ -20,8 +20,7 @@ buildPythonPackage rec {
}; };
patches = [ patches = [
(substituteAll { (replaceVars ./path.patch {
src = ./path.patch;
inherit graphviz; inherit graphviz;
}) })
./test.patch # https://github.com/kjellmf/dot2tex/issues/5 ./test.patch # https://github.com/kjellmf/dot2tex/issues/5

View file

@ -2,7 +2,7 @@
lib, lib,
buildPythonPackage, buildPythonPackage,
fetchFromGitHub, fetchFromGitHub,
substituteAll, replaceVars,
espeak-ng, espeak-ng,
pytestCheckHook, pytestCheckHook,
}: }:
@ -20,8 +20,7 @@ buildPythonPackage rec {
}; };
patches = [ patches = [
(substituteAll { (replaceVars ./cdll.patch {
src = ./cdll.patch;
libespeak_ng = "${lib.getLib espeak-ng}/lib/libespeak-ng.so"; libespeak_ng = "${lib.getLib espeak-ng}/lib/libespeak-ng.so";
}) })
]; ];

View file

@ -2,7 +2,7 @@
lib, lib,
buildPythonPackage, buildPythonPackage,
fetchFromGitHub, fetchFromGitHub,
substituteAll, replaceVars,
# build-system # build-system
flit-scm, flit-scm,
@ -30,8 +30,7 @@ buildPythonPackage rec {
}; };
patches = [ patches = [
(substituteAll { (replaceVars ./msgfmt-path.patch {
src = ./msgfmt-path.patch;
msgfmt = lib.getExe' gettext "msgfmt"; msgfmt = lib.getExe' gettext "msgfmt";
}) })
]; ];

View file

@ -3,7 +3,9 @@
buildPythonPackage, buildPythonPackage,
fetchFromGitHub, fetchFromGitHub,
fetchpatch, fetchpatch,
substituteAll, replaceVars,
# build
pkg-config, pkg-config,
glibc, glibc,
python, python,
@ -31,8 +33,7 @@ buildPythonPackage rec {
url = "https://github.com/oscaracena/pygattlib/commit/73a73b71cfc139e1e0a08816fb976ff330c77ea5.patch"; url = "https://github.com/oscaracena/pygattlib/commit/73a73b71cfc139e1e0a08816fb976ff330c77ea5.patch";
hash = "sha256-/Y/CZNdN/jcxWroqRfdCH2rPUxZUbug668MIAow0scs="; hash = "sha256-/Y/CZNdN/jcxWroqRfdCH2rPUxZUbug668MIAow0scs=";
}) })
(substituteAll { (replaceVars ./setup.patch {
src = ./setup.patch;
boost_version = boost_version =
let let
pythonVersion = with lib.versions; "${major python.version}${minor python.version}"; pythonVersion = with lib.versions; "${major python.version}${minor python.version}";

View file

@ -10,7 +10,7 @@
pytestCheckHook, pytestCheckHook,
pythonOlder, pythonOlder,
setuptools, setuptools,
substituteAll, replaceVars,
util-linux, util-linux,
}: }:
@ -42,8 +42,7 @@ buildPythonPackage rec {
url = "https://github.com/alpernebbi/git-annex-adapter/commit/d0d8905965a3659ce95cbd8f8b1e8598f0faf76b.patch"; url = "https://github.com/alpernebbi/git-annex-adapter/commit/d0d8905965a3659ce95cbd8f8b1e8598f0faf76b.patch";
hash = "sha256-UcRTKzD3sbXGIuxj4JzZDnvjTYyWVkfeWgKiZ1rAlus="; hash = "sha256-UcRTKzD3sbXGIuxj4JzZDnvjTYyWVkfeWgKiZ1rAlus=";
}) })
(substituteAll { (replaceVars ./git-annex-path.patch {
src = ./git-annex-path.patch;
gitAnnex = "${git-annex}/bin/git-annex"; gitAnnex = "${git-annex}/bin/git-annex";
}) })
]; ];

View file

@ -13,7 +13,7 @@
pythonOlder, pythonOlder,
scikit-image, scikit-image,
setuptools, setuptools,
substituteAll, replaceVars,
}: }:
buildPythonPackage rec { buildPythonPackage rec {
@ -37,8 +37,7 @@ buildPythonPackage rec {
url = "https://github.com/quintusdias/glymur/commit/89b159299035ebb05776c3b90278f410ca6dba64.patch"; url = "https://github.com/quintusdias/glymur/commit/89b159299035ebb05776c3b90278f410ca6dba64.patch";
hash = "sha256-C/Q5WZmW5YtN3U8fxKljfqwKHtFLfR2LQ69Tj8SuIWg="; hash = "sha256-C/Q5WZmW5YtN3U8fxKljfqwKHtFLfR2LQ69Tj8SuIWg=";
}) })
(substituteAll { (replaceVars ./set-lib-paths.patch {
src = ./set-lib-paths.patch;
openjp2_lib = "${lib.getLib openjpeg}/lib/libopenjp2${stdenv.hostPlatform.extensions.sharedLibrary}"; openjp2_lib = "${lib.getLib openjpeg}/lib/libopenjp2${stdenv.hostPlatform.extensions.sharedLibrary}";
tiff_lib = "${lib.getLib libtiff}/lib/libtiff${stdenv.hostPlatform.extensions.sharedLibrary}"; tiff_lib = "${lib.getLib libtiff}/lib/libtiff${stdenv.hostPlatform.extensions.sharedLibrary}";
}) })

View file

@ -3,7 +3,7 @@
config, config,
buildPythonPackage, buildPythonPackage,
fetchFromGitHub, fetchFromGitHub,
substituteAll, replaceVars,
addDriverRunpath, addDriverRunpath,
cudaSupport ? config.cudaSupport, cudaSupport ? config.cudaSupport,
rocmSupport ? config.rocmSupport, rocmSupport ? config.rocmSupport,
@ -33,8 +33,7 @@ buildPythonPackage rec {
}; };
patches = [ patches = [
(substituteAll { (replaceVars ./0001-fix-dlopen-cuda.patch {
src = ./0001-fix-dlopen-cuda.patch;
inherit (addDriverRunpath) driverLink; inherit (addDriverRunpath) driverLink;
libnvrtc = libnvrtc =
if cudaSupport then if cudaSupport then

View file

@ -4,7 +4,7 @@
buildPythonPackage, buildPythonPackage,
pythonOlder, pythonOlder,
fetchFromGitHub, fetchFromGitHub,
substituteAll, replaceVars,
graphviz-nox, graphviz-nox,
xdg-utils, xdg-utils,
makeFontsConf, makeFontsConf,
@ -32,8 +32,7 @@ buildPythonPackage rec {
}; };
patches = [ patches = [
(substituteAll { (replaceVars ./paths.patch {
src = ./paths.patch;
graphviz = graphviz-nox; graphviz = graphviz-nox;
xdgutils = xdg-utils; xdgutils = xdg-utils;
}) })

View file

@ -11,7 +11,7 @@
packaging, packaging,
pytestCheckHook, pytestCheckHook,
pythonOlder, pythonOlder,
substituteAll, replaceVars,
}: }:
buildPythonPackage rec { buildPythonPackage rec {
@ -29,8 +29,7 @@ buildPythonPackage rec {
}; };
patches = [ patches = [
(substituteAll { (replaceVars ./antlr4.patch {
src = ./antlr4.patch;
antlr_jar = "${antlr4.out}/share/java/antlr-${antlr4.version}-complete.jar"; antlr_jar = "${antlr4.out}/share/java/antlr-${antlr4.version}-complete.jar";
}) })
# https://github.com/facebookresearch/hydra/pull/2731 # https://github.com/facebookresearch/hydra/pull/2731

View file

@ -2,7 +2,7 @@
lib, lib,
buildPythonPackage, buildPythonPackage,
fetchFromGitHub, fetchFromGitHub,
substituteAll, replaceVars,
ffmpeg, ffmpeg,
# build-system # build-system
@ -27,8 +27,7 @@ buildPythonPackage rec {
}; };
patches = [ patches = [
(substituteAll { (replaceVars ./ffmpeg-path.patch {
src = ./ffmpeg-path.patch;
ffmpeg = lib.getExe ffmpeg; ffmpeg = lib.getExe ffmpeg;
}) })
]; ];

View file

@ -4,7 +4,7 @@
buildPythonPackage, buildPythonPackage,
fetchFromGitHub, fetchFromGitHub,
isPyPy, isPyPy,
substituteAll, replaceVars,
# build-system # build-system
setuptools, setuptools,
@ -42,8 +42,7 @@ buildPythonPackage rec {
}; };
patches = lib.optionals (!stdenv.hostPlatform.isDarwin) [ patches = lib.optionals (!stdenv.hostPlatform.isDarwin) [
(substituteAll { (replaceVars ./libgl-path.patch {
src = ./libgl-path.patch;
libgl = "${libGL.out}/lib/libGL${stdenv.hostPlatform.extensions.sharedLibrary}"; libgl = "${libGL.out}/lib/libGL${stdenv.hostPlatform.extensions.sharedLibrary}";
}) })
]; ];

View file

@ -3,7 +3,7 @@
buildPythonPackage, buildPythonPackage,
isPy27, isPy27,
fetchFromGitea, fetchFromGitea,
substituteAll, replaceVars,
fetchpatch, fetchpatch,
colord, colord,
setuptools, setuptools,
@ -38,8 +38,7 @@ buildPythonPackage rec {
}; };
patches = [ patches = [
(substituteAll { (replaceVars ./default-icc-profile.patch {
src = ./default-icc-profile.patch;
srgbProfile = srgbProfile =
if stdenv.hostPlatform.isDarwin then if stdenv.hostPlatform.isDarwin then
"/System/Library/ColorSync/Profiles/sRGB Profile.icc" "/System/Library/ColorSync/Profiles/sRGB Profile.icc"

View file

@ -1,7 +1,7 @@
{ {
lib, lib,
buildPythonPackage, buildPythonPackage,
substituteAll, replaceVars,
fetchPypi, fetchPypi,
hatchling, hatchling,
}: }:
@ -20,8 +20,7 @@ buildPythonPackage rec {
patches = [ patches = [
# Cannot use hatch-vcs, due to an inifinite recursion # Cannot use hatch-vcs, due to an inifinite recursion
(substituteAll { (replaceVars ./version.patch {
src = ./version.patch;
inherit version; inherit version;
}) })
]; ];

View file

@ -2,7 +2,7 @@
lib, lib,
buildPythonPackage, buildPythonPackage,
fetchFromGitHub, fetchFromGitHub,
substituteAll, replaceVars,
# build-system # build-system
setuptools, setuptools,
@ -29,8 +29,7 @@ buildPythonPackage rec {
}; };
patches = [ patches = [
(substituteAll { (replaceVars ./version.patch {
src = ./version.patch;
inherit version; inherit version;
}) })
]; ];

View file

@ -6,7 +6,7 @@
krb5-c, krb5-c,
pythonOlder, pythonOlder,
setuptools, setuptools,
substituteAll, replaceVars,
}: }:
buildPythonPackage rec { buildPythonPackage rec {
@ -22,8 +22,7 @@ buildPythonPackage rec {
}; };
patches = [ patches = [
(substituteAll { (replaceVars ./fix-paths.patch {
src = ./fix-paths.patch;
inherit findutils; inherit findutils;
krb5 = krb5-c; krb5 = krb5-c;
# krb5-config is in dev output # krb5-config is in dev output

View file

@ -10,7 +10,7 @@
numpy, numpy,
cffi, cffi,
openfst, openfst,
substituteAll, replaceVars,
callPackage, callPackage,
}: }:
@ -43,8 +43,7 @@ buildPythonPackage rec {
# Uses the dependencies' binaries from $PATH instead of a specific directory # Uses the dependencies' binaries from $PATH instead of a specific directory
./0002-exec-path.patch ./0002-exec-path.patch
# Makes it dynamically link to the correct Kaldi library # Makes it dynamically link to the correct Kaldi library
(substituteAll { (replaceVars ./0003-ffi-path.patch {
src = ./0003-ffi-path.patch;
kaldiFork = "${kaldi}/lib"; kaldiFork = "${kaldi}/lib";
}) })
]; ];

View file

@ -6,7 +6,7 @@
rustPlatform, rustPlatform,
cmake, cmake,
nasm, nasm,
substituteAll, replaceVars,
libiconv, libiconv,
}: }:
@ -36,8 +36,7 @@ buildPythonPackage rec {
# The path dependency doesn't vendor the dependencies correctly, so get kornia-rs from crates instead. # The path dependency doesn't vendor the dependencies correctly, so get kornia-rs from crates instead.
patches = [ patches = [
(substituteAll { (replaceVars ./kornia-rs-from-crates.patch {
src = ./kornia-rs-from-crates.patch;
inherit version; inherit version;
}) })
]; ];

View file

@ -3,7 +3,7 @@
buildPythonPackage, buildPythonPackage,
isPy27, isPy27,
fetchPypi, fetchPypi,
substituteAll, replaceVars,
pkgs, pkgs,
pytestCheckHook, pytestCheckHook,
}: }:
@ -20,8 +20,7 @@ buildPythonPackage rec {
}; };
patches = [ patches = [
(substituteAll { (replaceVars ./fix-paths.patch {
src = ./fix-paths.patch;
libevdev = lib.getLib pkgs.libevdev; libevdev = lib.getLib pkgs.libevdev;
}) })
]; ];

Some files were not shown because too many files have changed in this diff Show more