inputs: pin nixpkgs-unstable
This commit is contained in:
parent
75f5d7ee9d
commit
77ef7434f2
7 changed files with 35 additions and 28 deletions
16
pkgs/overlays/unstable-with-meta.nix
Normal file
16
pkgs/overlays/unstable-with-meta.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
unstableSource,
|
||||
revision,
|
||||
}: self: super:
|
||||
|
||||
let
|
||||
version = builtins.readFile "${unstableSource}/lib/.version" + ".git." + builtins.substring 0 12 revision;
|
||||
useUnstable = self.config.useUnstable or true;
|
||||
|
||||
in
|
||||
import ./unstable-from-source.nix {
|
||||
inherit unstableSource;
|
||||
} self super // {
|
||||
unstableVersion = self.lib.optionalString useUnstable version;
|
||||
unstableRevision = self.lib.optionalString useUnstable revision;
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
self: super:
|
||||
|
||||
let
|
||||
nixos = self.config.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;
|
||||
} self super // {
|
||||
unstableVersion = self.lib.optionalString useUnstable nixpkgsVersion;
|
||||
unstableRevision = self.lib.optionalString useUnstable nixpkgsRevision;
|
||||
}
|
|
@ -14,7 +14,7 @@ let
|
|||
overlays = (args.overlays or []) ++ [
|
||||
# ../.. 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.nix )
|
||||
( import ../overlays/unstable-with-meta.nix { unstableSource = inputs.nixpkgs-unstable; revision = inputs.lock.nixpkgs-unstable.revision; } )
|
||||
( import ../overlays/version-info-fixup.nix { inherit inputs; } )
|
||||
( import ./by-name-overlay.nix ../by-name )
|
||||
];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue