Skip to content

Commit cb5b0c3

Browse files
roberthEricson2314
andcommitted
Drop external*Inputs from packages
Get rid of some manual package set resolution in favor of splicing again, too. Co-authored-by: John Ericson <[email protected]>
1 parent 1fa235b commit cb5b0c3

File tree

7 files changed

+42
-65
lines changed

7 files changed

+42
-65
lines changed

doc/manual/package.nix

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ mkMesonDerivation (finalAttrs: {
5858
"man"
5959
];
6060

61-
# Hack for sake of the dev shell
62-
passthru.externalNativeBuildInputs = [
61+
nativeBuildInputs = [
62+
nix-cli
6363
meson
6464
ninja
6565
(lib.getBin lowdown-unsandboxed)
@@ -78,10 +78,6 @@ mkMesonDerivation (finalAttrs: {
7878
changelog-d
7979
];
8080

81-
nativeBuildInputs = finalAttrs.passthru.externalNativeBuildInputs ++ [
82-
nix-cli
83-
];
84-
8581
preConfigure = ''
8682
chmod u+w ./.version
8783
echo ${finalAttrs.version} > ./.version

src/json-schema-checks/package.nix

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,11 @@ mkMesonDerivation (finalAttrs: {
3434

3535
outputs = [ "out" ];
3636

37-
passthru.externalNativeBuildInputs = [
38-
jsonschema
39-
];
40-
4137
nativeBuildInputs = [
4238
meson
4339
ninja
44-
]
45-
++ finalAttrs.passthru.externalNativeBuildInputs;
40+
jsonschema
41+
];
4642

4743
doCheck = true;
4844

src/kaitai-struct-checks/package.nix

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,15 @@ mkMesonDerivation (finalAttrs: {
3737

3838
outputs = [ "out" ];
3939

40-
passthru.externalNativeBuildInputs = [
40+
buildInputs = [
41+
gtest
42+
kaitai-struct-cpp-stl-runtime
43+
];
44+
45+
nativeBuildInputs = [
46+
meson
47+
ninja
48+
pkg-config
4149
# This can go away when we bump up to 25.11
4250
(kaitai-struct-compiler.overrideAttrs (finalAttrs: {
4351
version = "0.11";
@@ -48,20 +56,6 @@ mkMesonDerivation (finalAttrs: {
4856
}))
4957
];
5058

51-
passthru.externalBuildInputs = [
52-
gtest
53-
kaitai-struct-cpp-stl-runtime
54-
];
55-
56-
buildInputs = finalAttrs.passthru.externalBuildInputs;
57-
58-
nativeBuildInputs = [
59-
meson
60-
ninja
61-
pkg-config
62-
]
63-
++ finalAttrs.passthru.externalNativeBuildInputs;
64-
6559
doCheck = true;
6660

6761
mesonCheckFlags = [ "--print-errorlogs" ];

src/libexpr/package.nix

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,6 @@ mkMesonLibrary (finalAttrs: {
7070
nix-util
7171
nix-store
7272
nix-fetchers
73-
]
74-
++ finalAttrs.passthru.externalPropagatedBuildInputs;
75-
76-
# Hack for sake of the dev shell
77-
passthru.externalPropagatedBuildInputs = [
7873
boost
7974
nlohmann_json
8075
]

src/libstore-tests/package.nix

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,16 @@ mkMesonExecutable (finalAttrs: {
4242
(fileset.fileFilter (file: file.hasExt "hh") ./.)
4343
];
4444

45-
# Hack for sake of the dev shell
46-
passthru.externalBuildInputs = [
45+
buildInputs = [
4746
sqlite
4847
rapidcheck
4948
gtest
50-
]
51-
++ lib.optionals withBenchmarks [
52-
gbenchmark
53-
];
54-
55-
buildInputs = finalAttrs.passthru.externalBuildInputs ++ [
5649
nix-store
5750
nix-store-c
5851
nix-store-test-support
52+
]
53+
++ lib.optionals withBenchmarks [
54+
gbenchmark
5955
];
6056

6157
mesonFlags = [

src/perl/package.nix

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,6 @@ perl.pkgs.toPerlModule (
4545

4646
buildInputs = [
4747
nix-store
48-
]
49-
++ finalAttrs.passthru.externalBuildInputs;
50-
51-
# Hack for sake of the dev shell
52-
passthru.externalBuildInputs = [
5348
bzip2
5449
libsodium
5550
];

tests/functional/package.nix

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,16 @@
22
lib,
33
stdenv,
44
mkMesonDerivation,
5-
buildPackages,
5+
6+
meson,
7+
ninja,
8+
pkg-config,
9+
10+
jq,
11+
git,
12+
mercurial,
13+
unixtools,
14+
util-linux,
615

716
nix-store,
817
nix-expr,
@@ -37,17 +46,20 @@ mkMesonDerivation (
3746
./.
3847
];
3948

40-
# Hack for sake of the dev shell. Need to "manually splice" since
41-
# this isn't a specially-recognized list of dependencies.
42-
passthru.externalNativeBuildInputs = [
43-
buildPackages.meson
44-
buildPackages.ninja
45-
buildPackages.pkg-config
46-
47-
buildPackages.jq
48-
buildPackages.git
49-
buildPackages.mercurial
50-
buildPackages.unixtools.script
49+
nativeBuildInputs = [
50+
meson
51+
ninja
52+
pkg-config
53+
54+
jq
55+
git
56+
mercurial
57+
unixtools.script
58+
59+
# Explicitly splice the hostHost variant to fix LLVM tests. The nix-cli
60+
# has to be in PATH, but must come from the host context where it's built
61+
# with libc++.
62+
(nix-cli.__spliced.hostHost or nix-cli)
5163
]
5264
++ lib.optionals stdenv.hostPlatform.isLinux [
5365
# For various sandboxing tests that needs a statically-linked shell,
@@ -56,14 +68,7 @@ mkMesonDerivation (
5668
# For Overlay FS tests need `mount`, `umount`, and `unshare`.
5769
# For `script` command (ensuring a TTY)
5870
# TODO use `unixtools` to be precise over which executables instead?
59-
buildPackages.util-linux
60-
];
61-
62-
nativeBuildInputs = finalAttrs.passthru.externalNativeBuildInputs ++ [
63-
# Explicitly splice the hostHost variant to fix LLVM tests. The nix-cli
64-
# has to be in PATH, but must come from the host context where it's built
65-
# with libc++.
66-
(nix-cli.__spliced.hostHost or nix-cli)
71+
util-linux
6772
];
6873

6974
buildInputs = [

0 commit comments

Comments
 (0)