mirror of
https://github.com/NixOS/nix
synced 2025-06-25 02:21:16 +02:00
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.
This commit is contained in:
parent
ac31767c57
commit
0fe92067fb
2 changed files with 32 additions and 44 deletions
|
@ -42,29 +42,34 @@
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
libs = {
|
||||||
|
inherit
|
||||||
|
nix-util
|
||||||
|
nix-util-c
|
||||||
|
nix-store
|
||||||
|
nix-store-c
|
||||||
|
nix-fetchers
|
||||||
|
nix-expr
|
||||||
|
nix-expr-c
|
||||||
|
nix-flake
|
||||||
|
nix-flake-c
|
||||||
|
nix-main
|
||||||
|
nix-main-c
|
||||||
|
;
|
||||||
|
} // lib.optionalAttrs (!stdenv.hostPlatform.isStatic && stdenv.buildPlatform.canExecute stdenv.hostPlatform) {
|
||||||
|
# Currently fails in static build
|
||||||
|
inherit
|
||||||
|
nix-perl-bindings
|
||||||
|
;
|
||||||
|
};
|
||||||
|
|
||||||
dev = stdenv.mkDerivation (finalAttrs: {
|
dev = stdenv.mkDerivation (finalAttrs: {
|
||||||
name = "nix-${nix-cli.version}-dev";
|
name = "nix-${nix-cli.version}-dev";
|
||||||
pname = "nix";
|
pname = "nix";
|
||||||
version = nix-cli.version;
|
version = nix-cli.version;
|
||||||
dontUnpack = true;
|
dontUnpack = true;
|
||||||
dontBuild = true;
|
dontBuild = true;
|
||||||
libs = map lib.getDev [
|
libs = map lib.getDev (lib.attrValues libs);
|
||||||
nix-cmd
|
|
||||||
nix-expr
|
|
||||||
nix-expr-c
|
|
||||||
nix-fetchers
|
|
||||||
nix-flake
|
|
||||||
nix-flake-c
|
|
||||||
nix-main
|
|
||||||
nix-main-c
|
|
||||||
nix-store
|
|
||||||
nix-store-c
|
|
||||||
nix-util
|
|
||||||
nix-util-c
|
|
||||||
] ++ lib.optionals (!stdenv.hostPlatform.isStatic) [
|
|
||||||
# Currently fails in static build
|
|
||||||
nix-perl-bindings
|
|
||||||
];
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/nix-support
|
mkdir -p $out/nix-support
|
||||||
echo $libs >> $out/nix-support/propagated-build-inputs
|
echo $libs >> $out/nix-support/propagated-build-inputs
|
||||||
|
@ -129,22 +134,16 @@ in
|
||||||
nix-fetchers-tests.tests.run
|
nix-fetchers-tests.tests.run
|
||||||
nix-flake-tests.tests.run
|
nix-flake-tests.tests.run
|
||||||
|
|
||||||
|
# Make sure the functional tests have passed
|
||||||
|
nix-functional-tests
|
||||||
|
|
||||||
# dev bundle is ok
|
# dev bundle is ok
|
||||||
# (checkInputs must be empty paths??)
|
# (checkInputs must be empty paths??)
|
||||||
(runCommand "check-pkg-config" { checked = dev.tests.pkg-config; } "mkdir $out")
|
(runCommand "check-pkg-config" { checked = dev.tests.pkg-config; } "mkdir $out")
|
||||||
] ++
|
] ++ lib.optionals (!stdenv.hostPlatform.isStatic && stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
|
||||||
lib.optionals (!stdenv.hostPlatform.isStatic) (
|
|
||||||
# Perl currently fails in static build
|
# Perl currently fails in static build
|
||||||
(if stdenv.buildPlatform.canExecute stdenv.hostPlatform
|
# TODO: Split out tests into a separate derivation?
|
||||||
then [
|
nix-perl-bindings
|
||||||
# TODO: add perl.tests
|
|
||||||
nix-perl-bindings
|
|
||||||
]
|
|
||||||
else [
|
|
||||||
nix-perl-bindings
|
|
||||||
]));
|
|
||||||
installCheckInputs = [
|
|
||||||
nix-functional-tests
|
|
||||||
];
|
];
|
||||||
passthru = prevAttrs.passthru // {
|
passthru = prevAttrs.passthru // {
|
||||||
inherit (nix-cli) version;
|
inherit (nix-cli) version;
|
||||||
|
@ -166,21 +165,7 @@ in
|
||||||
disallowedReferences = nix.all;
|
disallowedReferences = nix.all;
|
||||||
```
|
```
|
||||||
*/
|
*/
|
||||||
libs = {
|
inherit libs;
|
||||||
inherit
|
|
||||||
nix-util
|
|
||||||
nix-util-c
|
|
||||||
nix-store
|
|
||||||
nix-store-c
|
|
||||||
nix-fetchers
|
|
||||||
nix-expr
|
|
||||||
nix-expr-c
|
|
||||||
nix-flake
|
|
||||||
nix-flake-c
|
|
||||||
nix-main
|
|
||||||
nix-main-c
|
|
||||||
;
|
|
||||||
};
|
|
||||||
|
|
||||||
tests = prevAttrs.passthru.tests or {} // {
|
tests = prevAttrs.passthru.tests or {} // {
|
||||||
# TODO: create a proper fixpoint and:
|
# TODO: create a proper fixpoint and:
|
||||||
|
|
|
@ -82,6 +82,9 @@ nix_store_dep = dependency('nix-store')
|
||||||
# pkgconfig available, are not in a standard location,
|
# pkgconfig available, are not in a standard location,
|
||||||
# and are installed into a version folder. Use the
|
# and are installed into a version folder. Use the
|
||||||
# Perl binary to give hints about perl include dir.
|
# Perl binary to give hints about perl include dir.
|
||||||
|
#
|
||||||
|
# Note that until we have a better solution for this, cross-compiling
|
||||||
|
# the perl bindings does not appear to be possible.
|
||||||
#-------------------------------------------------
|
#-------------------------------------------------
|
||||||
perl_archname = run_command(
|
perl_archname = run_command(
|
||||||
perl, '-e', 'use Config; print $Config{archname};', check: true).stdout()
|
perl, '-e', 'use Config; print $Config{archname};', check: true).stdout()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue