fix(3p): use nixpkgs nix_2_3 expr and tarball job for our Nix fork
By re-using the nix_2_3 expression from nixpkgs we are no longer stuck with the 2021 expression from Nix's release.nix and the resulting derivation has a shape that other expressions in nixpkgs expect (e.g. nix-serve), so we can actually overlay our fork into the nix_2_3 attribute. This should reduce duplication on e.g. whitby. Since there is no nixUnstable expression in nixpkgs anymore, it expects a Nix release tarball which we produle using the appropriate release.nix job from the repository. Sadly there is some trickery involved in getting it to respect localSystem, since the tarball job is not based on the passed in systems list. Change-Id: Ib49f298334d166327f91559a06b0a37b2488bc63 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7262 Autosubmit: sterni <sternenseemann@systemli.org> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
This commit is contained in:
parent
28dacca91d
commit
69475a651c
1 changed files with 17 additions and 6 deletions
23
third_party/overlays/tvl.nix
vendored
23
third_party/overlays/tvl.nix
vendored
|
@ -18,6 +18,19 @@ let
|
||||||
inherit rev;
|
inherit rev;
|
||||||
hash = "sha256:0rwyrh471c5y64axyd8vzzzmzlscg97fsrjbgbm1a93wnzxcvnvk";
|
hash = "sha256:0rwyrh471c5y64axyd8vzzzmzlscg97fsrjbgbm1a93wnzxcvnvk";
|
||||||
} // { revCount = 0; shortRev = builtins.substring 0 7 rev; };
|
} // { revCount = 0; shortRev = builtins.substring 0 7 rev; };
|
||||||
|
|
||||||
|
nixTarball = (scopedImport
|
||||||
|
{
|
||||||
|
# The tarball job always uses currentSystem which we need to purify
|
||||||
|
builtins = builtins // { currentSystem = localSystem; };
|
||||||
|
}
|
||||||
|
"${nixSrc}/release.nix"
|
||||||
|
{
|
||||||
|
nix = nixSrc;
|
||||||
|
nixpkgs = self.path;
|
||||||
|
systems = [ ];
|
||||||
|
}
|
||||||
|
).tarball;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
buf = super.buf.overrideAttrs (old: {
|
buf = super.buf.overrideAttrs (old: {
|
||||||
|
@ -27,12 +40,10 @@ in
|
||||||
] ++ old.patches or [ ];
|
] ++ old.patches or [ ];
|
||||||
});
|
});
|
||||||
|
|
||||||
nix = (import "${nixSrc}/release.nix" {
|
nix_2_3 = super.nix_2_3.overrideAttrs (_: {
|
||||||
nix = nixSrc;
|
src = "${nixTarball}/tarballs/nix-${nixTarball.version}.tar.xz";
|
||||||
nixpkgs = super.path;
|
});
|
||||||
systems = [ localSystem ];
|
nix = self.nix_2_3;
|
||||||
}).build."${localSystem}";
|
|
||||||
|
|
||||||
nix_latest = super.nix;
|
nix_latest = super.nix;
|
||||||
|
|
||||||
nvd = super.nvd.overrideAttrs (old: {
|
nvd = super.nvd.overrideAttrs (old: {
|
||||||
|
|
Loading…
Reference in a new issue