1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-18 10:30:23 -04:00

components.nix: Extract dependency scope

This avoids polluting nixComponents with things that aren't our
components.
Fixes the extraction of passthru tests, which failed for boehmgc
which had many irrelevant ones anyway.
This commit is contained in:
Robert Hensing 2024-06-26 03:58:47 +02:00
parent ebf77c79ae
commit 25dc12aab1
2 changed files with 11 additions and 7 deletions

View file

@ -176,11 +176,21 @@
# without "polluting" the top level "`pkgs`" attrset.
# This also has the benefit of providing us with a distinct set of packages
# we can iterate over.
nixComponents = lib.makeScope final.newScope (import ./packaging/components.nix {
nixComponents = lib.makeScope final.nixDependencies.newScope (import ./packaging/components.nix {
pkgs = final;
inherit stdenv versionSuffix;
});
# The dependencies are in their own scope, so that they don't have to be
# in Nixpkgs top level `pkgs` or `nixComponents`.
nixDependencies = lib.makeScope final.newScope (scope: {
inherit stdenv versionSuffix;
libseccomp = final.libseccomp_nix;
boehmgc = final.boehmgc_nix;
libgit2 = final.libgit2_nix;
busybox-sandbox-shell = final.busybox-sandbox-shell or final.default-busybox-sandbox-shell;
});
nix = final.nixComponents.nix;
nix-internal-api-docs = final.callPackage ./src/internal-api-docs/package.nix {

View file

@ -5,12 +5,6 @@ in
# This becomes the pkgs.nixComponents attribute set
{
inherit stdenv versionSuffix;
libseccomp = pkgs.libseccomp_nix;
boehmgc = pkgs.boehmgc_nix;
libgit2 = pkgs.libgit2_nix;
busybox-sandbox-shell = pkgs.busybox-sandbox-shell or pkgs.default-busybox-sandbox-shell;
nix = callPackage ../package.nix { };
nix-util = callPackage ../src/libutil/package.nix { };