From 15e3e1543b4e9edf3d0bd99558a8c30ee12d5343 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sun, 13 Oct 2024 23:17:54 +0200 Subject: [PATCH] packaging: Add mkMeson{Library,Executable} and: - move pkg-config out of mkMesonDerivation, for components that don't produce any executable code --- packaging/dependencies.nix | 33 +++++++++++++++++++++++-- src/libcmd/package.nix | 10 ++------ src/libexpr-c/package.nix | 10 ++------ src/libexpr/package.nix | 10 ++------ src/libfetchers/package.nix | 10 ++------ src/libflake/package.nix | 10 ++------ src/libmain-c/package.nix | 10 ++------ src/libmain/package.nix | 10 ++------ src/libstore-c/package.nix | 10 ++------ src/libstore/package.nix | 10 ++------ src/libutil-c/package.nix | 10 ++------ src/libutil/package.nix | 10 ++------ src/nix/package.nix | 8 ++---- src/perl/package.nix | 2 ++ tests/functional/package.nix | 1 - tests/unit/libexpr-support/package.nix | 10 ++------ tests/unit/libexpr/package.nix | 8 ++---- tests/unit/libfetchers/package.nix | 8 ++---- tests/unit/libflake/package.nix | 8 ++---- tests/unit/libstore-support/package.nix | 10 ++------ tests/unit/libstore/package.nix | 8 ++---- tests/unit/libutil-support/package.nix | 10 ++------ tests/unit/libutil/package.nix | 8 ++---- 23 files changed, 73 insertions(+), 151 deletions(-) diff --git a/packaging/dependencies.nix b/packaging/dependencies.nix index 3e58a05d1..13766f2c0 100644 --- a/packaging/dependencies.nix +++ b/packaging/dependencies.nix @@ -69,10 +69,23 @@ let nativeBuildInputs = [ pkgs.buildPackages.meson pkgs.buildPackages.ninja - pkgs.buildPackages.pkg-config ] ++ prevAttrs.nativeBuildInputs or []; }; + mesonBuildLayer = finalAttrs: prevAttrs: + { + nativeBuildInputs = prevAttrs.nativeBuildInputs or [] ++ [ + pkgs.buildPackages.pkg-config + ]; + separateDebugInfo = !stdenv.hostPlatform.isStatic; + hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie"; + }; + + mesonLibraryLayer = finalAttrs: prevAttrs: + { + outputs = prevAttrs.outputs or [ "out" ] ++ [ "dev" ]; + }; + # Work around weird `--as-needed` linker behavior with BSD, see # https://github.com/mesonbuild/meson/issues/3593 bsdNoLinkAsNeeded = finalAttrs: prevAttrs: @@ -188,8 +201,24 @@ scope: { mkMesonDerivation = mkPackageBuilder [ miscGoodPractice - bsdNoLinkAsNeeded localSourceLayer mesonLayer ]; + mkMesonExecutable = + mkPackageBuilder [ + miscGoodPractice + bsdNoLinkAsNeeded + localSourceLayer + mesonLayer + mesonBuildLayer + ]; + mkMesonLibrary = + mkPackageBuilder [ + miscGoodPractice + bsdNoLinkAsNeeded + localSourceLayer + mesonLayer + mesonBuildLayer + mesonLibraryLayer + ]; } diff --git a/src/libcmd/package.nix b/src/libcmd/package.nix index 9ac28bb88..244179ee4 100644 --- a/src/libcmd/package.nix +++ b/src/libcmd/package.nix @@ -1,6 +1,6 @@ { lib , stdenv -, mkMesonDerivation +, mkMesonLibrary , nix-util , nix-store @@ -33,7 +33,7 @@ let inherit (lib) fileset; in -mkMesonDerivation (finalAttrs: { +mkMesonLibrary (finalAttrs: { pname = "nix-cmd"; inherit version; @@ -49,8 +49,6 @@ mkMesonDerivation (finalAttrs: { (fileset.fileFilter (file: file.hasExt "hh") ./.) ]; - outputs = [ "out" "dev" ]; - buildInputs = [ ({ inherit editline readline; }.${readlineFlavor}) ] ++ lib.optional enableMarkdown lowdown; @@ -82,10 +80,6 @@ mkMesonDerivation (finalAttrs: { LDFLAGS = "-fuse-ld=gold"; }; - separateDebugInfo = !stdenv.hostPlatform.isStatic; - - hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie"; - meta = { platforms = lib.platforms.unix ++ lib.platforms.windows; }; diff --git a/src/libexpr-c/package.nix b/src/libexpr-c/package.nix index 24ead19bc..df49a8bdc 100644 --- a/src/libexpr-c/package.nix +++ b/src/libexpr-c/package.nix @@ -1,6 +1,6 @@ { lib , stdenv -, mkMesonDerivation +, mkMesonLibrary , nix-store-c , nix-expr @@ -14,7 +14,7 @@ let inherit (lib) fileset; in -mkMesonDerivation (finalAttrs: { +mkMesonLibrary (finalAttrs: { pname = "nix-expr-c"; inherit version; @@ -31,8 +31,6 @@ mkMesonDerivation (finalAttrs: { (fileset.fileFilter (file: file.hasExt "h") ./.) ]; - outputs = [ "out" "dev" ]; - propagatedBuildInputs = [ nix-store-c nix-expr @@ -53,10 +51,6 @@ mkMesonDerivation (finalAttrs: { LDFLAGS = "-fuse-ld=gold"; }; - separateDebugInfo = !stdenv.hostPlatform.isStatic; - - hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie"; - meta = { platforms = lib.platforms.unix ++ lib.platforms.windows; }; diff --git a/src/libexpr/package.nix b/src/libexpr/package.nix index 4d4e14be2..ca1f8bf21 100644 --- a/src/libexpr/package.nix +++ b/src/libexpr/package.nix @@ -1,6 +1,6 @@ { lib , stdenv -, mkMesonDerivation +, mkMesonLibrary , bison , flex @@ -34,7 +34,7 @@ let inherit (lib) fileset; in -mkMesonDerivation (finalAttrs: { +mkMesonLibrary (finalAttrs: { pname = "nix-expr"; inherit version; @@ -57,8 +57,6 @@ mkMesonDerivation (finalAttrs: { ) ]; - outputs = [ "out" "dev" ]; - nativeBuildInputs = [ bison flex @@ -98,10 +96,6 @@ mkMesonDerivation (finalAttrs: { LDFLAGS = "-fuse-ld=gold"; }; - separateDebugInfo = !stdenv.hostPlatform.isStatic; - - hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie"; - meta = { platforms = lib.platforms.unix ++ lib.platforms.windows; }; diff --git a/src/libfetchers/package.nix b/src/libfetchers/package.nix index 988ad3d1e..70973bdb2 100644 --- a/src/libfetchers/package.nix +++ b/src/libfetchers/package.nix @@ -1,6 +1,6 @@ { lib , stdenv -, mkMesonDerivation +, mkMesonLibrary , nix-util , nix-store @@ -16,7 +16,7 @@ let inherit (lib) fileset; in -mkMesonDerivation (finalAttrs: { +mkMesonLibrary (finalAttrs: { pname = "nix-fetchers"; inherit version; @@ -31,8 +31,6 @@ mkMesonDerivation (finalAttrs: { (fileset.fileFilter (file: file.hasExt "hh") ./.) ]; - outputs = [ "out" "dev" ]; - buildInputs = [ libgit2 ]; @@ -55,10 +53,6 @@ mkMesonDerivation (finalAttrs: { LDFLAGS = "-fuse-ld=gold"; }; - separateDebugInfo = !stdenv.hostPlatform.isStatic; - - hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie"; - meta = { platforms = lib.platforms.unix ++ lib.platforms.windows; }; diff --git a/src/libflake/package.nix b/src/libflake/package.nix index 50566a23a..fff481720 100644 --- a/src/libflake/package.nix +++ b/src/libflake/package.nix @@ -1,6 +1,6 @@ { lib , stdenv -, mkMesonDerivation +, mkMesonLibrary , nix-util , nix-store @@ -17,7 +17,7 @@ let inherit (lib) fileset; in -mkMesonDerivation (finalAttrs: { +mkMesonLibrary (finalAttrs: { pname = "nix-flake"; inherit version; @@ -32,8 +32,6 @@ mkMesonDerivation (finalAttrs: { (fileset.fileFilter (file: file.hasExt "hh") ./.) ]; - outputs = [ "out" "dev" ]; - propagatedBuildInputs = [ nix-store nix-util @@ -54,10 +52,6 @@ mkMesonDerivation (finalAttrs: { LDFLAGS = "-fuse-ld=gold"; }; - separateDebugInfo = !stdenv.hostPlatform.isStatic; - - hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie"; - meta = { platforms = lib.platforms.unix ++ lib.platforms.windows; }; diff --git a/src/libmain-c/package.nix b/src/libmain-c/package.nix index 15d27bdfb..5522037f3 100644 --- a/src/libmain-c/package.nix +++ b/src/libmain-c/package.nix @@ -1,6 +1,6 @@ { lib , stdenv -, mkMesonDerivation +, mkMesonLibrary , nix-util-c , nix-store @@ -16,7 +16,7 @@ let inherit (lib) fileset; in -mkMesonDerivation (finalAttrs: { +mkMesonLibrary (finalAttrs: { pname = "nix-main-c"; inherit version; @@ -33,8 +33,6 @@ mkMesonDerivation (finalAttrs: { (fileset.fileFilter (file: file.hasExt "h") ./.) ]; - outputs = [ "out" "dev" ]; - propagatedBuildInputs = [ nix-util-c nix-store @@ -57,10 +55,6 @@ mkMesonDerivation (finalAttrs: { LDFLAGS = "-fuse-ld=gold"; }; - separateDebugInfo = !stdenv.hostPlatform.isStatic; - - hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie"; - meta = { platforms = lib.platforms.unix ++ lib.platforms.windows; }; diff --git a/src/libmain/package.nix b/src/libmain/package.nix index dfed47110..7e7b80472 100644 --- a/src/libmain/package.nix +++ b/src/libmain/package.nix @@ -1,6 +1,6 @@ { lib , stdenv -, mkMesonDerivation +, mkMesonLibrary , openssl @@ -16,7 +16,7 @@ let inherit (lib) fileset; in -mkMesonDerivation (finalAttrs: { +mkMesonLibrary (finalAttrs: { pname = "nix-main"; inherit version; @@ -31,8 +31,6 @@ mkMesonDerivation (finalAttrs: { (fileset.fileFilter (file: file.hasExt "hh") ./.) ]; - outputs = [ "out" "dev" ]; - propagatedBuildInputs = [ nix-util nix-store @@ -51,10 +49,6 @@ mkMesonDerivation (finalAttrs: { LDFLAGS = "-fuse-ld=gold"; }; - separateDebugInfo = !stdenv.hostPlatform.isStatic; - - hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie"; - meta = { platforms = lib.platforms.unix ++ lib.platforms.windows; }; diff --git a/src/libstore-c/package.nix b/src/libstore-c/package.nix index 6f1ec4ad0..896a1a39f 100644 --- a/src/libstore-c/package.nix +++ b/src/libstore-c/package.nix @@ -1,6 +1,6 @@ { lib , stdenv -, mkMesonDerivation +, mkMesonLibrary , nix-util-c , nix-store @@ -14,7 +14,7 @@ let inherit (lib) fileset; in -mkMesonDerivation (finalAttrs: { +mkMesonLibrary (finalAttrs: { pname = "nix-store-c"; inherit version; @@ -31,8 +31,6 @@ mkMesonDerivation (finalAttrs: { (fileset.fileFilter (file: file.hasExt "h") ./.) ]; - outputs = [ "out" "dev" ]; - propagatedBuildInputs = [ nix-util-c nix-store @@ -53,10 +51,6 @@ mkMesonDerivation (finalAttrs: { LDFLAGS = "-fuse-ld=gold"; }; - separateDebugInfo = !stdenv.hostPlatform.isStatic; - - hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie"; - meta = { platforms = lib.platforms.unix ++ lib.platforms.windows; }; diff --git a/src/libstore/package.nix b/src/libstore/package.nix index c52968ac3..9568462b5 100644 --- a/src/libstore/package.nix +++ b/src/libstore/package.nix @@ -1,6 +1,6 @@ { lib , stdenv -, mkMesonDerivation +, mkMesonLibrary , unixtools @@ -25,7 +25,7 @@ let inherit (lib) fileset; in -mkMesonDerivation (finalAttrs: { +mkMesonLibrary (finalAttrs: { pname = "nix-store"; inherit version; @@ -47,8 +47,6 @@ mkMesonDerivation (finalAttrs: { (fileset.fileFilter (file: file.hasExt "sql") ./.) ]; - outputs = [ "out" "dev" ]; - nativeBuildInputs = lib.optional embeddedSandboxShell unixtools.hexdump; @@ -91,10 +89,6 @@ mkMesonDerivation (finalAttrs: { LDFLAGS = "-fuse-ld=gold"; }; - separateDebugInfo = !stdenv.hostPlatform.isStatic; - - hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie"; - meta = { platforms = lib.platforms.unix ++ lib.platforms.windows; }; diff --git a/src/libutil-c/package.nix b/src/libutil-c/package.nix index f2d28fb51..35533f981 100644 --- a/src/libutil-c/package.nix +++ b/src/libutil-c/package.nix @@ -1,6 +1,6 @@ { lib , stdenv -, mkMesonDerivation +, mkMesonLibrary , nix-util @@ -13,7 +13,7 @@ let inherit (lib) fileset; in -mkMesonDerivation (finalAttrs: { +mkMesonLibrary (finalAttrs: { pname = "nix-util-c"; inherit version; @@ -30,8 +30,6 @@ mkMesonDerivation (finalAttrs: { (fileset.fileFilter (file: file.hasExt "h") ./.) ]; - outputs = [ "out" "dev" ]; - propagatedBuildInputs = [ nix-util ]; @@ -51,10 +49,6 @@ mkMesonDerivation (finalAttrs: { LDFLAGS = "-fuse-ld=gold"; }; - separateDebugInfo = !stdenv.hostPlatform.isStatic; - - hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie"; - meta = { platforms = lib.platforms.unix ++ lib.platforms.windows; }; diff --git a/src/libutil/package.nix b/src/libutil/package.nix index 9ae9a3ee7..17a156740 100644 --- a/src/libutil/package.nix +++ b/src/libutil/package.nix @@ -1,6 +1,6 @@ { lib , stdenv -, mkMesonDerivation +, mkMesonLibrary , boost , brotli @@ -19,7 +19,7 @@ let inherit (lib) fileset; in -mkMesonDerivation (finalAttrs: { +mkMesonLibrary (finalAttrs: { pname = "nix-util"; inherit version; @@ -38,8 +38,6 @@ mkMesonDerivation (finalAttrs: { (fileset.fileFilter (file: file.hasExt "hh") ./.) ]; - outputs = [ "out" "dev" ]; - buildInputs = [ brotli libsodium @@ -77,10 +75,6 @@ mkMesonDerivation (finalAttrs: { LDFLAGS = "-fuse-ld=gold"; }; - separateDebugInfo = !stdenv.hostPlatform.isStatic; - - hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie"; - meta = { platforms = lib.platforms.unix ++ lib.platforms.windows; }; diff --git a/src/nix/package.nix b/src/nix/package.nix index de7abe6b3..0a9c676d8 100644 --- a/src/nix/package.nix +++ b/src/nix/package.nix @@ -1,6 +1,6 @@ { lib , stdenv -, mkMesonDerivation +, mkMesonExecutable , nix-store , nix-expr @@ -16,7 +16,7 @@ let inherit (lib) fileset; in -mkMesonDerivation (finalAttrs: { +mkMesonExecutable (finalAttrs: { pname = "nix"; inherit version; @@ -103,10 +103,6 @@ mkMesonDerivation (finalAttrs: { LDFLAGS = "-fuse-ld=gold"; }; - separateDebugInfo = !stdenv.hostPlatform.isStatic; - - hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie"; - meta = { platforms = lib.platforms.unix ++ lib.platforms.windows; }; diff --git a/src/perl/package.nix b/src/perl/package.nix index 681ece32a..fe617fd47 100644 --- a/src/perl/package.nix +++ b/src/perl/package.nix @@ -1,6 +1,7 @@ { lib , stdenv , mkMesonDerivation +, pkg-config , perl , perlPackages , nix-store @@ -32,6 +33,7 @@ perl.pkgs.toPerlModule (mkMesonDerivation (finalAttrs: { ]); nativeBuildInputs = [ + pkg-config perl curl ]; diff --git a/tests/functional/package.nix b/tests/functional/package.nix index a0c1f249f..21be38c54 100644 --- a/tests/functional/package.nix +++ b/tests/functional/package.nix @@ -75,7 +75,6 @@ mkMesonDerivation (finalAttrs: { nix-expr ]; - preConfigure = # "Inline" .version so it's not a symlink, and includes the suffix. # Do the meson utils, without modification. diff --git a/tests/unit/libexpr-support/package.nix b/tests/unit/libexpr-support/package.nix index e0f9c334a..234d83730 100644 --- a/tests/unit/libexpr-support/package.nix +++ b/tests/unit/libexpr-support/package.nix @@ -1,6 +1,6 @@ { lib , stdenv -, mkMesonDerivation +, mkMesonLibrary , nix-store-test-support , nix-expr @@ -16,7 +16,7 @@ let inherit (lib) fileset; in -mkMesonDerivation (finalAttrs: { +mkMesonLibrary (finalAttrs: { pname = "nix-util-test-support"; inherit version; @@ -32,8 +32,6 @@ mkMesonDerivation (finalAttrs: { (fileset.fileFilter (file: file.hasExt "hh") ./.) ]; - outputs = [ "out" "dev" ]; - propagatedBuildInputs = [ nix-store-test-support nix-expr @@ -55,10 +53,6 @@ mkMesonDerivation (finalAttrs: { LDFLAGS = "-fuse-ld=gold"; }; - separateDebugInfo = !stdenv.hostPlatform.isStatic; - - hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie"; - meta = { platforms = lib.platforms.unix ++ lib.platforms.windows; }; diff --git a/tests/unit/libexpr/package.nix b/tests/unit/libexpr/package.nix index 5eb8169d8..1d99b581c 100644 --- a/tests/unit/libexpr/package.nix +++ b/tests/unit/libexpr/package.nix @@ -1,7 +1,7 @@ { lib , buildPackages , stdenv -, mkMesonDerivation +, mkMesonExecutable , nix-expr , nix-expr-c @@ -21,7 +21,7 @@ let inherit (lib) fileset; in -mkMesonDerivation (finalAttrs: { +mkMesonExecutable (finalAttrs: { pname = "nix-expr-tests"; inherit version; @@ -60,10 +60,6 @@ mkMesonDerivation (finalAttrs: { LDFLAGS = "-fuse-ld=gold"; }; - separateDebugInfo = !stdenv.hostPlatform.isStatic; - - hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie"; - passthru = { tests = { run = runCommand "${finalAttrs.pname}-run" { diff --git a/tests/unit/libfetchers/package.nix b/tests/unit/libfetchers/package.nix index 571496307..ed27b4021 100644 --- a/tests/unit/libfetchers/package.nix +++ b/tests/unit/libfetchers/package.nix @@ -1,7 +1,7 @@ { lib , buildPackages , stdenv -, mkMesonDerivation +, mkMesonExecutable , nix-fetchers , nix-store-test-support @@ -20,7 +20,7 @@ let inherit (lib) fileset; in -mkMesonDerivation (finalAttrs: { +mkMesonExecutable (finalAttrs: { pname = "nix-fetchers-tests"; inherit version; @@ -58,10 +58,6 @@ mkMesonDerivation (finalAttrs: { LDFLAGS = "-fuse-ld=gold"; }; - separateDebugInfo = !stdenv.hostPlatform.isStatic; - - hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie"; - passthru = { tests = { run = runCommand "${finalAttrs.pname}-run" { diff --git a/tests/unit/libflake/package.nix b/tests/unit/libflake/package.nix index 285d641d7..eaf946202 100644 --- a/tests/unit/libflake/package.nix +++ b/tests/unit/libflake/package.nix @@ -1,7 +1,7 @@ { lib , buildPackages , stdenv -, mkMesonDerivation +, mkMesonExecutable , nix-flake , nix-expr-test-support @@ -20,7 +20,7 @@ let inherit (lib) fileset; in -mkMesonDerivation (finalAttrs: { +mkMesonExecutable (finalAttrs: { pname = "nix-flake-tests"; inherit version; @@ -58,10 +58,6 @@ mkMesonDerivation (finalAttrs: { LDFLAGS = "-fuse-ld=gold"; }; - separateDebugInfo = !stdenv.hostPlatform.isStatic; - - hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie"; - passthru = { tests = { run = runCommand "${finalAttrs.pname}-run" { diff --git a/tests/unit/libstore-support/package.nix b/tests/unit/libstore-support/package.nix index 3c6fdb9fa..b6106b727 100644 --- a/tests/unit/libstore-support/package.nix +++ b/tests/unit/libstore-support/package.nix @@ -1,6 +1,6 @@ { lib , stdenv -, mkMesonDerivation +, mkMesonLibrary , nix-util-test-support , nix-store @@ -16,7 +16,7 @@ let inherit (lib) fileset; in -mkMesonDerivation (finalAttrs: { +mkMesonLibrary (finalAttrs: { pname = "nix-store-test-support"; inherit version; @@ -32,8 +32,6 @@ mkMesonDerivation (finalAttrs: { (fileset.fileFilter (file: file.hasExt "hh") ./.) ]; - outputs = [ "out" "dev" ]; - propagatedBuildInputs = [ nix-util-test-support nix-store @@ -55,10 +53,6 @@ mkMesonDerivation (finalAttrs: { LDFLAGS = "-fuse-ld=gold"; }; - separateDebugInfo = !stdenv.hostPlatform.isStatic; - - hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie"; - meta = { platforms = lib.platforms.unix ++ lib.platforms.windows; }; diff --git a/tests/unit/libstore/package.nix b/tests/unit/libstore/package.nix index 8446e4d7a..5fbb34a76 100644 --- a/tests/unit/libstore/package.nix +++ b/tests/unit/libstore/package.nix @@ -1,7 +1,7 @@ { lib , buildPackages , stdenv -, mkMesonDerivation +, mkMesonExecutable , nix-store , nix-store-c @@ -22,7 +22,7 @@ let inherit (lib) fileset; in -mkMesonDerivation (finalAttrs: { +mkMesonExecutable (finalAttrs: { pname = "nix-store-tests"; inherit version; @@ -62,10 +62,6 @@ mkMesonDerivation (finalAttrs: { LDFLAGS = "-fuse-ld=gold"; }; - separateDebugInfo = !stdenv.hostPlatform.isStatic; - - hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie"; - passthru = { tests = { run = let diff --git a/tests/unit/libutil-support/package.nix b/tests/unit/libutil-support/package.nix index add6d8fa8..16319cf2d 100644 --- a/tests/unit/libutil-support/package.nix +++ b/tests/unit/libutil-support/package.nix @@ -1,6 +1,6 @@ { lib , stdenv -, mkMesonDerivation +, mkMesonLibrary , nix-util @@ -15,7 +15,7 @@ let inherit (lib) fileset; in -mkMesonDerivation (finalAttrs: { +mkMesonLibrary (finalAttrs: { pname = "nix-util-test-support"; inherit version; @@ -31,8 +31,6 @@ mkMesonDerivation (finalAttrs: { (fileset.fileFilter (file: file.hasExt "hh") ./.) ]; - outputs = [ "out" "dev" ]; - propagatedBuildInputs = [ nix-util rapidcheck @@ -53,10 +51,6 @@ mkMesonDerivation (finalAttrs: { LDFLAGS = "-fuse-ld=gold"; }; - separateDebugInfo = !stdenv.hostPlatform.isStatic; - - hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie"; - meta = { platforms = lib.platforms.unix ++ lib.platforms.windows; }; diff --git a/tests/unit/libutil/package.nix b/tests/unit/libutil/package.nix index fe8c9500e..37a80e639 100644 --- a/tests/unit/libutil/package.nix +++ b/tests/unit/libutil/package.nix @@ -1,7 +1,7 @@ { lib , buildPackages , stdenv -, mkMesonDerivation +, mkMesonExecutable , nix-util , nix-util-c @@ -20,7 +20,7 @@ let inherit (lib) fileset; in -mkMesonDerivation (finalAttrs: { +mkMesonExecutable (finalAttrs: { pname = "nix-util-tests"; inherit version; @@ -59,10 +59,6 @@ mkMesonDerivation (finalAttrs: { LDFLAGS = "-fuse-ld=gold"; }; - separateDebugInfo = !stdenv.hostPlatform.isStatic; - - hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie"; - passthru = { tests = { run = runCommand "${finalAttrs.pname}-run" {