Skip to content

Commit 0fe9206

Browse files
committed
Fixes for nix-everything wrapper
1. Fix this eval error: https://hydra.nixos.org/jobset/nix/master#tabs-errors The dev package output (actually a separate derivation) needs to skip this for cross just as the main package output does. 2. Deduplicate libs attrset and list. 3. Move `nix-functional-tests` to `checkInputs`. With the Meson build system, we no longer need a `check` vs `install-check` distinction, so it is simpler to just keeep everything in one place.
1 parent ac31767 commit 0fe9206

File tree

2 files changed

+31
-43
lines changed

2 files changed

+31
-43
lines changed

packaging/everything.nix

Lines changed: 28 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -42,29 +42,34 @@
4242
}:
4343

4444
let
45-
dev = stdenv.mkDerivation (finalAttrs: {
46-
name = "nix-${nix-cli.version}-dev";
47-
pname = "nix";
48-
version = nix-cli.version;
49-
dontUnpack = true;
50-
dontBuild = true;
51-
libs = map lib.getDev [
52-
nix-cmd
45+
libs = {
46+
inherit
47+
nix-util
48+
nix-util-c
49+
nix-store
50+
nix-store-c
51+
nix-fetchers
5352
nix-expr
5453
nix-expr-c
55-
nix-fetchers
5654
nix-flake
5755
nix-flake-c
5856
nix-main
5957
nix-main-c
60-
nix-store
61-
nix-store-c
62-
nix-util
63-
nix-util-c
64-
] ++ lib.optionals (!stdenv.hostPlatform.isStatic) [
65-
# Currently fails in static build
58+
;
59+
} // lib.optionalAttrs (!stdenv.hostPlatform.isStatic && stdenv.buildPlatform.canExecute stdenv.hostPlatform) {
60+
# Currently fails in static build
61+
inherit
6662
nix-perl-bindings
67-
];
63+
;
64+
};
65+
66+
dev = stdenv.mkDerivation (finalAttrs: {
67+
name = "nix-${nix-cli.version}-dev";
68+
pname = "nix";
69+
version = nix-cli.version;
70+
dontUnpack = true;
71+
dontBuild = true;
72+
libs = map lib.getDev (lib.attrValues libs);
6873
installPhase = ''
6974
mkdir -p $out/nix-support
7075
echo $libs >> $out/nix-support/propagated-build-inputs
@@ -129,22 +134,16 @@ in
129134
nix-fetchers-tests.tests.run
130135
nix-flake-tests.tests.run
131136

137+
# Make sure the functional tests have passed
138+
nix-functional-tests
139+
132140
# dev bundle is ok
133141
# (checkInputs must be empty paths??)
134142
(runCommand "check-pkg-config" { checked = dev.tests.pkg-config; } "mkdir $out")
135-
] ++
136-
lib.optionals (!stdenv.hostPlatform.isStatic) (
143+
] ++ lib.optionals (!stdenv.hostPlatform.isStatic && stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
137144
# Perl currently fails in static build
138-
(if stdenv.buildPlatform.canExecute stdenv.hostPlatform
139-
then [
140-
# TODO: add perl.tests
141-
nix-perl-bindings
142-
]
143-
else [
144-
nix-perl-bindings
145-
]));
146-
installCheckInputs = [
147-
nix-functional-tests
145+
# TODO: Split out tests into a separate derivation?
146+
nix-perl-bindings
148147
];
149148
passthru = prevAttrs.passthru // {
150149
inherit (nix-cli) version;
@@ -166,21 +165,7 @@ in
166165
disallowedReferences = nix.all;
167166
```
168167
*/
169-
libs = {
170-
inherit
171-
nix-util
172-
nix-util-c
173-
nix-store
174-
nix-store-c
175-
nix-fetchers
176-
nix-expr
177-
nix-expr-c
178-
nix-flake
179-
nix-flake-c
180-
nix-main
181-
nix-main-c
182-
;
183-
};
168+
inherit libs;
184169

185170
tests = prevAttrs.passthru.tests or {} // {
186171
# TODO: create a proper fixpoint and:

src/perl/meson.build

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ nix_store_dep = dependency('nix-store')
8282
# pkgconfig available, are not in a standard location,
8383
# and are installed into a version folder. Use the
8484
# Perl binary to give hints about perl include dir.
85+
#
86+
# Note that until we have a better solution for this, cross-compiling
87+
# the perl bindings does not appear to be possible.
8588
#-------------------------------------------------
8689
perl_archname = run_command(
8790
perl, '-e', 'use Config; print $Config{archname};', check: true).stdout()

0 commit comments

Comments
 (0)