fix(3p/nixpkgs): pass the same args to stable as to unstable nixpkgs
Of course we can't pass the overlays without causing an infinite recursion, but they are also intended purely for unstable nixpkgs, so it doesn't matter. Change-Id: I0e1b42e37ad12872f9420cf59dff6d944b2bc5d3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5847 Autosubmit: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
This commit is contained in:
parent
7fea2bdc45
commit
9c78e5a490
1 changed files with 17 additions and 13 deletions
30
third_party/nixpkgs/default.nix
vendored
30
third_party/nixpkgs/default.nix
vendored
|
@ -16,6 +16,20 @@
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
# Arguments passed to both the stable nixpkgs and the main, unstable one.
|
||||||
|
# Includes everything but overlays which are only passed to unstable nixpkgs.
|
||||||
|
commonNixpkgsArgs = {
|
||||||
|
# allow users to inject their config into builds (e.g. to test CA derivations)
|
||||||
|
config =
|
||||||
|
(if externalArgs ? nixpkgsConfig then externalArgs.nixpkgsConfig else { })
|
||||||
|
// {
|
||||||
|
allowUnfree = true;
|
||||||
|
allowBroken = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
inherit localSystem;
|
||||||
|
};
|
||||||
|
|
||||||
# import the nixos-unstable package set, or optionally use the
|
# import the nixos-unstable package set, or optionally use the
|
||||||
# source (e.g. a path) specified by the `nixpkgsBisectPath`
|
# source (e.g. a path) specified by the `nixpkgsBisectPath`
|
||||||
# argument. This is intended for use-cases where the depot is
|
# argument. This is intended for use-cases where the depot is
|
||||||
|
@ -25,7 +39,7 @@ let
|
||||||
|
|
||||||
# Stable package set is imported, but not exposed, to overlay
|
# Stable package set is imported, but not exposed, to overlay
|
||||||
# required packages into the unstable set.
|
# required packages into the unstable set.
|
||||||
stableNixpkgs = import depot.third_party.sources.nixpkgs-stable { };
|
stableNixpkgs = import depot.third_party.sources.nixpkgs-stable commonNixpkgsArgs;
|
||||||
|
|
||||||
# Overlay for packages that should come from the stable channel
|
# Overlay for packages that should come from the stable channel
|
||||||
# instead (e.g. because something is broken in unstable).
|
# instead (e.g. because something is broken in unstable).
|
||||||
|
@ -44,17 +58,7 @@ let
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
import nixpkgsSrc {
|
import nixpkgsSrc (commonNixpkgsArgs // {
|
||||||
# allow users to inject their config into builds (e.g. to test CA derivations)
|
|
||||||
config =
|
|
||||||
(if externalArgs ? nixpkgsConfig then externalArgs.nixpkgsConfig else { })
|
|
||||||
// {
|
|
||||||
allowUnfree = true;
|
|
||||||
allowBroken = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
inherit localSystem;
|
|
||||||
|
|
||||||
overlays = [
|
overlays = [
|
||||||
commitsOverlay
|
commitsOverlay
|
||||||
stableOverlay
|
stableOverlay
|
||||||
|
@ -65,4 +69,4 @@ import nixpkgsSrc {
|
||||||
depot.third_party.overlays.ecl-static
|
depot.third_party.overlays.ecl-static
|
||||||
depot.third_party.overlays.dhall
|
depot.third_party.overlays.dhall
|
||||||
] else [ ]);
|
] else [ ]);
|
||||||
}
|
})
|
||||||
|
|
Loading…
Reference in a new issue