pkgs/overlays/unstable-latest: init
this reuses code that was removed in 77ef7434f2
This commit is contained in:
parent
5d9f3332b8
commit
ec91266fcd
3 changed files with 28 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
unstableSource,
|
||||
attributeName ? "unstable",
|
||||
}:
|
||||
|
||||
self: super:
|
||||
|
@ -32,5 +33,5 @@ let
|
|||
});
|
||||
in
|
||||
{
|
||||
unstable = if useUnstable then unstablePkgsForNixpkgs self else self;
|
||||
"${attributeName}" = if useUnstable then unstablePkgsForNixpkgs self else self;
|
||||
}
|
||||
|
|
25
pkgs/overlays/unstable-latest.nix
Normal file
25
pkgs/overlays/unstable-latest.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
self: super:
|
||||
|
||||
let
|
||||
nixos = self.config.unstable-latest.nixos or true;
|
||||
useUnstable = self.config.useUnstable or true;
|
||||
|
||||
unstablePkgsExprs = if nixos
|
||||
then builtins.fetchTarball "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"
|
||||
else builtins.fetchTarball "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz";
|
||||
|
||||
# Compiled nixpkgs expression eg expressions from a nix channel
|
||||
nixpkgsVersion = builtins.concatStringsSep "." [
|
||||
(builtins.readFile "${unstablePkgsExprs}/.version")
|
||||
(builtins.readFile "${unstablePkgsExprs}/.version-suffix")
|
||||
];
|
||||
|
||||
nixpkgsRevision = (builtins.readFile "${unstablePkgsExprs}/.git-revision");
|
||||
in
|
||||
import ./unstable-from-source.nix {
|
||||
unstableSource = unstablePkgsExprs;
|
||||
attributeName = "unstable-latest";
|
||||
} self super // {
|
||||
unstableLatestVersion = if !useUnstable then null else nixpkgsVersion;
|
||||
unstableLatestRevision = if !useUnstable then null else nixpkgsRevision;
|
||||
}
|
|
@ -15,6 +15,7 @@ let
|
|||
# ../.. should be nix store path that represents self in outputs.nix that is gc-rooted by this point
|
||||
( import ../overlays/selfExpr.nix { nixpkgsPath = "${builtins.toString ../..}/pkgs/top-level/impure.nix"; } )
|
||||
( import ../overlays/unstable-with-meta.nix { unstableSource = inputs.nixpkgs-unstable; revision = inputs.lock.nixpkgs-unstable.revision; } )
|
||||
( import ../overlays/unstable-latest.nix )
|
||||
( import ../overlays/version-info-fixup.nix { inherit inputs; } )
|
||||
( import ./by-name-overlay.nix ../by-name )
|
||||
];
|
||||
|
|
Loading…
Add table
Reference in a new issue