flake: nixpkgs can now be built without specifying nixpkgs.
as a prefix
This commit is contained in:
23
flake.nix
23
flake.nix
@@ -126,23 +126,28 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
packages =
|
# this includes both our native packages and all the nixpkgs packages.
|
||||||
|
legacyPackages =
|
||||||
let
|
let
|
||||||
allPkgsFor = sys:
|
allPkgsFor = sys: (nixpkgsCompiledBy sys).appendOverlays [
|
||||||
let
|
|
||||||
pkgsBase = nixpkgsCompiledBy sys;
|
|
||||||
pkgsFull = pkgsBase.appendOverlays [
|
|
||||||
self.overlays.passthru self.overlays.pkgs
|
self.overlays.passthru self.overlays.pkgs
|
||||||
];
|
];
|
||||||
in pkgsFull.sane // {
|
|
||||||
inherit (pkgsFull) sane uninsane-dot-org;
|
|
||||||
nixpkgs = pkgsBase;
|
|
||||||
};
|
|
||||||
in {
|
in {
|
||||||
x86_64-linux = allPkgsFor "x86_64-linux";
|
x86_64-linux = allPkgsFor "x86_64-linux";
|
||||||
aarch64-linux = allPkgsFor "aarch64-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 = {
|
templates = {
|
||||||
python-data = {
|
python-data = {
|
||||||
# initialize with:
|
# initialize with:
|
||||||
|
Reference in New Issue
Block a user