packaging: Add mkMeson{Library,Executable}

and:
- move pkg-config out of mkMesonDerivation, for components that don't
  produce any executable code
This commit is contained in:
Robert Hensing 2024-10-13 23:17:54 +02:00
parent e10ff893e5
commit 15e3e1543b
23 changed files with 73 additions and 151 deletions

View file

@ -69,10 +69,23 @@ let
nativeBuildInputs = [ nativeBuildInputs = [
pkgs.buildPackages.meson pkgs.buildPackages.meson
pkgs.buildPackages.ninja pkgs.buildPackages.ninja
pkgs.buildPackages.pkg-config
] ++ prevAttrs.nativeBuildInputs or []; ] ++ 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 # 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: bsdNoLinkAsNeeded = finalAttrs: prevAttrs:
@ -188,8 +201,24 @@ scope: {
mkMesonDerivation = mkMesonDerivation =
mkPackageBuilder [ mkPackageBuilder [
miscGoodPractice miscGoodPractice
bsdNoLinkAsNeeded
localSourceLayer localSourceLayer
mesonLayer mesonLayer
]; ];
mkMesonExecutable =
mkPackageBuilder [
miscGoodPractice
bsdNoLinkAsNeeded
localSourceLayer
mesonLayer
mesonBuildLayer
];
mkMesonLibrary =
mkPackageBuilder [
miscGoodPractice
bsdNoLinkAsNeeded
localSourceLayer
mesonLayer
mesonBuildLayer
mesonLibraryLayer
];
} }

View file

@ -1,6 +1,6 @@
{ lib { lib
, stdenv , stdenv
, mkMesonDerivation , mkMesonLibrary
, nix-util , nix-util
, nix-store , nix-store
@ -33,7 +33,7 @@ let
inherit (lib) fileset; inherit (lib) fileset;
in in
mkMesonDerivation (finalAttrs: { mkMesonLibrary (finalAttrs: {
pname = "nix-cmd"; pname = "nix-cmd";
inherit version; inherit version;
@ -49,8 +49,6 @@ mkMesonDerivation (finalAttrs: {
(fileset.fileFilter (file: file.hasExt "hh") ./.) (fileset.fileFilter (file: file.hasExt "hh") ./.)
]; ];
outputs = [ "out" "dev" ];
buildInputs = [ buildInputs = [
({ inherit editline readline; }.${readlineFlavor}) ({ inherit editline readline; }.${readlineFlavor})
] ++ lib.optional enableMarkdown lowdown; ] ++ lib.optional enableMarkdown lowdown;
@ -82,10 +80,6 @@ mkMesonDerivation (finalAttrs: {
LDFLAGS = "-fuse-ld=gold"; LDFLAGS = "-fuse-ld=gold";
}; };
separateDebugInfo = !stdenv.hostPlatform.isStatic;
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
meta = { meta = {
platforms = lib.platforms.unix ++ lib.platforms.windows; platforms = lib.platforms.unix ++ lib.platforms.windows;
}; };

View file

@ -1,6 +1,6 @@
{ lib { lib
, stdenv , stdenv
, mkMesonDerivation , mkMesonLibrary
, nix-store-c , nix-store-c
, nix-expr , nix-expr
@ -14,7 +14,7 @@ let
inherit (lib) fileset; inherit (lib) fileset;
in in
mkMesonDerivation (finalAttrs: { mkMesonLibrary (finalAttrs: {
pname = "nix-expr-c"; pname = "nix-expr-c";
inherit version; inherit version;
@ -31,8 +31,6 @@ mkMesonDerivation (finalAttrs: {
(fileset.fileFilter (file: file.hasExt "h") ./.) (fileset.fileFilter (file: file.hasExt "h") ./.)
]; ];
outputs = [ "out" "dev" ];
propagatedBuildInputs = [ propagatedBuildInputs = [
nix-store-c nix-store-c
nix-expr nix-expr
@ -53,10 +51,6 @@ mkMesonDerivation (finalAttrs: {
LDFLAGS = "-fuse-ld=gold"; LDFLAGS = "-fuse-ld=gold";
}; };
separateDebugInfo = !stdenv.hostPlatform.isStatic;
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
meta = { meta = {
platforms = lib.platforms.unix ++ lib.platforms.windows; platforms = lib.platforms.unix ++ lib.platforms.windows;
}; };

View file

@ -1,6 +1,6 @@
{ lib { lib
, stdenv , stdenv
, mkMesonDerivation , mkMesonLibrary
, bison , bison
, flex , flex
@ -34,7 +34,7 @@ let
inherit (lib) fileset; inherit (lib) fileset;
in in
mkMesonDerivation (finalAttrs: { mkMesonLibrary (finalAttrs: {
pname = "nix-expr"; pname = "nix-expr";
inherit version; inherit version;
@ -57,8 +57,6 @@ mkMesonDerivation (finalAttrs: {
) )
]; ];
outputs = [ "out" "dev" ];
nativeBuildInputs = [ nativeBuildInputs = [
bison bison
flex flex
@ -98,10 +96,6 @@ mkMesonDerivation (finalAttrs: {
LDFLAGS = "-fuse-ld=gold"; LDFLAGS = "-fuse-ld=gold";
}; };
separateDebugInfo = !stdenv.hostPlatform.isStatic;
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
meta = { meta = {
platforms = lib.platforms.unix ++ lib.platforms.windows; platforms = lib.platforms.unix ++ lib.platforms.windows;
}; };

View file

@ -1,6 +1,6 @@
{ lib { lib
, stdenv , stdenv
, mkMesonDerivation , mkMesonLibrary
, nix-util , nix-util
, nix-store , nix-store
@ -16,7 +16,7 @@ let
inherit (lib) fileset; inherit (lib) fileset;
in in
mkMesonDerivation (finalAttrs: { mkMesonLibrary (finalAttrs: {
pname = "nix-fetchers"; pname = "nix-fetchers";
inherit version; inherit version;
@ -31,8 +31,6 @@ mkMesonDerivation (finalAttrs: {
(fileset.fileFilter (file: file.hasExt "hh") ./.) (fileset.fileFilter (file: file.hasExt "hh") ./.)
]; ];
outputs = [ "out" "dev" ];
buildInputs = [ buildInputs = [
libgit2 libgit2
]; ];
@ -55,10 +53,6 @@ mkMesonDerivation (finalAttrs: {
LDFLAGS = "-fuse-ld=gold"; LDFLAGS = "-fuse-ld=gold";
}; };
separateDebugInfo = !stdenv.hostPlatform.isStatic;
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
meta = { meta = {
platforms = lib.platforms.unix ++ lib.platforms.windows; platforms = lib.platforms.unix ++ lib.platforms.windows;
}; };

View file

@ -1,6 +1,6 @@
{ lib { lib
, stdenv , stdenv
, mkMesonDerivation , mkMesonLibrary
, nix-util , nix-util
, nix-store , nix-store
@ -17,7 +17,7 @@ let
inherit (lib) fileset; inherit (lib) fileset;
in in
mkMesonDerivation (finalAttrs: { mkMesonLibrary (finalAttrs: {
pname = "nix-flake"; pname = "nix-flake";
inherit version; inherit version;
@ -32,8 +32,6 @@ mkMesonDerivation (finalAttrs: {
(fileset.fileFilter (file: file.hasExt "hh") ./.) (fileset.fileFilter (file: file.hasExt "hh") ./.)
]; ];
outputs = [ "out" "dev" ];
propagatedBuildInputs = [ propagatedBuildInputs = [
nix-store nix-store
nix-util nix-util
@ -54,10 +52,6 @@ mkMesonDerivation (finalAttrs: {
LDFLAGS = "-fuse-ld=gold"; LDFLAGS = "-fuse-ld=gold";
}; };
separateDebugInfo = !stdenv.hostPlatform.isStatic;
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
meta = { meta = {
platforms = lib.platforms.unix ++ lib.platforms.windows; platforms = lib.platforms.unix ++ lib.platforms.windows;
}; };

View file

@ -1,6 +1,6 @@
{ lib { lib
, stdenv , stdenv
, mkMesonDerivation , mkMesonLibrary
, nix-util-c , nix-util-c
, nix-store , nix-store
@ -16,7 +16,7 @@ let
inherit (lib) fileset; inherit (lib) fileset;
in in
mkMesonDerivation (finalAttrs: { mkMesonLibrary (finalAttrs: {
pname = "nix-main-c"; pname = "nix-main-c";
inherit version; inherit version;
@ -33,8 +33,6 @@ mkMesonDerivation (finalAttrs: {
(fileset.fileFilter (file: file.hasExt "h") ./.) (fileset.fileFilter (file: file.hasExt "h") ./.)
]; ];
outputs = [ "out" "dev" ];
propagatedBuildInputs = [ propagatedBuildInputs = [
nix-util-c nix-util-c
nix-store nix-store
@ -57,10 +55,6 @@ mkMesonDerivation (finalAttrs: {
LDFLAGS = "-fuse-ld=gold"; LDFLAGS = "-fuse-ld=gold";
}; };
separateDebugInfo = !stdenv.hostPlatform.isStatic;
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
meta = { meta = {
platforms = lib.platforms.unix ++ lib.platforms.windows; platforms = lib.platforms.unix ++ lib.platforms.windows;
}; };

View file

@ -1,6 +1,6 @@
{ lib { lib
, stdenv , stdenv
, mkMesonDerivation , mkMesonLibrary
, openssl , openssl
@ -16,7 +16,7 @@ let
inherit (lib) fileset; inherit (lib) fileset;
in in
mkMesonDerivation (finalAttrs: { mkMesonLibrary (finalAttrs: {
pname = "nix-main"; pname = "nix-main";
inherit version; inherit version;
@ -31,8 +31,6 @@ mkMesonDerivation (finalAttrs: {
(fileset.fileFilter (file: file.hasExt "hh") ./.) (fileset.fileFilter (file: file.hasExt "hh") ./.)
]; ];
outputs = [ "out" "dev" ];
propagatedBuildInputs = [ propagatedBuildInputs = [
nix-util nix-util
nix-store nix-store
@ -51,10 +49,6 @@ mkMesonDerivation (finalAttrs: {
LDFLAGS = "-fuse-ld=gold"; LDFLAGS = "-fuse-ld=gold";
}; };
separateDebugInfo = !stdenv.hostPlatform.isStatic;
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
meta = { meta = {
platforms = lib.platforms.unix ++ lib.platforms.windows; platforms = lib.platforms.unix ++ lib.platforms.windows;
}; };

View file

@ -1,6 +1,6 @@
{ lib { lib
, stdenv , stdenv
, mkMesonDerivation , mkMesonLibrary
, nix-util-c , nix-util-c
, nix-store , nix-store
@ -14,7 +14,7 @@ let
inherit (lib) fileset; inherit (lib) fileset;
in in
mkMesonDerivation (finalAttrs: { mkMesonLibrary (finalAttrs: {
pname = "nix-store-c"; pname = "nix-store-c";
inherit version; inherit version;
@ -31,8 +31,6 @@ mkMesonDerivation (finalAttrs: {
(fileset.fileFilter (file: file.hasExt "h") ./.) (fileset.fileFilter (file: file.hasExt "h") ./.)
]; ];
outputs = [ "out" "dev" ];
propagatedBuildInputs = [ propagatedBuildInputs = [
nix-util-c nix-util-c
nix-store nix-store
@ -53,10 +51,6 @@ mkMesonDerivation (finalAttrs: {
LDFLAGS = "-fuse-ld=gold"; LDFLAGS = "-fuse-ld=gold";
}; };
separateDebugInfo = !stdenv.hostPlatform.isStatic;
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
meta = { meta = {
platforms = lib.platforms.unix ++ lib.platforms.windows; platforms = lib.platforms.unix ++ lib.platforms.windows;
}; };

View file

@ -1,6 +1,6 @@
{ lib { lib
, stdenv , stdenv
, mkMesonDerivation , mkMesonLibrary
, unixtools , unixtools
@ -25,7 +25,7 @@ let
inherit (lib) fileset; inherit (lib) fileset;
in in
mkMesonDerivation (finalAttrs: { mkMesonLibrary (finalAttrs: {
pname = "nix-store"; pname = "nix-store";
inherit version; inherit version;
@ -47,8 +47,6 @@ mkMesonDerivation (finalAttrs: {
(fileset.fileFilter (file: file.hasExt "sql") ./.) (fileset.fileFilter (file: file.hasExt "sql") ./.)
]; ];
outputs = [ "out" "dev" ];
nativeBuildInputs = nativeBuildInputs =
lib.optional embeddedSandboxShell unixtools.hexdump; lib.optional embeddedSandboxShell unixtools.hexdump;
@ -91,10 +89,6 @@ mkMesonDerivation (finalAttrs: {
LDFLAGS = "-fuse-ld=gold"; LDFLAGS = "-fuse-ld=gold";
}; };
separateDebugInfo = !stdenv.hostPlatform.isStatic;
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
meta = { meta = {
platforms = lib.platforms.unix ++ lib.platforms.windows; platforms = lib.platforms.unix ++ lib.platforms.windows;
}; };

View file

@ -1,6 +1,6 @@
{ lib { lib
, stdenv , stdenv
, mkMesonDerivation , mkMesonLibrary
, nix-util , nix-util
@ -13,7 +13,7 @@ let
inherit (lib) fileset; inherit (lib) fileset;
in in
mkMesonDerivation (finalAttrs: { mkMesonLibrary (finalAttrs: {
pname = "nix-util-c"; pname = "nix-util-c";
inherit version; inherit version;
@ -30,8 +30,6 @@ mkMesonDerivation (finalAttrs: {
(fileset.fileFilter (file: file.hasExt "h") ./.) (fileset.fileFilter (file: file.hasExt "h") ./.)
]; ];
outputs = [ "out" "dev" ];
propagatedBuildInputs = [ propagatedBuildInputs = [
nix-util nix-util
]; ];
@ -51,10 +49,6 @@ mkMesonDerivation (finalAttrs: {
LDFLAGS = "-fuse-ld=gold"; LDFLAGS = "-fuse-ld=gold";
}; };
separateDebugInfo = !stdenv.hostPlatform.isStatic;
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
meta = { meta = {
platforms = lib.platforms.unix ++ lib.platforms.windows; platforms = lib.platforms.unix ++ lib.platforms.windows;
}; };

View file

@ -1,6 +1,6 @@
{ lib { lib
, stdenv , stdenv
, mkMesonDerivation , mkMesonLibrary
, boost , boost
, brotli , brotli
@ -19,7 +19,7 @@ let
inherit (lib) fileset; inherit (lib) fileset;
in in
mkMesonDerivation (finalAttrs: { mkMesonLibrary (finalAttrs: {
pname = "nix-util"; pname = "nix-util";
inherit version; inherit version;
@ -38,8 +38,6 @@ mkMesonDerivation (finalAttrs: {
(fileset.fileFilter (file: file.hasExt "hh") ./.) (fileset.fileFilter (file: file.hasExt "hh") ./.)
]; ];
outputs = [ "out" "dev" ];
buildInputs = [ buildInputs = [
brotli brotli
libsodium libsodium
@ -77,10 +75,6 @@ mkMesonDerivation (finalAttrs: {
LDFLAGS = "-fuse-ld=gold"; LDFLAGS = "-fuse-ld=gold";
}; };
separateDebugInfo = !stdenv.hostPlatform.isStatic;
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
meta = { meta = {
platforms = lib.platforms.unix ++ lib.platforms.windows; platforms = lib.platforms.unix ++ lib.platforms.windows;
}; };

View file

@ -1,6 +1,6 @@
{ lib { lib
, stdenv , stdenv
, mkMesonDerivation , mkMesonExecutable
, nix-store , nix-store
, nix-expr , nix-expr
@ -16,7 +16,7 @@ let
inherit (lib) fileset; inherit (lib) fileset;
in in
mkMesonDerivation (finalAttrs: { mkMesonExecutable (finalAttrs: {
pname = "nix"; pname = "nix";
inherit version; inherit version;
@ -103,10 +103,6 @@ mkMesonDerivation (finalAttrs: {
LDFLAGS = "-fuse-ld=gold"; LDFLAGS = "-fuse-ld=gold";
}; };
separateDebugInfo = !stdenv.hostPlatform.isStatic;
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
meta = { meta = {
platforms = lib.platforms.unix ++ lib.platforms.windows; platforms = lib.platforms.unix ++ lib.platforms.windows;
}; };

View file

@ -1,6 +1,7 @@
{ lib { lib
, stdenv , stdenv
, mkMesonDerivation , mkMesonDerivation
, pkg-config
, perl , perl
, perlPackages , perlPackages
, nix-store , nix-store
@ -32,6 +33,7 @@ perl.pkgs.toPerlModule (mkMesonDerivation (finalAttrs: {
]); ]);
nativeBuildInputs = [ nativeBuildInputs = [
pkg-config
perl perl
curl curl
]; ];

View file

@ -75,7 +75,6 @@ mkMesonDerivation (finalAttrs: {
nix-expr nix-expr
]; ];
preConfigure = preConfigure =
# "Inline" .version so it's not a symlink, and includes the suffix. # "Inline" .version so it's not a symlink, and includes the suffix.
# Do the meson utils, without modification. # Do the meson utils, without modification.

View file

@ -1,6 +1,6 @@
{ lib { lib
, stdenv , stdenv
, mkMesonDerivation , mkMesonLibrary
, nix-store-test-support , nix-store-test-support
, nix-expr , nix-expr
@ -16,7 +16,7 @@ let
inherit (lib) fileset; inherit (lib) fileset;
in in
mkMesonDerivation (finalAttrs: { mkMesonLibrary (finalAttrs: {
pname = "nix-util-test-support"; pname = "nix-util-test-support";
inherit version; inherit version;
@ -32,8 +32,6 @@ mkMesonDerivation (finalAttrs: {
(fileset.fileFilter (file: file.hasExt "hh") ./.) (fileset.fileFilter (file: file.hasExt "hh") ./.)
]; ];
outputs = [ "out" "dev" ];
propagatedBuildInputs = [ propagatedBuildInputs = [
nix-store-test-support nix-store-test-support
nix-expr nix-expr
@ -55,10 +53,6 @@ mkMesonDerivation (finalAttrs: {
LDFLAGS = "-fuse-ld=gold"; LDFLAGS = "-fuse-ld=gold";
}; };
separateDebugInfo = !stdenv.hostPlatform.isStatic;
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
meta = { meta = {
platforms = lib.platforms.unix ++ lib.platforms.windows; platforms = lib.platforms.unix ++ lib.platforms.windows;
}; };

View file

@ -1,7 +1,7 @@
{ lib { lib
, buildPackages , buildPackages
, stdenv , stdenv
, mkMesonDerivation , mkMesonExecutable
, nix-expr , nix-expr
, nix-expr-c , nix-expr-c
@ -21,7 +21,7 @@ let
inherit (lib) fileset; inherit (lib) fileset;
in in
mkMesonDerivation (finalAttrs: { mkMesonExecutable (finalAttrs: {
pname = "nix-expr-tests"; pname = "nix-expr-tests";
inherit version; inherit version;
@ -60,10 +60,6 @@ mkMesonDerivation (finalAttrs: {
LDFLAGS = "-fuse-ld=gold"; LDFLAGS = "-fuse-ld=gold";
}; };
separateDebugInfo = !stdenv.hostPlatform.isStatic;
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
passthru = { passthru = {
tests = { tests = {
run = runCommand "${finalAttrs.pname}-run" { run = runCommand "${finalAttrs.pname}-run" {

View file

@ -1,7 +1,7 @@
{ lib { lib
, buildPackages , buildPackages
, stdenv , stdenv
, mkMesonDerivation , mkMesonExecutable
, nix-fetchers , nix-fetchers
, nix-store-test-support , nix-store-test-support
@ -20,7 +20,7 @@ let
inherit (lib) fileset; inherit (lib) fileset;
in in
mkMesonDerivation (finalAttrs: { mkMesonExecutable (finalAttrs: {
pname = "nix-fetchers-tests"; pname = "nix-fetchers-tests";
inherit version; inherit version;
@ -58,10 +58,6 @@ mkMesonDerivation (finalAttrs: {
LDFLAGS = "-fuse-ld=gold"; LDFLAGS = "-fuse-ld=gold";
}; };
separateDebugInfo = !stdenv.hostPlatform.isStatic;
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
passthru = { passthru = {
tests = { tests = {
run = runCommand "${finalAttrs.pname}-run" { run = runCommand "${finalAttrs.pname}-run" {

View file

@ -1,7 +1,7 @@
{ lib { lib
, buildPackages , buildPackages
, stdenv , stdenv
, mkMesonDerivation , mkMesonExecutable
, nix-flake , nix-flake
, nix-expr-test-support , nix-expr-test-support
@ -20,7 +20,7 @@ let
inherit (lib) fileset; inherit (lib) fileset;
in in
mkMesonDerivation (finalAttrs: { mkMesonExecutable (finalAttrs: {
pname = "nix-flake-tests"; pname = "nix-flake-tests";
inherit version; inherit version;
@ -58,10 +58,6 @@ mkMesonDerivation (finalAttrs: {
LDFLAGS = "-fuse-ld=gold"; LDFLAGS = "-fuse-ld=gold";
}; };
separateDebugInfo = !stdenv.hostPlatform.isStatic;
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
passthru = { passthru = {
tests = { tests = {
run = runCommand "${finalAttrs.pname}-run" { run = runCommand "${finalAttrs.pname}-run" {

View file

@ -1,6 +1,6 @@
{ lib { lib
, stdenv , stdenv
, mkMesonDerivation , mkMesonLibrary
, nix-util-test-support , nix-util-test-support
, nix-store , nix-store
@ -16,7 +16,7 @@ let
inherit (lib) fileset; inherit (lib) fileset;
in in
mkMesonDerivation (finalAttrs: { mkMesonLibrary (finalAttrs: {
pname = "nix-store-test-support"; pname = "nix-store-test-support";
inherit version; inherit version;
@ -32,8 +32,6 @@ mkMesonDerivation (finalAttrs: {
(fileset.fileFilter (file: file.hasExt "hh") ./.) (fileset.fileFilter (file: file.hasExt "hh") ./.)
]; ];
outputs = [ "out" "dev" ];
propagatedBuildInputs = [ propagatedBuildInputs = [
nix-util-test-support nix-util-test-support
nix-store nix-store
@ -55,10 +53,6 @@ mkMesonDerivation (finalAttrs: {
LDFLAGS = "-fuse-ld=gold"; LDFLAGS = "-fuse-ld=gold";
}; };
separateDebugInfo = !stdenv.hostPlatform.isStatic;
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
meta = { meta = {
platforms = lib.platforms.unix ++ lib.platforms.windows; platforms = lib.platforms.unix ++ lib.platforms.windows;
}; };

View file

@ -1,7 +1,7 @@
{ lib { lib
, buildPackages , buildPackages
, stdenv , stdenv
, mkMesonDerivation , mkMesonExecutable
, nix-store , nix-store
, nix-store-c , nix-store-c
@ -22,7 +22,7 @@ let
inherit (lib) fileset; inherit (lib) fileset;
in in
mkMesonDerivation (finalAttrs: { mkMesonExecutable (finalAttrs: {
pname = "nix-store-tests"; pname = "nix-store-tests";
inherit version; inherit version;
@ -62,10 +62,6 @@ mkMesonDerivation (finalAttrs: {
LDFLAGS = "-fuse-ld=gold"; LDFLAGS = "-fuse-ld=gold";
}; };
separateDebugInfo = !stdenv.hostPlatform.isStatic;
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
passthru = { passthru = {
tests = { tests = {
run = let run = let

View file

@ -1,6 +1,6 @@
{ lib { lib
, stdenv , stdenv
, mkMesonDerivation , mkMesonLibrary
, nix-util , nix-util
@ -15,7 +15,7 @@ let
inherit (lib) fileset; inherit (lib) fileset;
in in
mkMesonDerivation (finalAttrs: { mkMesonLibrary (finalAttrs: {
pname = "nix-util-test-support"; pname = "nix-util-test-support";
inherit version; inherit version;
@ -31,8 +31,6 @@ mkMesonDerivation (finalAttrs: {
(fileset.fileFilter (file: file.hasExt "hh") ./.) (fileset.fileFilter (file: file.hasExt "hh") ./.)
]; ];
outputs = [ "out" "dev" ];
propagatedBuildInputs = [ propagatedBuildInputs = [
nix-util nix-util
rapidcheck rapidcheck
@ -53,10 +51,6 @@ mkMesonDerivation (finalAttrs: {
LDFLAGS = "-fuse-ld=gold"; LDFLAGS = "-fuse-ld=gold";
}; };
separateDebugInfo = !stdenv.hostPlatform.isStatic;
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
meta = { meta = {
platforms = lib.platforms.unix ++ lib.platforms.windows; platforms = lib.platforms.unix ++ lib.platforms.windows;
}; };

View file

@ -1,7 +1,7 @@
{ lib { lib
, buildPackages , buildPackages
, stdenv , stdenv
, mkMesonDerivation , mkMesonExecutable
, nix-util , nix-util
, nix-util-c , nix-util-c
@ -20,7 +20,7 @@ let
inherit (lib) fileset; inherit (lib) fileset;
in in
mkMesonDerivation (finalAttrs: { mkMesonExecutable (finalAttrs: {
pname = "nix-util-tests"; pname = "nix-util-tests";
inherit version; inherit version;
@ -59,10 +59,6 @@ mkMesonDerivation (finalAttrs: {
LDFLAGS = "-fuse-ld=gold"; LDFLAGS = "-fuse-ld=gold";
}; };
separateDebugInfo = !stdenv.hostPlatform.isStatic;
hardeningDisable = lib.optional stdenv.hostPlatform.isStatic "pie";
passthru = { passthru = {
tests = { tests = {
run = runCommand "${finalAttrs.pname}-run" { run = runCommand "${finalAttrs.pname}-run" {