From e93cfb250b683f3ffd9adc957c14b5b3b2e108ae Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Mon, 23 Jan 2023 19:08:46 +0100 Subject: tests.pkg-configPackages: Filter out unsupported packages --- pkgs/test/default.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'pkgs/test/default.nix') diff --git a/pkgs/test/default.nix b/pkgs/test/default.nix index 8ff0e163395..82134b051d4 100644 --- a/pkgs/test/default.nix +++ b/pkgs/test/default.nix @@ -51,7 +51,22 @@ with pkgs; php = recurseIntoAttrs (callPackages ./php {}); - pkg-configPackages = callPackage ./pkg-config-packages.nix { }; + pkg-configPackages = + let + # pkg-configPackages 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 {}; buildRustCrate = callPackage ../build-support/rust/build-rust-crate/test { }; -- cgit 1.4.1