mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 07:01:54 +00:00
treewide: add names to all setup hooks
This commit is contained in:
parent
ede51ce77b
commit
0ae87d514f
@ -10,6 +10,8 @@
|
||||
}:
|
||||
|
||||
makeSetupHook {
|
||||
name = "make-binary-wrapper-hook";
|
||||
|
||||
deps = [ dieHook ]
|
||||
# https://github.com/NixOS/nixpkgs/issues/148189
|
||||
++ lib.optional (stdenv.isDarwin && stdenv.isAarch64) cc;
|
||||
|
@ -25,7 +25,9 @@ makeScopeWithSplicing
|
||||
|
||||
mkXfceDerivation = callPackage ./mkXfceDerivation.nix { };
|
||||
|
||||
automakeAddFlags = pkgs.makeSetupHook { } ./automakeAddFlags.sh;
|
||||
automakeAddFlags = pkgs.makeSetupHook {
|
||||
name = "xfce-automake-add-flags-hook";
|
||||
} ./automakeAddFlags.sh;
|
||||
|
||||
#### CORE
|
||||
|
||||
|
@ -16,7 +16,9 @@ let
|
||||
|
||||
# Add all dependencies in buildInputs including propagated ones to
|
||||
# STACK_IN_NIX_EXTRA_ARGS.
|
||||
stackHook = makeSetupHook {} ./stack-hook.sh;
|
||||
stackHook = makeSetupHook {
|
||||
name = "stack-hook";
|
||||
} ./stack-hook.sh;
|
||||
|
||||
in stdenv.mkDerivation (args // {
|
||||
|
||||
|
@ -7,10 +7,10 @@
|
||||
# defined in trivial-builders.nix
|
||||
# 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;
|
||||
substitutions.executable = lua.interpreter;
|
||||
substitutions.lua = lua;
|
||||
substitutions.LuaPathSearchPaths = lib.escapeShellArgs lua.LuaPathSearchPaths;
|
||||
substitutions.LuaCPathSearchPaths = lib.escapeShellArgs lua.LuaPathSearchPaths;
|
||||
} ./wrap.sh
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
with lib;
|
||||
|
||||
makePythonHook {
|
||||
name = "wrap-python-hook";
|
||||
deps = makeWrapper;
|
||||
substitutions.sitePackages = python.sitePackages;
|
||||
substitutions.executable = python.interpreter;
|
||||
|
@ -203,6 +203,7 @@ let
|
||||
++ lib.optional (stdenv.isDarwin) qtmacextras);
|
||||
|
||||
qmake = makeSetupHook {
|
||||
name = "qmake-hook";
|
||||
deps = [ self.qtbase.dev ];
|
||||
substitutions = {
|
||||
inherit debug;
|
||||
@ -211,6 +212,7 @@ let
|
||||
} ../hooks/qmake-hook.sh;
|
||||
|
||||
wrapQtAppsHook = makeSetupHook {
|
||||
name = "wrap-qt5-apps-hook";
|
||||
deps = [ self.qtbase.dev buildPackages.makeWrapper ]
|
||||
++ lib.optional stdenv.isLinux self.qtwayland.dev;
|
||||
} ../hooks/wrap-qt-apps-hook.sh;
|
||||
|
@ -139,10 +139,12 @@ let
|
||||
};
|
||||
|
||||
wrapQtAppsHook = makeSetupHook {
|
||||
name = "wrap-qt6-apps-hook";
|
||||
deps = [ buildPackages.makeWrapper ];
|
||||
} ./hooks/wrap-qt-apps-hook.sh;
|
||||
|
||||
qmake = makeSetupHook {
|
||||
name = "qmake6-hook";
|
||||
deps = [ self.qtbase.dev ];
|
||||
substitutions = {
|
||||
inherit debug;
|
||||
|
@ -1,6 +1,7 @@
|
||||
{ lib, stdenv, pkgs, makeSetupHook, waf }:
|
||||
|
||||
makeSetupHook {
|
||||
name = "waf-hook";
|
||||
substitutions = {
|
||||
inherit waf;
|
||||
crossFlags = lib.optionalString (stdenv.hostPlatform.system != stdenv.targetPlatform.system)
|
||||
|
@ -12,7 +12,9 @@ with lib;
|
||||
let
|
||||
path = makeBinPath ([ mono python3 ] ++ optional (zenity != null) zenity);
|
||||
rpath = makeLibraryPath [ lua freetype openal SDL2 ];
|
||||
mkdirp = makeSetupHook { } ./mkdirp.sh;
|
||||
mkdirp = makeSetupHook {
|
||||
name = "openra-mkdirp-hook";
|
||||
} ./mkdirp.sh;
|
||||
|
||||
in {
|
||||
patchEngine = dir: version: ''
|
||||
|
@ -100,6 +100,7 @@ rec {
|
||||
+ lib.optionalString (stdenv.cc.isGNU or false) " -static-libgcc";
|
||||
nativeBuildInputs = (args.nativeBuildInputs or []) ++ [
|
||||
(pkgs.buildPackages.makeSetupHook {
|
||||
name = "darwin-portable-libSystem-hook";
|
||||
substitutions = {
|
||||
libsystem = "${stdenv.cc.libc}/lib/libSystem.B.dylib";
|
||||
};
|
||||
|
@ -159,9 +159,10 @@ with pkgs;
|
||||
|
||||
autoreconfHook = callPackage (
|
||||
{ makeSetupHook, autoconf, automake, gettext, libtool }:
|
||||
makeSetupHook
|
||||
{ deps = [ autoconf automake gettext libtool ]; }
|
||||
../build-support/setup-hooks/autoreconf.sh
|
||||
makeSetupHook {
|
||||
name = "autoreconf-hook";
|
||||
deps = [ autoconf automake gettext libtool ];
|
||||
} ../build-support/setup-hooks/autoreconf.sh
|
||||
) { };
|
||||
|
||||
autoreconfHook264 = autoreconfHook.override {
|
||||
@ -203,8 +204,9 @@ with pkgs;
|
||||
substitutions = { canonicalize_jar = canonicalize-jar; };
|
||||
} ../build-support/setup-hooks/canonicalize-jars.sh;
|
||||
|
||||
ensureNewerSourcesHook = { year }: makeSetupHook {}
|
||||
(writeScript "ensure-newer-sources-hook.sh" ''
|
||||
ensureNewerSourcesHook = { year }: makeSetupHook {
|
||||
name = "ensure-newer-sources-hook";
|
||||
} (writeScript "ensure-newer-sources-hook.sh" ''
|
||||
postUnpackHooks+=(_ensureNewerSources)
|
||||
_ensureNewerSources() {
|
||||
'${findutils}/bin/find' "$sourceRoot" \
|
||||
@ -337,9 +339,10 @@ with pkgs;
|
||||
# ValueError: ZIP does not support timestamps before 1980
|
||||
ensureNewerSourcesForZipFilesHook = ensureNewerSourcesHook { year = "1980"; };
|
||||
|
||||
updateAutotoolsGnuConfigScriptsHook = makeSetupHook
|
||||
{ substitutions = { gnu_config = gnu-config;}; }
|
||||
../build-support/setup-hooks/update-autotools-gnu-config-scripts.sh;
|
||||
updateAutotoolsGnuConfigScriptsHook = makeSetupHook {
|
||||
name = "update-autotools-gnu-config-scripts-hook";
|
||||
substitutions = { gnu_config = gnu-config; };
|
||||
} ../build-support/setup-hooks/update-autotools-gnu-config-scripts.sh;
|
||||
|
||||
gogUnpackHook = makeSetupHook {
|
||||
name = "gog-unpack-hook";
|
||||
@ -604,7 +607,9 @@ with pkgs;
|
||||
|
||||
diffPlugins = (callPackage ../build-support/plugins.nix {}).diffPlugins;
|
||||
|
||||
dieHook = makeSetupHook {} ../build-support/setup-hooks/die.sh;
|
||||
dieHook = makeSetupHook {
|
||||
name = "die-hook";
|
||||
} ../build-support/setup-hooks/die.sh;
|
||||
|
||||
archiver = callPackage ../applications/misc/archiver { };
|
||||
|
||||
@ -953,11 +958,15 @@ with pkgs;
|
||||
|
||||
madonctl = callPackage ../applications/misc/madonctl { };
|
||||
|
||||
copyDesktopItems = makeSetupHook { } ../build-support/setup-hooks/copy-desktop-items.sh;
|
||||
copyDesktopItems = makeSetupHook {
|
||||
name = "copy-desktop-items-hook";
|
||||
} ../build-support/setup-hooks/copy-desktop-items.sh;
|
||||
|
||||
makeDesktopItem = callPackage ../build-support/make-desktopitem { };
|
||||
|
||||
copyPkgconfigItems = makeSetupHook { } ../build-support/setup-hooks/copy-pkgconfig-items.sh;
|
||||
copyPkgconfigItems = makeSetupHook {
|
||||
name = "copy-pkg-config-items-hook";
|
||||
} ../build-support/setup-hooks/copy-pkgconfig-items.sh;
|
||||
|
||||
makePkgconfigItem = callPackage ../build-support/make-pkgconfigitem { };
|
||||
|
||||
@ -974,17 +983,17 @@ with pkgs;
|
||||
|
||||
makeWrapper = makeShellWrapper;
|
||||
|
||||
makeShellWrapper = makeSetupHook
|
||||
{ deps = [ 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";
|
||||
};
|
||||
passthru = {
|
||||
tests = tests.makeWrapper;
|
||||
};
|
||||
}
|
||||
../build-support/setup-hooks/make-wrapper.sh;
|
||||
makeShellWrapper = makeSetupHook {
|
||||
name = "make-shell-wrapper-hook";
|
||||
deps = [ 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";
|
||||
};
|
||||
passthru = {
|
||||
tests = tests.makeWrapper;
|
||||
};
|
||||
} ../build-support/setup-hooks/make-wrapper.sh;
|
||||
|
||||
makeBinaryWrapper = callPackage ../build-support/setup-hooks/make-binary-wrapper { };
|
||||
|
||||
@ -1025,9 +1034,10 @@ with pkgs;
|
||||
|
||||
setupSystemdUnits = callPackage ../build-support/setup-systemd-units.nix { };
|
||||
|
||||
shortenPerlShebang = makeSetupHook
|
||||
{ deps = [ dieHook ]; }
|
||||
../build-support/setup-hooks/shorten-perl-shebang.sh;
|
||||
shortenPerlShebang = makeSetupHook {
|
||||
name = "shorten-perl-shebang-hook";
|
||||
deps = [ dieHook ];
|
||||
} ../build-support/setup-hooks/shorten-perl-shebang.sh;
|
||||
|
||||
singularity-tools = callPackage ../build-support/singularity-tools { };
|
||||
|
||||
@ -1064,7 +1074,9 @@ with pkgs;
|
||||
|
||||
inherit (lib.systems) platforms;
|
||||
|
||||
setJavaClassPath = makeSetupHook { } ../build-support/setup-hooks/set-java-classpath.sh;
|
||||
setJavaClassPath = makeSetupHook {
|
||||
name = "set-java-classpath-hook";
|
||||
} ../build-support/setup-hooks/set-java-classpath.sh;
|
||||
|
||||
fixDarwinDylibNames = makeSetupHook {
|
||||
name = "fix-darwin-dylib-names-hook";
|
||||
@ -1075,23 +1087,31 @@ with pkgs;
|
||||
writeDarwinBundle = callPackage ../build-support/make-darwin-bundle/write-darwin-bundle.nix { };
|
||||
|
||||
desktopToDarwinBundle = makeSetupHook {
|
||||
name = "desktop-to-darwin-bundle-hook";
|
||||
deps = [ writeDarwinBundle librsvg imagemagick python3Packages.icnsutil ];
|
||||
} ../build-support/setup-hooks/desktop-to-darwin-bundle.sh;
|
||||
|
||||
keepBuildTree = makeSetupHook { } ../build-support/setup-hooks/keep-build-tree.sh;
|
||||
keepBuildTree = makeSetupHook {
|
||||
name = "keep-build-tree-hook";
|
||||
} ../build-support/setup-hooks/keep-build-tree.sh;
|
||||
|
||||
enableGCOVInstrumentation = makeSetupHook { } ../build-support/setup-hooks/enable-coverage-instrumentation.sh;
|
||||
enableGCOVInstrumentation = makeSetupHook {
|
||||
name = "enable-gcov-instrumentation-hook";
|
||||
} ../build-support/setup-hooks/enable-coverage-instrumentation.sh;
|
||||
|
||||
makeGCOVReport = makeSetupHook
|
||||
{ deps = [ lcov enableGCOVInstrumentation ]; }
|
||||
../build-support/setup-hooks/make-coverage-analysis-report.sh;
|
||||
makeGCOVReport = makeSetupHook {
|
||||
name = "make-gcov-report-hook";
|
||||
deps = [ lcov enableGCOVInstrumentation ];
|
||||
} ../build-support/setup-hooks/make-coverage-analysis-report.sh;
|
||||
|
||||
makeHardcodeGsettingsPatch = callPackage ../build-support/make-hardcode-gsettings-patch { };
|
||||
|
||||
# intended to be used like nix-build -E 'with import <nixpkgs> {}; enableDebugging fooPackage'
|
||||
enableDebugging = pkg: pkg.override { stdenv = stdenvAdapters.keepDebugInfo pkg.stdenv; };
|
||||
|
||||
findXMLCatalogs = makeSetupHook { } ../build-support/setup-hooks/find-xml-catalogs.sh;
|
||||
findXMLCatalogs = makeSetupHook {
|
||||
name = "find-xml-catalogs-hook";
|
||||
} ../build-support/setup-hooks/find-xml-catalogs.sh;
|
||||
|
||||
wrapGAppsHook = callPackage ../build-support/setup-hooks/wrap-gapps-hook {
|
||||
makeWrapper = makeBinaryWrapper;
|
||||
@ -1101,11 +1121,17 @@ with pkgs;
|
||||
|
||||
wrapGAppsNoGuiHook = wrapGAppsHook.override { isGraphical = false; };
|
||||
|
||||
separateDebugInfo = makeSetupHook { } ../build-support/setup-hooks/separate-debug-info.sh;
|
||||
separateDebugInfo = makeSetupHook {
|
||||
name = "separate-debug-info-hook";
|
||||
} ../build-support/setup-hooks/separate-debug-info.sh;
|
||||
|
||||
setupDebugInfoDirs = makeSetupHook { } ../build-support/setup-hooks/setup-debug-info-dirs.sh;
|
||||
setupDebugInfoDirs = makeSetupHook {
|
||||
name = "setup-debug-info-dirs-hook";
|
||||
} ../build-support/setup-hooks/setup-debug-info-dirs.sh;
|
||||
|
||||
useOldCXXAbi = makeSetupHook { } ../build-support/setup-hooks/use-old-cxx-abi.sh;
|
||||
useOldCXXAbi = makeSetupHook {
|
||||
name = "use-old-cxx-abi-hook";
|
||||
} ../build-support/setup-hooks/use-old-cxx-abi.sh;
|
||||
|
||||
iconConvTools = callPackage ../build-support/icon-conv-tools {};
|
||||
|
||||
@ -3729,7 +3755,9 @@ with pkgs;
|
||||
brutespray = callPackage ../tools/security/brutespray { };
|
||||
|
||||
breakpointHook = assert stdenv.buildPlatform.isLinux;
|
||||
makeSetupHook { } ../build-support/setup-hooks/breakpoint-hook.sh;
|
||||
makeSetupHook {
|
||||
name = "breakpoint-hook";
|
||||
} ../build-support/setup-hooks/breakpoint-hook.sh;
|
||||
|
||||
btrfs-progs = callPackage ../tools/filesystems/btrfs-progs { };
|
||||
|
||||
@ -18564,11 +18592,13 @@ with pkgs;
|
||||
xcodebuild6 = xcodebuild.override { stdenv = llvmPackages_6.stdenv; };
|
||||
xcbuild = xcodebuild;
|
||||
xcbuildHook = makeSetupHook {
|
||||
name = "xcbuild-hook";
|
||||
deps = [ xcbuild ];
|
||||
} ../development/tools/xcbuild/setup-hook.sh ;
|
||||
|
||||
# xcbuild with llvm 6
|
||||
xcbuild6Hook = makeSetupHook {
|
||||
name = "xcbuild6-hook";
|
||||
deps = [ xcodebuild6 ];
|
||||
} ../development/tools/xcbuild/setup-hook.sh ;
|
||||
|
||||
@ -21825,6 +21855,7 @@ with pkgs;
|
||||
|
||||
memorymapping = callPackage ../development/libraries/memorymapping { };
|
||||
memorymappingHook = makeSetupHook {
|
||||
name = "memorymapping-hook";
|
||||
deps = [ memorymapping ];
|
||||
} ../development/libraries/memorymapping/setup-hook.sh;
|
||||
|
||||
@ -21832,6 +21863,7 @@ with pkgs;
|
||||
|
||||
memstream = callPackage ../development/libraries/memstream { };
|
||||
memstreamHook = makeSetupHook {
|
||||
name = "memstream-hook";
|
||||
deps = [ memstream ];
|
||||
} ../development/libraries/memstream/setup-hook.sh;
|
||||
|
||||
@ -22507,9 +22539,10 @@ with pkgs;
|
||||
inherit (darwin.apple_sdk.frameworks) ApplicationServices OpenGL Cocoa AGL;
|
||||
};
|
||||
|
||||
qmake48Hook = makeSetupHook
|
||||
{ substitutions = { qt4 = qt48; }; }
|
||||
../development/libraries/qt-4.x/4.8/qmake-hook.sh;
|
||||
qmake48Hook = makeSetupHook {
|
||||
name = "qmake4.8-hook";
|
||||
substitutions = { qt4 = qt48; };
|
||||
} ../development/libraries/qt-4.x/4.8/qmake-hook.sh;
|
||||
|
||||
qmake4Hook = qmake48Hook;
|
||||
|
||||
|
@ -116,6 +116,7 @@ impure-cmds // appleSourcePackages // chooseLibs // {
|
||||
rewrite-tbd = callPackage ../os-specific/darwin/rewrite-tbd { };
|
||||
|
||||
checkReexportsHook = pkgs.makeSetupHook {
|
||||
name = "darwin-check-reexports-hook";
|
||||
deps = [ pkgs.darwin.print-reexports ];
|
||||
} ../os-specific/darwin/print-reexports/setup-hook.sh;
|
||||
|
||||
@ -136,6 +137,7 @@ impure-cmds // appleSourcePackages // chooseLibs // {
|
||||
signingUtils = callPackage ../os-specific/darwin/signing-utils { };
|
||||
|
||||
autoSignDarwinBinariesHook = pkgs.makeSetupHook {
|
||||
name = "auto-sign-darwin-binaries-hook";
|
||||
deps = [ self.signingUtils ];
|
||||
} ../os-specific/darwin/signing-utils/auto-sign-hook.sh;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user