flake: nixpkgs can now be built without specifying `nixpkgs.` as a prefix

This commit is contained in:
colin 2023-01-11 09:21:09 +00:00
parent d4996d6f31
commit a7ff90c843
1 changed files with 16 additions and 11 deletions

View File

@ -126,23 +126,28 @@
};
};
packages =
# this includes both our native packages and all the nixpkgs packages.
legacyPackages =
let
allPkgsFor = sys:
let
pkgsBase = nixpkgsCompiledBy sys;
pkgsFull = pkgsBase.appendOverlays [
self.overlays.passthru self.overlays.pkgs
];
in pkgsFull.sane // {
inherit (pkgsFull) sane uninsane-dot-org;
nixpkgs = pkgsBase;
};
allPkgsFor = sys: (nixpkgsCompiledBy sys).appendOverlays [
self.overlays.passthru self.overlays.pkgs
];
in {
x86_64-linux = allPkgsFor "x86_64-linux";
aarch64-linux = allPkgsFor "aarch64-linux";
};
packages =
let
myPkgsFor = sys:
let full = self.legacyPackages."${sys}"; in full.sane // {
inherit (full) sane uninsane-dot-org;
};
in {
x86_64-linux = myPkgsFor "x86_64-linux";
aarch64-linux = myPkgsFor "aarch64-linux";
};
templates = {
python-data = {
# initialize with: