fix overlay application order so cross
comes before pkgs
this lets me add new packages, and have them be emulated on moby builds
This commit is contained in:
@@ -102,11 +102,8 @@
|
|||||||
self.nixosModules.passthru
|
self.nixosModules.passthru
|
||||||
{
|
{
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
self.overlays.disable-flakey-tests
|
|
||||||
self.overlays.passthru
|
self.overlays.passthru
|
||||||
self.overlays.pins
|
self.overlays.sane-all
|
||||||
self.overlays.pkgs
|
|
||||||
# self.overlays.optimizations
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
({ lib, ... }: {
|
({ lib, ... }: {
|
||||||
@@ -175,6 +172,7 @@
|
|||||||
# N.B.: `nix flake check` requires every overlay to take `final: prev:` at defn site,
|
# N.B.: `nix flake check` requires every overlay to take `final: prev:` at defn site,
|
||||||
# hence the weird redundancy.
|
# hence the weird redundancy.
|
||||||
default = final: prev: self.overlays.pkgs final prev;
|
default = final: prev: self.overlays.pkgs final prev;
|
||||||
|
sane-all = final: prev: import ./overlays/all.nix final prev;
|
||||||
disable-flakey-tests = final: prev: import ./overlays/disable-flakey-tests.nix final prev;
|
disable-flakey-tests = final: prev: import ./overlays/disable-flakey-tests.nix final prev;
|
||||||
pkgs = final: prev: import ./overlays/pkgs.nix final prev;
|
pkgs = final: prev: import ./overlays/pkgs.nix final prev;
|
||||||
pins = final: prev: import ./overlays/pins.nix final prev;
|
pins = final: prev: import ./overlays/pins.nix final prev;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,6 @@
|
|||||||
{ lib, pkgs, ... }:
|
{ lib, pkgs, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./cross
|
|
||||||
./feeds.nix
|
./feeds.nix
|
||||||
./fs.nix
|
./fs.nix
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
|
@@ -15,5 +15,4 @@
|
|||||||
|
|
||||||
networking.hostName = hostName;
|
networking.hostName = hostName;
|
||||||
nixpkgs.buildPlatform = lib.mkIf (localSystem != null) localSystem;
|
nixpkgs.buildPlatform = lib.mkIf (localSystem != null) localSystem;
|
||||||
sane.cross.enablePatches = localSystem != null;
|
|
||||||
}
|
}
|
||||||
|
@@ -124,17 +124,22 @@ in [
|
|||||||
hash = "sha256-+g3XhmBt/udhbBDiVyfWnfXKvZTvDurlvPblQ9HYp3s=";
|
hash = "sha256-+g3XhmBt/udhbBDiVyfWnfXKvZTvDurlvPblQ9HYp3s=";
|
||||||
})
|
})
|
||||||
|
|
||||||
(fetchpatch' {
|
# (fetchpatch' {
|
||||||
# harec: support pkgsCross cross-compilation
|
# # harec: support pkgsCross cross-compilation
|
||||||
saneCommit = "6f77961e94fe736b2f9963dd9c6411b36f8bb9c5";
|
# saneCommit = "6f77961e94fe736b2f9963dd9c6411b36f8bb9c5";
|
||||||
hash = "sha256-3QmV7ihPBEdLDGfJQBN+J/A3DpzpGFjzggsXLbr3hOE=";
|
# hash = "sha256-3QmV7ihPBEdLDGfJQBN+J/A3DpzpGFjzggsXLbr3hOE=";
|
||||||
})
|
# })
|
||||||
|
|
||||||
(fetchpatch' {
|
(fetchpatch' {
|
||||||
# hare: unstable-2023-03-15 -> unstable-2023-04-23
|
# hare: unstable-2023-03-15 -> unstable-2023-04-23
|
||||||
# TODO: remove aarch64 block & then ship upstream
|
saneCommit = "cdea9097fd6afb43751e42f1cd1b50e2bffb4d58";
|
||||||
saneCommit = "ef2a506dac3258c51733c1f09889b85ad356d0dd";
|
hash = "sha256-33LoktURM81bLsfY3v+SHL30Qju9GyOMCXVbsGrgOjU=";
|
||||||
hash = "sha256-cYwen/8F0tK+g5rSuffDjNCOIIPbgzjDSaNyjtNW9ts=";
|
})
|
||||||
|
|
||||||
|
(fetchpatch' {
|
||||||
|
# harec: unstable-2023-02-18 -> unstable-2023-04-25
|
||||||
|
saneCommit = "5595e88de982474ba6cc9c4d7f4a7a246edb4980";
|
||||||
|
hash = "sha256-kKhygKpf3QqQR0kSxutKwZXbNcsSTp/z165h88J8/+g=";
|
||||||
})
|
})
|
||||||
|
|
||||||
# for raspberry pi: allow building u-boot for rpi 4{,00}
|
# for raspberry pi: allow building u-boot for rpi 4{,00}
|
||||||
|
26
overlays/all.nix
Normal file
26
overlays/all.nix
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
# this overlay exists specifically to control the order in which other overlays are applied.
|
||||||
|
# for example, `pkgs` *must* be added before `cross`, as the latter applies overrides
|
||||||
|
# to the packages defined in the former.
|
||||||
|
|
||||||
|
final: prev:
|
||||||
|
let
|
||||||
|
pins = import ./pins.nix;
|
||||||
|
pkgs = import ./pkgs.nix;
|
||||||
|
disable-flakey-tests = import ./disable-flakey-tests.nix;
|
||||||
|
optimizations = import ./optimizations.nix;
|
||||||
|
cross = import ./cross.nix;
|
||||||
|
|
||||||
|
isCross = prev.stdenv.hostPlatform != prev.stdenv.buildPlatform;
|
||||||
|
ifCross = overlay: if isCross then overlay else (_: _: {});
|
||||||
|
renderOverlays = overlays: builtins.foldl'
|
||||||
|
(acc: thisOverlay: acc // (thisOverlay final acc))
|
||||||
|
prev
|
||||||
|
overlays;
|
||||||
|
in
|
||||||
|
renderOverlays [
|
||||||
|
pins
|
||||||
|
pkgs
|
||||||
|
disable-flakey-tests
|
||||||
|
(ifCross optimizations)
|
||||||
|
(ifCross cross)
|
||||||
|
]
|
1148
overlays/cross.nix
Normal file
1148
overlays/cross.nix
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user