mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 05:56:15 +02:00
Deduplicate our many package.nix
a bit (#11175)
- They should all be built in parallel - They should all use strict deps by default
This commit is contained in:
parent
a2fed6db9e
commit
3b49f7a143
24 changed files with 21 additions and 106 deletions
|
@ -63,9 +63,16 @@ let
|
||||||
|
|
||||||
# Work around weird `--as-needed` linker behavior with BSD, see
|
# Work around weird `--as-needed` linker behavior with BSD, see
|
||||||
# https://github.com/mesonbuild/meson/issues/3593
|
# https://github.com/mesonbuild/meson/issues/3593
|
||||||
bsdNoLinkAsNeeded = finalAttrs: prevAttrs: lib.optionalAttrs stdenv.hostPlatform.isBSD {
|
bsdNoLinkAsNeeded = finalAttrs: prevAttrs:
|
||||||
mesonFlags = [ (lib.mesonBool "b_asneeded" false) ] ++ prevAttrs.mesonFlags or [];
|
lib.optionalAttrs stdenv.hostPlatform.isBSD {
|
||||||
};
|
mesonFlags = [ (lib.mesonBool "b_asneeded" false) ] ++ prevAttrs.mesonFlags or [];
|
||||||
|
};
|
||||||
|
|
||||||
|
miscGoodPractice = finalAttrs: prevAttrs:
|
||||||
|
{
|
||||||
|
strictDeps = prevAttrs.strictDeps or true;
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
scope: {
|
scope: {
|
||||||
|
@ -136,8 +143,14 @@ scope: {
|
||||||
|
|
||||||
inherit resolvePath filesetToSource;
|
inherit resolvePath filesetToSource;
|
||||||
|
|
||||||
mkMesonDerivation = f: stdenv.mkDerivation
|
mkMesonDerivation = f: let
|
||||||
(lib.extends
|
exts = [
|
||||||
(lib.composeExtensions bsdNoLinkAsNeeded localSourceLayer)
|
miscGoodPractice
|
||||||
f);
|
bsdNoLinkAsNeeded
|
||||||
|
localSourceLayer
|
||||||
|
];
|
||||||
|
in stdenv.mkDerivation
|
||||||
|
(lib.extends
|
||||||
|
(lib.foldr lib.composeExtensions (_: _: {}) exts)
|
||||||
|
f);
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,10 +53,6 @@ mkMesonDerivation (finalAttrs: {
|
||||||
echo "doc external-api-docs $out/share/doc/nix/external-api/html" >> ''${!outputDoc}/nix-support/hydra-build-products
|
echo "doc external-api-docs $out/share/doc/nix/external-api/html" >> ''${!outputDoc}/nix-support/hydra-build-products
|
||||||
'';
|
'';
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
strictDeps = true;
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
platforms = lib.platforms.all;
|
platforms = lib.platforms.all;
|
||||||
};
|
};
|
||||||
|
|
|
@ -48,10 +48,6 @@ mkMesonDerivation (finalAttrs: {
|
||||||
echo "doc internal-api-docs $out/share/doc/nix/internal-api/html" >> ''${!outputDoc}/nix-support/hydra-build-products
|
echo "doc internal-api-docs $out/share/doc/nix/internal-api/html" >> ''${!outputDoc}/nix-support/hydra-build-products
|
||||||
'';
|
'';
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
strictDeps = true;
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
platforms = lib.platforms.all;
|
platforms = lib.platforms.all;
|
||||||
};
|
};
|
||||||
|
|
|
@ -93,14 +93,8 @@ mkMesonDerivation (finalAttrs: {
|
||||||
LDFLAGS = "-fuse-ld=gold";
|
LDFLAGS = "-fuse-ld=gold";
|
||||||
};
|
};
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
||||||
|
|
||||||
# TODO `releaseTools.coverageAnalysis` in Nixpkgs needs to be updated
|
|
||||||
# to work with `strictDeps`.
|
|
||||||
strictDeps = true;
|
|
||||||
|
|
||||||
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -63,12 +63,8 @@ mkMesonDerivation (finalAttrs: {
|
||||||
LDFLAGS = "-fuse-ld=gold";
|
LDFLAGS = "-fuse-ld=gold";
|
||||||
};
|
};
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
||||||
|
|
||||||
strictDeps = true;
|
|
||||||
|
|
||||||
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -102,12 +102,8 @@ mkMesonDerivation (finalAttrs: {
|
||||||
LDFLAGS = "-fuse-ld=gold";
|
LDFLAGS = "-fuse-ld=gold";
|
||||||
};
|
};
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
||||||
|
|
||||||
strictDeps = true;
|
|
||||||
|
|
||||||
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -67,14 +67,8 @@ mkMesonDerivation (finalAttrs: {
|
||||||
LDFLAGS = "-fuse-ld=gold";
|
LDFLAGS = "-fuse-ld=gold";
|
||||||
};
|
};
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
||||||
|
|
||||||
# TODO `releaseTools.coverageAnalysis` in Nixpkgs needs to be updated
|
|
||||||
# to work with `strictDeps`.
|
|
||||||
strictDeps = true;
|
|
||||||
|
|
||||||
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -67,14 +67,8 @@ mkMesonDerivation (finalAttrs: {
|
||||||
LDFLAGS = "-fuse-ld=gold";
|
LDFLAGS = "-fuse-ld=gold";
|
||||||
};
|
};
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
||||||
|
|
||||||
# TODO `releaseTools.coverageAnalysis` in Nixpkgs needs to be updated
|
|
||||||
# to work with `strictDeps`.
|
|
||||||
strictDeps = true;
|
|
||||||
|
|
||||||
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -68,12 +68,8 @@ mkMesonDerivation (finalAttrs: {
|
||||||
LDFLAGS = "-fuse-ld=gold";
|
LDFLAGS = "-fuse-ld=gold";
|
||||||
};
|
};
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
||||||
|
|
||||||
strictDeps = true;
|
|
||||||
|
|
||||||
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -62,14 +62,8 @@ mkMesonDerivation (finalAttrs: {
|
||||||
LDFLAGS = "-fuse-ld=gold";
|
LDFLAGS = "-fuse-ld=gold";
|
||||||
};
|
};
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
||||||
|
|
||||||
# TODO `releaseTools.coverageAnalysis` in Nixpkgs needs to be updated
|
|
||||||
# to work with `strictDeps`.
|
|
||||||
strictDeps = true;
|
|
||||||
|
|
||||||
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -64,12 +64,8 @@ mkMesonDerivation (finalAttrs: {
|
||||||
LDFLAGS = "-fuse-ld=gold";
|
LDFLAGS = "-fuse-ld=gold";
|
||||||
};
|
};
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
||||||
|
|
||||||
strictDeps = true;
|
|
||||||
|
|
||||||
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -101,12 +101,8 @@ mkMesonDerivation (finalAttrs: {
|
||||||
LDFLAGS = "-fuse-ld=gold";
|
LDFLAGS = "-fuse-ld=gold";
|
||||||
};
|
};
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
||||||
|
|
||||||
strictDeps = true;
|
|
||||||
|
|
||||||
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -62,12 +62,8 @@ mkMesonDerivation (finalAttrs: {
|
||||||
LDFLAGS = "-fuse-ld=gold";
|
LDFLAGS = "-fuse-ld=gold";
|
||||||
};
|
};
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
||||||
|
|
||||||
strictDeps = true;
|
|
||||||
|
|
||||||
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -88,12 +88,8 @@ mkMesonDerivation (finalAttrs: {
|
||||||
LDFLAGS = "-fuse-ld=gold";
|
LDFLAGS = "-fuse-ld=gold";
|
||||||
};
|
};
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
||||||
|
|
||||||
strictDeps = true;
|
|
||||||
|
|
||||||
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -84,8 +84,6 @@ mkMesonDerivation (finalAttrs: {
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
outputs = [ "out" "dev" ];
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
meson
|
meson
|
||||||
ninja
|
ninja
|
||||||
|
@ -114,12 +112,8 @@ mkMesonDerivation (finalAttrs: {
|
||||||
LDFLAGS = "-fuse-ld=gold";
|
LDFLAGS = "-fuse-ld=gold";
|
||||||
};
|
};
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
||||||
|
|
||||||
strictDeps = true;
|
|
||||||
|
|
||||||
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -73,5 +73,5 @@ perl.pkgs.toPerlModule (mkMesonDerivation (finalAttrs: {
|
||||||
"--print-errorlogs"
|
"--print-errorlogs"
|
||||||
];
|
];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
strictDeps = false;
|
||||||
}))
|
}))
|
||||||
|
|
|
@ -66,12 +66,8 @@ mkMesonDerivation (finalAttrs: {
|
||||||
LDFLAGS = "-fuse-ld=gold";
|
LDFLAGS = "-fuse-ld=gold";
|
||||||
};
|
};
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
||||||
|
|
||||||
strictDeps = true;
|
|
||||||
|
|
||||||
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -71,12 +71,8 @@ mkMesonDerivation (finalAttrs: {
|
||||||
LDFLAGS = "-fuse-ld=gold";
|
LDFLAGS = "-fuse-ld=gold";
|
||||||
};
|
};
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
||||||
|
|
||||||
strictDeps = true;
|
|
||||||
|
|
||||||
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
|
|
|
@ -69,12 +69,8 @@ mkMesonDerivation (finalAttrs: {
|
||||||
LDFLAGS = "-fuse-ld=gold";
|
LDFLAGS = "-fuse-ld=gold";
|
||||||
};
|
};
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
||||||
|
|
||||||
strictDeps = true;
|
|
||||||
|
|
||||||
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
|
|
|
@ -69,12 +69,8 @@ mkMesonDerivation (finalAttrs: {
|
||||||
LDFLAGS = "-fuse-ld=gold";
|
LDFLAGS = "-fuse-ld=gold";
|
||||||
};
|
};
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
||||||
|
|
||||||
strictDeps = true;
|
|
||||||
|
|
||||||
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
|
|
|
@ -66,12 +66,8 @@ mkMesonDerivation (finalAttrs: {
|
||||||
LDFLAGS = "-fuse-ld=gold";
|
LDFLAGS = "-fuse-ld=gold";
|
||||||
};
|
};
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
||||||
|
|
||||||
strictDeps = true;
|
|
||||||
|
|
||||||
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -73,12 +73,8 @@ mkMesonDerivation (finalAttrs: {
|
||||||
LDFLAGS = "-fuse-ld=gold";
|
LDFLAGS = "-fuse-ld=gold";
|
||||||
};
|
};
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
||||||
|
|
||||||
strictDeps = true;
|
|
||||||
|
|
||||||
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
|
|
|
@ -64,12 +64,8 @@ mkMesonDerivation (finalAttrs: {
|
||||||
LDFLAGS = "-fuse-ld=gold";
|
LDFLAGS = "-fuse-ld=gold";
|
||||||
};
|
};
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
||||||
|
|
||||||
strictDeps = true;
|
|
||||||
|
|
||||||
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -70,12 +70,8 @@ mkMesonDerivation (finalAttrs: {
|
||||||
LDFLAGS = "-fuse-ld=gold";
|
LDFLAGS = "-fuse-ld=gold";
|
||||||
};
|
};
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
separateDebugInfo = !stdenv.hostPlatform.isStatic;
|
||||||
|
|
||||||
strictDeps = true;
|
|
||||||
|
|
||||||
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
|
|
Loading…
Reference in a new issue