Merge pull request #208537 from Artturin/makesetuphooksupportstrictdeps

This commit is contained in:
Artturi 2023-02-10 20:08:32 +02:00 committed by GitHub
commit aaa9ea8ec6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
24 changed files with 173 additions and 134 deletions

View File

@ -6,6 +6,7 @@
This chapter describes several special builders.
</para>
<xi:include href="special/fhs-environments.section.xml" />
<xi:include href="special/makesetuphook.section.xml" />
<xi:include href="special/mkshell.section.xml" />
<xi:include href="special/darwin-builder.section.xml" />
</chapter>

View File

@ -0,0 +1,37 @@
# pkgs.makeSetupHook {#sec-pkgs.makeSetupHook}
`pkgs.makeSetupHook` is a builder that produces hooks that go in to `nativeBuildInputs`
## Usage {#sec-pkgs.makeSetupHook-usage}
```nix
pkgs.makeSetupHook {
name = "something-hook";
propagatedBuildInputs = [ pkgs.commandsomething ];
depsTargetTargetPropagated = [ pkgs.libsomething ];
} ./script.sh
```
#### setup hook that depends on the hello package and runs hello and @shell@ is substituted with path to bash
```nix
pkgs.makeSetupHook {
name = "run-hello-hook";
propagatedBuildInputs = [ pkgs.hello ];
substitutions = { shell = "${pkgs.bash}/bin/bash"; };
passthru.tests.greeting = callPackage ./test { };
meta.platforms = lib.platforms.linux;
} (writeScript "run-hello-hook.sh" ''
#!@shell@
hello
'')
```
## Attributes
* `name` Set the name of the hook.
* `propagatedBuildInputs` Runtime dependencies (such as binaries) of the hook.
* `depsTargetTargetPropagated` Non-binary dependencies.
* `meta`
* `passthru`
* `substitutions` Variables for `substituteAll`

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

@ -9,12 +9,15 @@
, dconf
, callPackage
, wrapGAppsHook
, writeTextFile
, targetPackages
}:
makeSetupHook {
name = "wrap-gapps-hook";
deps = lib.optionals (!stdenv.isDarwin) [
propagatedBuildInputs = [
# We use the wrapProgram function.
makeWrapper
] ++ lib.optionals (!stdenv.isDarwin) [
# It is highly probable that a program will use GSettings,
# at minimum through GTK file chooser dialogue.
# Lets add a GIO module for “dconf” GSettings backend
@ -23,19 +26,22 @@ makeSetupHook {
# Unfortunately, it also requires the user to have dconf
# D-Bus service enabled globally (e.g. through a NixOS module).
dconf.lib
] ++ lib.optionals isGraphical [
# TODO: remove this, packages should depend on GTK explicitly.
gtk3
librsvg
];
# depsTargetTargetPropagated will essentially be buildInputs when wrapGAppsHook is placed into nativeBuildInputs
# the librsvg above should be removed but kept to not break anything that implicitly depended on its binaries
depsTargetTargetPropagated = assert (lib.assertMsg (!targetPackages ? raw) "wrapGAppsHook must be in nativeBuildInputs"); lib.optionals isGraphical [
# librsvg provides a module for gdk-pixbuf to allow rendering
# SVG icons. Most icon themes are SVG-based and so are some
# graphics in GTK (e.g. cross for closing window in window title bar)
# so it is pretty much required for applications using GTK.
librsvg
] ++ [
# We use the wrapProgram function.
makeWrapper
];
passthru = {
tests = let
@ -65,6 +71,15 @@ makeSetupHook {
''
);
basic-contains-gdk-pixbuf = let
tested = basic;
in testLib.runTest "basic-contains-gdk-pixbuf" (
testLib.skip stdenv.isDarwin ''
${expectSomeLineContainingYInFileXToMentionZ "${tested}/bin/foo" "GDK_PIXBUF_MODULE_FILE" "${lib.getLib librsvg}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"}
${expectSomeLineContainingYInFileXToMentionZ "${tested}/libexec/bar" "GDK_PIXBUF_MODULE_FILE" "${lib.getLib librsvg}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"}
''
);
# Simple derivation containing a gobject-introspection typelib.
typelib-Mahjong = stdenv.mkDerivation {
name = "typelib-Mahjong";

View File

@ -1,7 +1,7 @@
{ lib, runCommand }:
rec {
runTest = name: body: runCommand name { } ''
runTest = name: body: runCommand name { strictDeps = true; } ''
set -o errexit
${body}
touch $out

View File

@ -593,45 +593,28 @@ rec {
in linkFarm name (map mkEntryFromDrv drvs);
/*
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;
*/
# docs in doc/builders/special/makesetuphook.section.md
makeSetupHook =
{ name ? lib.warn "calling makeSetupHook without passing a name is deprecated." "hook"
, deps ? []
, substitutions ? {}
, meta ? {}
, passthru ? {}
, deps ? [ ]
# hooks go in nativeBuildInput so these will be nativeBuildInput
, propagatedBuildInputs ? [ ]
# these will be buildInputs
, depsTargetTargetPropagated ? [ ]
, meta ? { }
, passthru ? { }
, substitutions ? { }
}:
script:
runCommand name
(substitutions // {
inherit meta;
inherit depsTargetTargetPropagated;
propagatedBuildInputs =
# remove list conditionals before 23.11
lib.warnIf (!lib.isList deps) "'deps' argument to makeSetupHook must be a list. content of deps: ${toString deps}"
(lib.warnIf (deps != [ ]) "'deps' argument to makeSetupHook is deprecated and will be removed in release 23.11., Please use propagatedBuildInputs instead. content of deps: ${toString deps}"
propagatedBuildInputs ++ (if lib.isList deps then deps else [ deps ]));
strictDeps = true;
# TODO 2023-01, no backport: simplify to inherit passthru;
passthru = passthru
@ -642,8 +625,7 @@ rec {
(''
mkdir -p $out/nix-support
cp ${script} $out/nix-support/setup-hook
'' + lib.optionalString (deps != []) ''
printWords ${toString deps} > $out/nix-support/propagated-build-inputs
recordPropagatedDependencies
'' + lib.optionalString (substitutions != {}) ''
substituteAll ${script} $out/nix-support/setup-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

@ -995,6 +995,39 @@ stripHash() {
}
recordPropagatedDependencies() {
# Propagate dependencies into the development output.
declare -ra flatVars=(
# Build
depsBuildBuildPropagated
propagatedNativeBuildInputs
depsBuildTargetPropagated
# Host
depsHostHostPropagated
propagatedBuildInputs
# Target
depsTargetTargetPropagated
)
declare -ra flatFiles=(
"${propagatedBuildDepFiles[@]}"
"${propagatedHostDepFiles[@]}"
"${propagatedTargetDepFiles[@]}"
)
local propagatedInputsIndex
for propagatedInputsIndex in "${!flatVars[@]}"; do
local propagatedInputsSlice="${flatVars[$propagatedInputsIndex]}[@]"
local propagatedInputsFile="${flatFiles[$propagatedInputsIndex]}"
[[ "${!propagatedInputsSlice}" ]] || continue
mkdir -p "${!outputDev}/nix-support"
# shellcheck disable=SC2086
printWords ${!propagatedInputsSlice} > "${!outputDev}/nix-support/$propagatedInputsFile"
done
}
unpackCmdHooks+=(_defaultUnpack)
_defaultUnpack() {
local fn="$1"
@ -1379,36 +1412,8 @@ fixupPhase() {
done
# Propagate dependencies & setup hook into the development output.
declare -ra flatVars=(
# Build
depsBuildBuildPropagated
propagatedNativeBuildInputs
depsBuildTargetPropagated
# Host
depsHostHostPropagated
propagatedBuildInputs
# Target
depsTargetTargetPropagated
)
declare -ra flatFiles=(
"${propagatedBuildDepFiles[@]}"
"${propagatedHostDepFiles[@]}"
"${propagatedTargetDepFiles[@]}"
)
local propagatedInputsIndex
for propagatedInputsIndex in "${!flatVars[@]}"; do
local propagatedInputsSlice="${flatVars[$propagatedInputsIndex]}[@]"
local propagatedInputsFile="${flatFiles[$propagatedInputsIndex]}"
[[ "${!propagatedInputsSlice}" ]] || continue
mkdir -p "${!outputDev}/nix-support"
# shellcheck disable=SC2086
printWords ${!propagatedInputsSlice} > "${!outputDev}/nix-support/$propagatedInputsFile"
done
# record propagated dependencies & setup hook into the development output.
recordPropagatedDependencies
if [ -n "${setupHook:-}" ]; then
mkdir -p "${!outputDev}/nix-support"

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
@ -1014,7 +1014,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";
@ -1067,7 +1067,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 { };
@ -1119,7 +1119,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 {
@ -1132,7 +1132,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 { };
@ -1167,7 +1167,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 {};
@ -18793,13 +18793,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 { };
@ -22075,7 +22075,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 { };
@ -22083,7 +22083,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 {