mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
top-level/pkg-config: Make tests easy to find
This commit is contained in:
parent
811bf8ade0
commit
3be7ea8c89
@ -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 { };
|
||||
|
@ -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
|
||||
|
||||
|
@ -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;
|
@ -1,3 +1,5 @@
|
||||
# cd nixpkgs
|
||||
# nix-build -A tests.pkg-config.defaultPkgConfigPackages
|
||||
{ lib, pkg-config, defaultPkgConfigPackages, runCommand }:
|
||||
let
|
||||
inherit (lib.strings) escapeNixIdentifier;
|
21
pkgs/top-level/pkg-config/tests.nix
Normal file
21
pkgs/top-level/pkg-config/tests.nix
Normal 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 { };
|
||||
}
|
Loading…
Reference in New Issue
Block a user