nixos-configuration/pkgs/overlays/unstable-latest.nix
Wroclaw ec91266fcd pkgs/overlays/unstable-latest: init
this reuses code that was removed in 77ef7434f2
2025-02-09 08:23:49 +01:00

25 lines
944 B
Nix

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;
}