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

View file

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

View file

@ -37,7 +37,15 @@ mkMesonDerivation (finalAttrs: {
outputs = [ "out" ]; 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 # This can go away when we bump up to 25.11
(kaitai-struct-compiler.overrideAttrs (finalAttrs: { (kaitai-struct-compiler.overrideAttrs (finalAttrs: {
version = "0.11"; 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; doCheck = true;
mesonCheckFlags = [ "--print-errorlogs" ]; mesonCheckFlags = [ "--print-errorlogs" ];

View file

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

View file

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

View file

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

View file

@ -2,7 +2,16 @@
lib, lib,
stdenv, stdenv,
mkMesonDerivation, mkMesonDerivation,
buildPackages,
meson,
ninja,
pkg-config,
jq,
git,
mercurial,
unixtools,
util-linux,
nix-store, nix-store,
nix-expr, nix-expr,
@ -37,17 +46,20 @@ mkMesonDerivation (
./. ./.
]; ];
# Hack for sake of the dev shell. Need to "manually splice" since nativeBuildInputs = [
# this isn't a specially-recognized list of dependencies. meson
passthru.externalNativeBuildInputs = [ ninja
buildPackages.meson pkg-config
buildPackages.ninja
buildPackages.pkg-config
buildPackages.jq jq
buildPackages.git git
buildPackages.mercurial mercurial
buildPackages.unixtools.script 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 [ ++ lib.optionals stdenv.hostPlatform.isLinux [
# For various sandboxing tests that needs a statically-linked shell, # 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 Overlay FS tests need `mount`, `umount`, and `unshare`.
# For `script` command (ensuring a TTY) # For `script` command (ensuring a TTY)
# TODO use `unixtools` to be precise over which executables instead? # TODO use `unixtools` to be precise over which executables instead?
buildPackages.util-linux 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)
]; ];
buildInputs = [ buildInputs = [