3
0
Fork 0
forked from mirrors/nixpkgs

treewide: makeSetupHook deps -> propagatedBuildInputs

This commit is contained in:
Artturin 2023-01-01 22:10:24 +02:00
parent 8be7ab60b1
commit 4e3dcf364e
19 changed files with 88 additions and 89 deletions

View file

@ -363,7 +363,7 @@ rec {
vimGenDocHook = callPackage ({ vim }:
makeSetupHook {
name = "vim-gen-doc-hook";
deps = [ vim ];
propagatedBuildInputs = [ vim ];
substitutions = {
vimBinary = "${vim}/bin/vim";
inherit rtpPath;
@ -373,7 +373,7 @@ rec {
vimCommandCheckHook = callPackage ({ neovim-unwrapped }:
makeSetupHook {
name = "vim-command-check-hook";
deps = [ neovim-unwrapped ];
propagatedBuildInputs = [ neovim-unwrapped ];
substitutions = {
vimBinary = "${neovim-unwrapped}/bin/nvim";
inherit rtpPath;
@ -383,7 +383,7 @@ rec {
neovimRequireCheckHook = callPackage ({ neovim-unwrapped }:
makeSetupHook {
name = "neovim-require-check-hook";
deps = [ neovim-unwrapped ];
propagatedBuildInputs = [ neovim-unwrapped ];
substitutions = {
nvimBinary = "${neovim-unwrapped}/bin/nvim";
inherit rtpPath;

View file

@ -20,7 +20,7 @@ in
dotnetConfigureHook = callPackage ({ }:
makeSetupHook {
name = "dotnet-configure-hook";
deps = [ dotnet-sdk nuget-source ];
propagatedBuildInputs = [ dotnet-sdk nuget-source ];
substitutions = {
nugetSource = nuget-source;
inherit runtimeId;
@ -30,7 +30,7 @@ in
dotnetBuildHook = callPackage ({ }:
makeSetupHook {
name = "dotnet-build-hook";
deps = [ dotnet-sdk ];
propagatedBuildInputs = [ dotnet-sdk ];
substitutions = {
inherit buildType runtimeId;
};
@ -39,7 +39,7 @@ in
dotnetCheckHook = callPackage ({ }:
makeSetupHook {
name = "dotnet-check-hook";
deps = [ dotnet-test-sdk ];
propagatedBuildInputs = [ dotnet-test-sdk ];
substitutions = {
inherit buildType libraryPath;
disabledTests = lib.optionalString (disabledTests != [])
@ -54,7 +54,7 @@ in
dotnetInstallHook = callPackage ({ }:
makeSetupHook {
name = "dotnet-install-hook";
deps = [ dotnet-sdk ];
propagatedBuildInputs = [ dotnet-sdk ];
substitutions = {
inherit buildType runtimeId;
};
@ -63,7 +63,7 @@ in
dotnetFixupHook = callPackage ({ }:
makeSetupHook {
name = "dotnet-fixup-hook";
deps = [ dotnet-runtime ];
propagatedBuildInputs = [ dotnet-runtime ];
substitutions = {
dotnetRuntime = dotnet-runtime;
runtimeDeps = libraryPath;

View file

@ -26,7 +26,7 @@
npmInstallHook = makeSetupHook
{
name = "npm-install-hook";
deps = [ buildPackages.makeWrapper ];
propagatedBuildInputs = [ buildPackages.makeWrapper ];
substitutions = {
hostNode = "${nodejs}/bin/node";
jq = "${buildPackages.jq}/bin/jq";

View file

@ -31,7 +31,7 @@ in {
cargoBuildHook = callPackage ({ }:
makeSetupHook {
name = "cargo-build-hook.sh";
deps = [ cargo ];
propagatedBuildInputs = [ cargo ];
substitutions = {
inherit ccForBuild ccForHost cxxForBuild cxxForHost
rustBuildPlatform rustTargetPlatform rustTargetPlatformSpec;
@ -41,7 +41,7 @@ in {
cargoCheckHook = callPackage ({ }:
makeSetupHook {
name = "cargo-check-hook.sh";
deps = [ cargo ];
propagatedBuildInputs = [ cargo ];
substitutions = {
inherit rustTargetPlatformSpec;
};
@ -50,7 +50,7 @@ in {
cargoInstallHook = callPackage ({ }:
makeSetupHook {
name = "cargo-install-hook.sh";
deps = [ ];
propagatedBuildInputs = [ ];
substitutions = {
inherit shortTarget;
};
@ -59,7 +59,7 @@ in {
cargoNextestHook = callPackage ({ }:
makeSetupHook {
name = "cargo-nextest-hook.sh";
deps = [ cargo cargo-nextest ];
propagatedBuildInputs = [ cargo cargo-nextest ];
substitutions = {
inherit rustTargetPlatformSpec;
};
@ -68,7 +68,7 @@ in {
cargoSetupHook = callPackage ({ }:
makeSetupHook {
name = "cargo-setup-hook.sh";
deps = [ ];
propagatedBuildInputs = [ ];
substitutions = {
defaultConfig = ../fetchcargo-default-config.toml;
@ -117,7 +117,7 @@ in {
maturinBuildHook = callPackage ({ }:
makeSetupHook {
name = "maturin-build-hook.sh";
deps = [ cargo maturin rustc ];
propagatedBuildInputs = [ cargo maturin rustc ];
substitutions = {
inherit ccForBuild ccForHost cxxForBuild cxxForHost
rustBuildPlatform rustTargetPlatform rustTargetPlatformSpec;

View file

@ -11,8 +11,7 @@
makeSetupHook {
name = "make-binary-wrapper-hook";
deps = [ dieHook ]
propagatedBuildInputs = [ dieHook ]
# https://github.com/NixOS/nixpkgs/issues/148189
++ lib.optional (stdenv.isDarwin && stdenv.isAarch64) cc;

View file

@ -594,32 +594,32 @@ rec {
/*
Make a package that just contains a setup hook with the given contents.
This setup hook will be invoked by any package that includes this package
as a buildInput. Optionally takes a list of substitutions that should be
applied to the resulting script.
Examples:
# setup hook that depends on the hello package and runs ./myscript.sh
myhellohook = makeSetupHook { deps = [ hello ]; } ./myscript.sh;
# writes a Linux-exclusive setup hook where @bash@ myscript.sh is substituted for the
# bash interpreter.
myhellohookSub = makeSetupHook {
name = "myscript-hook";
deps = [ hello ];
substitutions = { bash = "${pkgs.bash}/bin/bash"; };
meta.platforms = lib.platforms.linux;
} ./myscript.sh;
# setup hook with a package test
myhellohookTested = makeSetupHook {
name = "myscript-hook";
deps = [ hello ];
substitutions = { bash = "${pkgs.bash}/bin/bash"; };
meta.platforms = lib.platforms.linux;
passthru.tests.greeting = callPackage ./test { };
} ./myscript.sh;
* Make a package that just contains a setup hook with the given contents.
* This setup hook will be invoked by any package that includes this package
* as a buildInput. Optionally takes a list of substitutions that should be
* applied to the resulting script.
*
* Examples:
* # setup hook that depends on the hello package and runs ./myscript.sh
* myhellohook = makeSetupHook { propagatedBuildInputs = [ hello ]; } ./myscript.sh;
*
* # writes a Linux-exclusive setup hook where @bash@ myscript.sh is substituted for the
* # bash interpreter.
* myhellohookSub = makeSetupHook {
* name = "myscript-hook";
* propagatedBuildInputs = [ hello ];
* substitutions = { bash = "${pkgs.bash}/bin/bash"; };
* meta.platforms = lib.platforms.linux;
* } ./myscript.sh;
*
* # setup hook with a package test
* myhellohookTested = makeSetupHook {
* name = "myscript-hook";
* propagatedBuildInputs = [ hello ];
* substitutions = { bash = "${pkgs.bash}/bin/bash"; };
* meta.platforms = lib.platforms.linux;
* passthru.tests.greeting = callPackage ./test { };
* } ./myscript.sh;
*/
makeSetupHook =
{ name ? lib.warn "calling makeSetupHook without passing a name is deprecated." "hook"

View file

@ -27,7 +27,7 @@ in {
luarocksCheckHook = callPackage ({ luarocks }:
makeSetupHook {
name = "luarocks-check-hook";
deps = [ luarocks ];
propagatedBuildInputs = [ luarocks ];
} ./luarocks-check-hook.sh) {};
# luarocks installs data in a non-overridable location. Until a proper luarocks patch,
@ -35,6 +35,6 @@ in {
luarocksMoveDataFolder = callPackage ({ }:
makeSetupHook {
name = "luarocks-move-rock";
deps = [ ];
propagatedBuildInputs = [ ];
} ./luarocks-move-data.sh) {};
}

View file

@ -8,7 +8,7 @@
# imported as wrapLua in lua-packages.nix and passed to build-lua-derivation to be used as buildInput
makeSetupHook {
name = "wrap-lua-hook";
deps = [ makeWrapper ];
propagatedBuildInputs = [ makeWrapper ];
substitutions.executable = lua.interpreter;
substitutions.lua = lua;
substitutions.LuaPathSearchPaths = lib.escapeShellArgs lua.LuaPathSearchPaths;

View file

@ -10,7 +10,7 @@
# Each of the substitutions is available in the wrap.sh script as @thingSubstituted@
makeSetupHook {
name = "${octave.name}-pkgs-setup-hook";
deps = [ makeWrapper ];
propagatedBuildInputs = [ makeWrapper ];
substitutions.executable = octave.interpreter;
substitutions.octave = octave;
} ./wrap.sh

View file

@ -11,7 +11,7 @@ in {
condaInstallHook = callPackage ({ makePythonHook, gnutar, lbzip2 }:
makePythonHook {
name = "conda-install-hook";
deps = [ gnutar lbzip2 ];
propagatedBuildInputs = [ gnutar lbzip2 ];
substitutions = {
inherit pythonSitePackages;
};
@ -20,19 +20,19 @@ in {
condaUnpackHook = callPackage ({ makePythonHook }:
makePythonHook {
name = "conda-unpack-hook";
deps = [];
propagatedBuildInputs = [];
} ./conda-unpack-hook.sh) {};
eggBuildHook = callPackage ({ makePythonHook }:
makePythonHook {
name = "egg-build-hook.sh";
deps = [ ];
propagatedBuildInputs = [ ];
} ./egg-build-hook.sh) {};
eggInstallHook = callPackage ({ makePythonHook, setuptools }:
makePythonHook {
name = "egg-install-hook.sh";
deps = [ setuptools ];
propagatedBuildInputs = [ setuptools ];
substitutions = {
inherit pythonInterpreter pythonSitePackages;
};
@ -41,13 +41,13 @@ in {
eggUnpackHook = callPackage ({ makePythonHook, }:
makePythonHook {
name = "egg-unpack-hook.sh";
deps = [ ];
propagatedBuildInputs = [ ];
} ./egg-unpack-hook.sh) {};
flitBuildHook = callPackage ({ makePythonHook, flit }:
makePythonHook {
name = "flit-build-hook";
deps = [ flit ];
propagatedBuildInputs = [ flit ];
substitutions = {
inherit pythonInterpreter;
};
@ -56,7 +56,7 @@ in {
pipBuildHook = callPackage ({ makePythonHook, pip, wheel }:
makePythonHook {
name = "pip-build-hook.sh";
deps = [ pip wheel ];
propagatedBuildInputs = [ pip wheel ];
substitutions = {
inherit pythonInterpreter pythonSitePackages;
};
@ -65,7 +65,7 @@ in {
pipInstallHook = callPackage ({ makePythonHook, pip }:
makePythonHook {
name = "pip-install-hook";
deps = [ pip ];
propagatedBuildInputs = [ pip ];
substitutions = {
inherit pythonInterpreter pythonSitePackages;
};
@ -74,7 +74,7 @@ in {
pytestCheckHook = callPackage ({ makePythonHook, pytest }:
makePythonHook {
name = "pytest-check-hook";
deps = [ pytest ];
propagatedBuildInputs = [ pytest ];
substitutions = {
inherit pythonCheckInterpreter;
};
@ -123,7 +123,7 @@ in {
pythonRelaxDepsHook = callPackage ({ makePythonHook, wheel }:
makePythonHook {
name = "python-relax-deps-hook";
deps = [ wheel ];
propagatedBuildInputs = [ wheel ];
substitutions = {
inherit pythonInterpreter;
};
@ -145,7 +145,7 @@ in {
setuptoolsBuildHook = callPackage ({ makePythonHook, setuptools, wheel }:
makePythonHook {
name = "setuptools-setup-hook";
deps = [ setuptools wheel ];
propagatedBuildInputs = [ setuptools wheel ];
substitutions = {
inherit pythonInterpreter pythonSitePackages setuppy;
};
@ -154,7 +154,7 @@ in {
setuptoolsCheckHook = callPackage ({ makePythonHook, setuptools }:
makePythonHook {
name = "setuptools-check-hook";
deps = [ setuptools ];
propagatedBuildInputs = [ setuptools ];
substitutions = {
inherit pythonCheckInterpreter setuppy;
};
@ -171,7 +171,7 @@ in {
venvShellHook = disabledIf (!isPy3k) (callPackage ({ makePythonHook, ensureNewerSourcesForZipFilesHook }:
makePythonHook {
name = "venv-shell-hook";
deps = [ ensureNewerSourcesForZipFilesHook ];
propagatedBuildInputs = [ ensureNewerSourcesForZipFilesHook ];
substitutions = {
inherit pythonInterpreter;
};
@ -180,7 +180,7 @@ in {
wheelUnpackHook = callPackage ({ makePythonHook, wheel }:
makePythonHook {
name = "wheel-unpack-hook.sh";
deps = [ wheel ];
propagatedBuildInputs = [ wheel ];
} ./wheel-unpack-hook.sh) {};
wrapPython = callPackage ../wrap-python.nix {
@ -190,6 +190,6 @@ in {
sphinxHook = callPackage ({ makePythonHook, sphinx, installShellFiles }:
makePythonHook {
name = "python${python.pythonVersion}-sphinx-hook";
deps = [ sphinx installShellFiles ];
propagatedBuildInputs = [ sphinx installShellFiles ];
} ./sphinx-hook.sh) {};
}

View file

@ -5,7 +5,7 @@
makePythonHook {
name = "wrap-python-hook";
deps = [ makeWrapper ];
propagatedBuildInputs = [ makeWrapper ];
substitutions.sitePackages = python.sitePackages;
substitutions.executable = python.interpreter;
substitutions.python = python.pythonForBuild;

View file

@ -53,7 +53,7 @@ let
libdir = "lib/${libPrefix}";
tclPackageHook = callPackage ({ buildPackages }: makeSetupHook {
name = "tcl-package-hook";
deps = [ buildPackages.makeWrapper ];
propagatedBuildInputs = [ buildPackages.makeWrapper ];
} ./tcl-package-hook.sh) {};
};
};

View file

@ -211,7 +211,7 @@ let
qmake = makeSetupHook {
name = "qmake-hook";
deps = [ self.qtbase.dev ];
propagatedBuildInputs = [ self.qtbase.dev ];
substitutions = {
inherit debug;
fix_qmake_libtool = ../hooks/fix-qmake-libtool.sh;
@ -220,7 +220,7 @@ let
wrapQtAppsHook = makeSetupHook {
name = "wrap-qt5-apps-hook";
deps = [ self.qtbase.dev buildPackages.makeWrapper ]
propagatedBuildInputs = [ self.qtbase.dev buildPackages.makeWrapper ]
++ lib.optional stdenv.isLinux self.qtwayland.dev;
} ../hooks/wrap-qt-apps-hook.sh;
};

View file

@ -141,12 +141,12 @@ let
wrapQtAppsHook = makeSetupHook {
name = "wrap-qt6-apps-hook";
deps = [ buildPackages.makeWrapper ];
propagatedBuildInputs = [ buildPackages.makeWrapper ];
} ./hooks/wrap-qt-apps-hook.sh;
qmake = makeSetupHook {
name = "qmake6-hook";
deps = [ self.qtbase.dev ];
propagatedBuildInputs = [ self.qtbase.dev ];
substitutions = {
inherit debug;
fix_qmake_libtool = ./hooks/fix-qmake-libtool.sh;

View file

@ -18,7 +18,7 @@ let
makeSetupHook
{
name = "remove-path-dependencies.sh";
deps = [ ];
propagatedBuildInputs = [ ];
substitutions = {
# NOTE: We have to use a non-overlayed Python here because otherwise we run into an infinite recursion
# because building of tomlkit and its dependencies also use these hooks.
@ -50,7 +50,7 @@ in
makeSetupHook
{
name = "pip-build-hook.sh";
deps = [ pip wheel ];
propagatedBuildInputs = [ pip wheel ];
substitutions = {
inherit pythonInterpreter pythonSitePackages;
};
@ -64,7 +64,7 @@ in
makeSetupHook
{
name = "fixup-hook.sh";
deps = [ ];
propagatedBuildInputs = [ ];
substitutions = {
inherit pythonSitePackages;
filenames = builtins.concatStringsSep " " [
@ -84,7 +84,7 @@ in
makeSetupHook
{
name = "wheel-unpack-hook.sh";
deps = [ ];
propagatedBuildInputs = [ ];
} ./wheel-unpack-hook.sh
)
{ };

View file

@ -26,7 +26,7 @@ self: super:
{
wrapWithXFileSearchPathHook = callPackage ({ makeBinaryWrapper, makeSetupHook, writeScript }: makeSetupHook {
name = "wrapWithXFileSearchPathHook";
deps = [ makeBinaryWrapper ];
propagatedBuildInputs = [ makeBinaryWrapper ];
} (writeScript "wrapWithXFileSearchPathHook.sh" ''
wrapWithXFileSearchPath() {
paths=(

View file

@ -160,14 +160,14 @@ with pkgs;
### BUILD SUPPORT
auditBlasHook = makeSetupHook
{ name = "auto-blas-hook"; deps = [ blas lapack ]; }
{ name = "auto-blas-hook"; propagatedBuildInputs = [ blas lapack ]; }
../build-support/setup-hooks/audit-blas.sh;
autoreconfHook = callPackage (
{ makeSetupHook, autoconf, automake, gettext, libtool }:
makeSetupHook {
name = "autoreconf-hook";
deps = [ autoconf automake gettext libtool ];
propagatedBuildInputs = [ autoconf automake gettext libtool ];
} ../build-support/setup-hooks/autoreconf.sh
) { };
@ -184,7 +184,7 @@ with pkgs;
autoPatchelfHook = makeSetupHook {
name = "auto-patchelf-hook";
deps = [ bintools ];
propagatedBuildInputs = [ bintools ];
substitutions = {
pythonInterpreter = "${python3.withPackages (ps: [ ps.pyelftools ])}/bin/python";
autoPatchelfScript = ../build-support/setup-hooks/auto-patchelf.py;
@ -356,7 +356,7 @@ with pkgs;
gogUnpackHook = makeSetupHook {
name = "gog-unpack-hook";
deps = [ innoextract file-rename ]; }
propagatedBuildInputs = [ innoextract file-rename ]; }
../build-support/setup-hooks/gog-unpack.sh;
buildEnv = callPackage ../build-support/buildenv { }; # not actually a package
@ -1012,7 +1012,7 @@ with pkgs;
makeShellWrapper = makeSetupHook {
name = "make-shell-wrapper-hook";
deps = [ dieHook ];
propagatedBuildInputs = [ dieHook ];
substitutions = {
# targetPackages.runtimeShell only exists when pkgs == targetPackages (when targetPackages is not __raw)
shell = if targetPackages ? runtimeShell then targetPackages.runtimeShell else throw "makeWrapper/makeShellWrapper must be in nativeBuildInputs";
@ -1063,7 +1063,7 @@ with pkgs;
shortenPerlShebang = makeSetupHook {
name = "shorten-perl-shebang-hook";
deps = [ dieHook ];
propagatedBuildInputs = [ dieHook ];
} ../build-support/setup-hooks/shorten-perl-shebang.sh;
singularity-tools = callPackage ../build-support/singularity-tools { };
@ -1115,7 +1115,7 @@ with pkgs;
desktopToDarwinBundle = makeSetupHook {
name = "desktop-to-darwin-bundle-hook";
deps = [ writeDarwinBundle librsvg imagemagick python3Packages.icnsutil ];
propagatedBuildInputs = [ writeDarwinBundle librsvg imagemagick python3Packages.icnsutil ];
} ../build-support/setup-hooks/desktop-to-darwin-bundle.sh;
keepBuildTree = makeSetupHook {
@ -1128,7 +1128,7 @@ with pkgs;
makeGCOVReport = makeSetupHook {
name = "make-gcov-report-hook";
deps = [ lcov enableGCOVInstrumentation ];
propagatedBuildInputs = [ lcov enableGCOVInstrumentation ];
} ../build-support/setup-hooks/make-coverage-analysis-report.sh;
makeHardcodeGsettingsPatch = callPackage ../build-support/make-hardcode-gsettings-patch { };
@ -1163,7 +1163,7 @@ with pkgs;
iconConvTools = callPackage ../build-support/icon-conv-tools {};
validatePkgConfig = makeSetupHook
{ name = "validate-pkg-config"; deps = [ findutils pkg-config ]; }
{ name = "validate-pkg-config"; propagatedBuildInputs = [ findutils pkg-config ]; }
../build-support/setup-hooks/validate-pkg-config.sh;
patchPpdFilesHook = callPackage ../build-support/setup-hooks/patch-ppd-files {};
@ -18778,13 +18778,13 @@ with pkgs;
xcbuild = xcodebuild;
xcbuildHook = makeSetupHook {
name = "xcbuild-hook";
deps = [ xcbuild ];
propagatedBuildInputs = [ xcbuild ];
} ../development/tools/xcbuild/setup-hook.sh ;
# xcbuild with llvm 6
xcbuild6Hook = makeSetupHook {
name = "xcbuild6-hook";
deps = [ xcodebuild6 ];
propagatedBuildInputs = [ xcodebuild6 ];
} ../development/tools/xcbuild/setup-hook.sh ;
xcpretty = callPackage ../development/tools/xcpretty { };
@ -22049,7 +22049,7 @@ with pkgs;
memorymapping = callPackage ../development/libraries/memorymapping { };
memorymappingHook = makeSetupHook {
name = "memorymapping-hook";
deps = [ memorymapping ];
propagatedBuildInputs = [ memorymapping ];
} ../development/libraries/memorymapping/setup-hook.sh;
memray = callPackage ../development/tools/memray { };
@ -22057,7 +22057,7 @@ with pkgs;
memstream = callPackage ../development/libraries/memstream { };
memstreamHook = makeSetupHook {
name = "memstream-hook";
deps = [ memstream ];
propagatedBuildInputs = [ memstream ];
} ../development/libraries/memstream/setup-hook.sh;
menu-cache = callPackage ../development/libraries/menu-cache { };

View file

@ -50,7 +50,7 @@ let
autoAddOpenGLRunpathHook = final.callPackage ( { makeSetupHook, addOpenGLRunpath }:
makeSetupHook {
name = "auto-add-opengl-runpath-hook";
deps = [
propagatedBuildInputs = [
addOpenGLRunpath
];
} ../development/compilers/cudatoolkit/auto-add-opengl-runpath-hook.sh

View file

@ -121,7 +121,7 @@ impure-cmds // appleSourcePackages // chooseLibs // {
checkReexportsHook = pkgs.makeSetupHook {
name = "darwin-check-reexports-hook";
deps = [ pkgs.darwin.print-reexports ];
propagatedBuildInputs = [ pkgs.darwin.print-reexports ];
} ../os-specific/darwin/print-reexports/setup-hook.sh;
sigtool = callPackage ../os-specific/darwin/sigtool { };
@ -142,7 +142,7 @@ impure-cmds // appleSourcePackages // chooseLibs // {
autoSignDarwinBinariesHook = pkgs.makeSetupHook {
name = "auto-sign-darwin-binaries-hook";
deps = [ self.signingUtils ];
propagatedBuildInputs = [ self.signingUtils ];
} ../os-specific/darwin/signing-utils/auto-sign-hook.sh;
maloader = callPackage ../os-specific/darwin/maloader {