components.nix: Simplify with scope

This commit is contained in:
Robert Hensing 2024-06-26 03:33:30 +02:00
parent 85de5a60c7
commit 74b9b77c9f
2 changed files with 16 additions and 57 deletions

View File

@ -178,7 +178,7 @@
# we can iterate over.
nixComponents = lib.makeScope final.newScope (import ./packaging/components.nix {
pkgs = final;
inherit stdenv versionSuffix officialRelease;
inherit stdenv versionSuffix;
});
nix = final.nixComponents.nix;

View File

@ -1,70 +1,29 @@
{pkgs, stdenv, officialRelease, versionSuffix}: scope:
{pkgs, stdenv, versionSuffix}: scope:
let
inherit (scope) callPackage;
in
# This becomes the pkgs.nixComponents attribute set
{
# TODO: build the nix CLI with meson
nix = pkgs.callPackage ../package.nix {
inherit
stdenv
versionSuffix
;
inherit stdenv versionSuffix;
libseccomp = pkgs.libseccomp-nix;
boehmgc = pkgs.boehmgc-nix;
libgit2 = pkgs.libgit2-nix;
libseccomp = pkgs.libseccomp-nix;
busybox-sandbox-shell = pkgs.busybox-sandbox-shell or pkgs.default-busybox-sandbox-shell;
};
nix-util = callPackage ../src/libutil/package.nix {
inherit
stdenv
versionSuffix
;
};
nix = callPackage ../package.nix { };
nix-util-test-support = callPackage ../tests/unit/libutil-support/package.nix {
inherit
stdenv
versionSuffix
;
};
nix-util = callPackage ../src/libutil/package.nix { };
nix-util-test = callPackage ../tests/unit/libutil/package.nix {
inherit
stdenv
versionSuffix
;
};
nix-util-test-support = callPackage ../tests/unit/libutil-support/package.nix { };
nix-util-c = callPackage ../src/libutil-c/package.nix {
inherit
stdenv
versionSuffix
;
};
nix-util-test = callPackage ../tests/unit/libutil/package.nix { };
nix-store = callPackage ../src/libstore/package.nix {
inherit
stdenv
versionSuffix
;
libseccomp = pkgs.libseccomp-nix;
busybox-sandbox-shell = pkgs.busybox-sandbox-shell or pkgs.default-busybox-sandbox-shell;
};
nix-util-c = callPackage ../src/libutil-c/package.nix { };
nix-fetchers = callPackage ../src/libfetchers/package.nix {
inherit
stdenv
versionSuffix
;
};
nix-store = callPackage ../src/libstore/package.nix { };
nix-perl-bindings = callPackage ../src/perl/package.nix {
inherit
stdenv
versionSuffix
;
};
nix-fetchers = callPackage ../src/libfetchers/package.nix { };
nix-perl-bindings = callPackage ../src/perl/package.nix { };
}