top-level/pkg-config: Make tests easy to find

This commit is contained in:
Robert Hensing 2023-01-29 08:54:13 +01:00
parent 811bf8ade0
commit 3be7ea8c89
5 changed files with 26 additions and 18 deletions

View File

@ -51,22 +51,7 @@ with pkgs;
php = recurseIntoAttrs (callPackages ./php {});
defaultPkgConfigPackages =
let
# defaultPkgConfigPackages test needs a Nixpkgs with allowUnsupportedPlatform
# in order to filter out the unsupported packages without throwing any errors
# tryEval would be too fragile, masking different problems as if they're
# unsupported platform problems.
allPkgs = import ../top-level {
system = pkgs.stdenv.hostPlatform.system;
localSystem = pkgs.stdenv.hostPlatform.system;
config = {
allowUnsupportedSystem = true;
};
overlays = [];
};
in
allPkgs.callPackage ./pkg-config-packages.nix { };
pkg-config = recurseIntoAttrs (callPackage ../top-level/pkg-config/tests.nix { });
rustCustomSysroot = callPackage ./rust-sysroot {};
buildRustCrate = callPackage ../build-support/rust/build-rust-crate/test { };

View File

@ -112,7 +112,7 @@ with pkgs;
tests = callPackages ../test {};
defaultPkgConfigPackages = import ./pkg-config-packages.nix pkgs;
defaultPkgConfigPackages = import ./pkg-config/defaultPkgConfigPackages.nix pkgs;
### Nixpkgs maintainer tools

View File

@ -21,7 +21,7 @@ let
importJSON
;
data = importJSON ./pkg-config/pkg-config-data.json;
data = importJSON ./pkg-config-data.json;
inherit (data) modules;
platform = pkgs.stdenv.hostPlatform;

View File

@ -1,3 +1,5 @@
# cd nixpkgs
# nix-build -A tests.pkg-config.defaultPkgConfigPackages
{ lib, pkg-config, defaultPkgConfigPackages, runCommand }:
let
inherit (lib.strings) escapeNixIdentifier;

View File

@ -0,0 +1,21 @@
# cd nixpkgs
# nix-build -A tests.pkg-config
{ lib, stdenv, ... }:
let
# defaultPkgConfigPackages test needs a Nixpkgs with allowUnsupportedPlatform
# in order to filter out the unsupported packages without throwing any errors
# tryEval would be too fragile, masking different problems as if they're
# unsupported platform problems.
allPkgs = import ../default.nix {
system = stdenv.hostPlatform.system;
localSystem = stdenv.hostPlatform.system;
config = {
allowUnsupportedSystem = true;
};
overlays = [];
};
in
lib.recurseIntoAttrs {
defaultPkgConfigPackages = allPkgs.callPackage ./test-defaultPkgConfigPackages.nix { };
}