1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-16 23:42:43 +01:00

Drop external*Inputs from packages

Get rid of some manual package set resolution in favor of splicing
again, too.

Co-authored-by: John Ericson <John.Ericson@Obsidian.Systems>
This commit is contained in:
Robert Hensing 2025-11-06 01:52:38 +01:00 committed by John Ericson
parent 1fa235b77c
commit cb5b0c30aa
7 changed files with 41 additions and 64 deletions

View file

@ -58,8 +58,8 @@ mkMesonDerivation (finalAttrs: {
"man"
];
# Hack for sake of the dev shell
passthru.externalNativeBuildInputs = [
nativeBuildInputs = [
nix-cli
meson
ninja
(lib.getBin lowdown-unsandboxed)
@ -78,10 +78,6 @@ mkMesonDerivation (finalAttrs: {
changelog-d
];
nativeBuildInputs = finalAttrs.passthru.externalNativeBuildInputs ++ [
nix-cli
];
preConfigure = ''
chmod u+w ./.version
echo ${finalAttrs.version} > ./.version

View file

@ -34,15 +34,11 @@ mkMesonDerivation (finalAttrs: {
outputs = [ "out" ];
passthru.externalNativeBuildInputs = [
jsonschema
];
nativeBuildInputs = [
meson
ninja
]
++ finalAttrs.passthru.externalNativeBuildInputs;
jsonschema
];
doCheck = true;

View file

@ -37,7 +37,15 @@ mkMesonDerivation (finalAttrs: {
outputs = [ "out" ];
passthru.externalNativeBuildInputs = [
buildInputs = [
gtest
kaitai-struct-cpp-stl-runtime
];
nativeBuildInputs = [
meson
ninja
pkg-config
# This can go away when we bump up to 25.11
(kaitai-struct-compiler.overrideAttrs (finalAttrs: {
version = "0.11";
@ -48,20 +56,6 @@ mkMesonDerivation (finalAttrs: {
}))
];
passthru.externalBuildInputs = [
gtest
kaitai-struct-cpp-stl-runtime
];
buildInputs = finalAttrs.passthru.externalBuildInputs;
nativeBuildInputs = [
meson
ninja
pkg-config
]
++ finalAttrs.passthru.externalNativeBuildInputs;
doCheck = true;
mesonCheckFlags = [ "--print-errorlogs" ];

View file

@ -70,11 +70,6 @@ mkMesonLibrary (finalAttrs: {
nix-util
nix-store
nix-fetchers
]
++ finalAttrs.passthru.externalPropagatedBuildInputs;
# Hack for sake of the dev shell
passthru.externalPropagatedBuildInputs = [
boost
nlohmann_json
]

View file

@ -42,20 +42,16 @@ mkMesonExecutable (finalAttrs: {
(fileset.fileFilter (file: file.hasExt "hh") ./.)
];
# Hack for sake of the dev shell
passthru.externalBuildInputs = [
buildInputs = [
sqlite
rapidcheck
gtest
]
++ lib.optionals withBenchmarks [
gbenchmark
];
buildInputs = finalAttrs.passthru.externalBuildInputs ++ [
nix-store
nix-store-c
nix-store-test-support
]
++ lib.optionals withBenchmarks [
gbenchmark
];
mesonFlags = [

View file

@ -45,11 +45,6 @@ perl.pkgs.toPerlModule (
buildInputs = [
nix-store
]
++ finalAttrs.passthru.externalBuildInputs;
# Hack for sake of the dev shell
passthru.externalBuildInputs = [
bzip2
libsodium
];

View file

@ -2,7 +2,16 @@
lib,
stdenv,
mkMesonDerivation,
buildPackages,
meson,
ninja,
pkg-config,
jq,
git,
mercurial,
unixtools,
util-linux,
nix-store,
nix-expr,
@ -37,17 +46,20 @@ mkMesonDerivation (
./.
];
# Hack for sake of the dev shell. Need to "manually splice" since
# this isn't a specially-recognized list of dependencies.
passthru.externalNativeBuildInputs = [
buildPackages.meson
buildPackages.ninja
buildPackages.pkg-config
nativeBuildInputs = [
meson
ninja
pkg-config
buildPackages.jq
buildPackages.git
buildPackages.mercurial
buildPackages.unixtools.script
jq
git
mercurial
unixtools.script
# Explicitly splice the hostHost variant to fix LLVM tests. The nix-cli
# has to be in PATH, but must come from the host context where it's built
# with libc++.
(nix-cli.__spliced.hostHost or nix-cli)
]
++ lib.optionals stdenv.hostPlatform.isLinux [
# For various sandboxing tests that needs a statically-linked shell,
@ -56,14 +68,7 @@ mkMesonDerivation (
# For Overlay FS tests need `mount`, `umount`, and `unshare`.
# For `script` command (ensuring a TTY)
# TODO use `unixtools` to be precise over which executables instead?
buildPackages.util-linux
];
nativeBuildInputs = finalAttrs.passthru.externalNativeBuildInputs ++ [
# Explicitly splice the hostHost variant to fix LLVM tests. The nix-cli
# has to be in PATH, but must come from the host context where it's built
# with libc++.
(nix-cli.__spliced.hostHost or nix-cli)
util-linux
];
buildInputs = [