mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-21 04:28:40 +03: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 {});
|
php = recurseIntoAttrs (callPackages ./php {});
|
||||||
|
|
||||||
defaultPkgConfigPackages =
|
pkg-config = recurseIntoAttrs (callPackage ../top-level/pkg-config/tests.nix { });
|
||||||
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 { };
|
|
||||||
|
|
||||||
rustCustomSysroot = callPackage ./rust-sysroot {};
|
rustCustomSysroot = callPackage ./rust-sysroot {};
|
||||||
buildRustCrate = callPackage ../build-support/rust/build-rust-crate/test { };
|
buildRustCrate = callPackage ../build-support/rust/build-rust-crate/test { };
|
||||||
|
@ -112,7 +112,7 @@ with pkgs;
|
|||||||
|
|
||||||
tests = callPackages ../test {};
|
tests = callPackages ../test {};
|
||||||
|
|
||||||
defaultPkgConfigPackages = import ./pkg-config-packages.nix pkgs;
|
defaultPkgConfigPackages = import ./pkg-config/defaultPkgConfigPackages.nix pkgs;
|
||||||
|
|
||||||
### Nixpkgs maintainer tools
|
### Nixpkgs maintainer tools
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ let
|
|||||||
importJSON
|
importJSON
|
||||||
;
|
;
|
||||||
|
|
||||||
data = importJSON ./pkg-config/pkg-config-data.json;
|
data = importJSON ./pkg-config-data.json;
|
||||||
inherit (data) modules;
|
inherit (data) modules;
|
||||||
|
|
||||||
platform = pkgs.stdenv.hostPlatform;
|
platform = pkgs.stdenv.hostPlatform;
|
@ -1,3 +1,5 @@
|
|||||||
|
# cd nixpkgs
|
||||||
|
# nix-build -A tests.pkg-config.defaultPkgConfigPackages
|
||||||
{ lib, pkg-config, defaultPkgConfigPackages, runCommand }:
|
{ lib, pkg-config, defaultPkgConfigPackages, runCommand }:
|
||||||
let
|
let
|
||||||
inherit (lib.strings) escapeNixIdentifier;
|
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