various: move some hooks to pkgs/by-name

This commit is contained in:
Michael Daniels
2026-06-15 19:37:11 -04:00
parent 2138017d84
commit 258f97415d
21 changed files with 121 additions and 89 deletions
-2
View File
@@ -74,8 +74,6 @@
/pkgs/build-support/bintools-wrapper @Ericson2314
/pkgs/build-support/setup-hooks @Ericson2314
/pkgs/build-support/setup-hooks/arrayUtilities @ConnorBaker
/pkgs/build-support/setup-hooks/auto-patchelf.sh @layus
/pkgs/by-name/au/auto-patchelf @layus
## Format generators/serializers
/pkgs/pkgs-lib @Stunkymonkey @h7x4
@@ -0,0 +1,9 @@
{
lib,
makeSetupHook,
}:
makeSetupHook {
name = "add-bin-to-path-hook";
meta.license = lib.licenses.mit;
} ./add-bin-to-path.sh
+4 -1
View File
@@ -38,6 +38,9 @@ stdenv.mkDerivation {
mainProgram = "auto-patchelf";
license = lib.licenses.mit;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ Scrumplex ];
maintainers = with lib.maintainers; [
Scrumplex
layus
];
};
}
@@ -0,0 +1,21 @@
{
lib,
makeSetupHook,
auto-patchelf,
bintools,
stdenv,
}:
makeSetupHook {
name = "auto-patchelf-hook";
propagatedBuildInputs = [
auto-patchelf
bintools
];
substitutions = {
hostPlatform = stdenv.hostPlatform.config;
};
meta = {
maintainers = with lib.maintainers; [ layus ];
};
} ./auto-patchelf.sh
@@ -0,0 +1,18 @@
{
lib,
makeSetupHook,
autoconf,
automake,
gettext,
libtool,
}:
makeSetupHook {
name = "autoreconf-hook";
propagatedBuildInputs = [
autoconf
automake
gettext
libtool
];
meta.license = lib.licenses.mit;
} ./autoreconf.sh
+9
View File
@@ -0,0 +1,9 @@
{
lib,
makeSetupHook,
}:
makeSetupHook {
name = "die-hook";
meta.license = lib.licenses.mit;
} ./die.sh
@@ -0,0 +1,14 @@
{
lib,
targetPackages,
makeSetupHook,
}:
makeSetupHook {
name = "fix-darwin-dylib-names-hook";
substitutions = { inherit (targetPackages.stdenv.cc) targetPrefix; };
meta = {
platforms = lib.platforms.darwin;
license = lib.licenses.mit;
};
} ./fix-darwin-dylib-names.sh
+15
View File
@@ -0,0 +1,15 @@
{
lib,
makeSetupHook,
innoextract,
file-rename,
}:
makeSetupHook {
name = "gog-unpack-hook";
propagatedBuildInputs = [
innoextract
file-rename
];
meta.license = lib.licenses.mit;
} ./gog-unpack.sh
@@ -0,0 +1,9 @@
{
lib,
makeSetupHook,
}:
makeSetupHook {
name = "set-java-classpath-hook";
meta.license = lib.licenses.mit;
} ./set-java-classpath.sh
@@ -0,0 +1,11 @@
{
lib,
makeSetupHook,
dieHook,
}:
makeSetupHook {
name = "shorten-perl-shebang-hook";
propagatedBuildInputs = [ dieHook ];
meta.license = lib.licenses.mit;
} ./shorten-perl-shebang.sh
@@ -0,0 +1,11 @@
{
lib,
makeSetupHook,
strip-nondeterminism,
}:
makeSetupHook {
name = "strip-java-archives-hook";
propagatedBuildInputs = [ strip-nondeterminism ];
meta.license = lib.licenses.mit;
} ./strip-java-archives.sh
-86
View File
@@ -243,14 +243,6 @@ with pkgs;
in
recurseIntoAttrs arrayUtilitiesPackages;
addBinToPathHook = callPackage (
{ makeSetupHook }:
makeSetupHook {
name = "add-bin-to-path-hook";
meta.license = lib.licenses.mit;
} ../build-support/setup-hooks/add-bin-to-path.sh
) { };
aider-chat-with-playwright = aider-chat.withOptional { withPlaywright = true; };
aider-chat-with-browser = aider-chat.withOptional { withBrowser = true; };
@@ -261,51 +253,14 @@ with pkgs;
aider-chat-full = aider-chat.withOptional { withAll = true; };
autoreconfHook = callPackage (
{
makeSetupHook,
autoconf,
automake,
gettext,
libtool,
}:
makeSetupHook {
name = "autoreconf-hook";
propagatedBuildInputs = [
autoconf
automake
gettext
libtool
];
meta.license = lib.licenses.mit;
} ../build-support/setup-hooks/autoreconf.sh
) { };
autoreconfHook269 = autoreconfHook.override {
autoconf = autoconf269;
};
autoPatchelfHook = makeSetupHook {
name = "auto-patchelf-hook";
propagatedBuildInputs = [
auto-patchelf
bintools
];
substitutions = {
hostPlatform = stdenv.hostPlatform.config;
};
} ../build-support/setup-hooks/auto-patchelf.sh;
appimageTools = callPackage ../build-support/appimage { };
appimageupdate-qt = appimageupdate.override { withQtUI = true; };
stripJavaArchivesHook = makeSetupHook {
name = "strip-java-archives-hook";
propagatedBuildInputs = [ strip-nondeterminism ];
meta.license = lib.licenses.mit;
} ../build-support/setup-hooks/strip-java-archives.sh;
ensureNewerSourcesHook =
{ year }:
makeSetupHook
@@ -352,15 +307,6 @@ with pkgs;
meta.license = lib.licenses.mit;
} ../build-support/setup-hooks/update-autotools-gnu-config-scripts.sh;
gogUnpackHook = makeSetupHook {
name = "gog-unpack-hook";
propagatedBuildInputs = [
innoextract
file-rename
];
meta.license = lib.licenses.mit;
} ../build-support/setup-hooks/gog-unpack.sh;
buildEnv = callPackage ../build-support/buildenv { }; # not actually a package
buildFHSEnv = buildFHSEnvBubblewrap;
@@ -434,11 +380,6 @@ with pkgs;
diffPlugins = (callPackage ../build-support/plugins.nix { }).diffPlugins;
dieHook = makeSetupHook {
name = "die-hook";
meta.license = lib.licenses.mit;
} ../build-support/setup-hooks/die.sh;
devShellTools = callPackage ../build-support/dev-shell-tools { };
dockerTools = callPackage ../build-support/docker {
@@ -855,12 +796,6 @@ with pkgs;
setupSystemdUnits = callPackage ../build-support/setup-systemd-units.nix { };
shortenPerlShebang = makeSetupHook {
name = "shorten-perl-shebang-hook";
propagatedBuildInputs = [ dieHook ];
meta.license = lib.licenses.mit;
} ../build-support/setup-hooks/shorten-perl-shebang.sh;
singularity-tools = callPackage ../build-support/singularity-tools { };
srcOnly = callPackage ../build-support/src-only { };
@@ -913,27 +848,6 @@ with pkgs;
inherit (lib.systems) platforms;
setJavaClassPath = makeSetupHook {
name = "set-java-classpath-hook";
meta.license = lib.licenses.mit;
} ../build-support/setup-hooks/set-java-classpath.sh;
fixDarwinDylibNames = callPackage (
{
lib,
targetPackages,
makeSetupHook,
}:
makeSetupHook {
name = "fix-darwin-dylib-names-hook";
substitutions = { inherit (targetPackages.stdenv.cc) targetPrefix; };
meta = {
platforms = lib.platforms.darwin;
license = lib.licenses.mit;
};
} ../build-support/setup-hooks/fix-darwin-dylib-names.sh
) { };
writeDarwinBundle = callPackage ../build-support/make-darwin-bundle/write-darwin-bundle.nix { };
desktopToDarwinBundle = makeSetupHook {