diff --git a/lib/overlays/version-info-fixup.nix b/lib/overlays/version-info-fixup.nix index b413842..104840a 100644 --- a/lib/overlays/version-info-fixup.nix +++ b/lib/overlays/version-info-fixup.nix @@ -1,8 +1,8 @@ -{ inputs ? import ../../inputs.nix {} }: +{ revision }: selfLib: superLib: { trivial = superLib.trivial // { - versionSuffix = ".git.${builtins.substring 0 12 inputs.lock.nixpkgs.revision}"; - revisionWithDefault = default: inputs.lock.nixpkgs.revision or default; + versionSuffix = ".git.${builtins.substring 0 12 revision}"; + revisionWithDefault = default: revision; }; } diff --git a/outputs.nix b/outputs.nix index e1e2c24..225823d 100644 --- a/outputs.nix +++ b/outputs.nix @@ -5,7 +5,7 @@ let -lib = (import "${inputs.nixpkgs}/lib").extend (import ./lib/overlays/version-info-fixup.nix { inherit inputs; }); +lib = (import "${inputs.nixpkgs}/lib").extend (import ./lib/overlays/version-info-fixup.nix { revision = inputs.lock.nixpkgs.revision; }); self = { inherit inputs lib self; diff --git a/pkgs/overlays/version-info-fixup.nix b/pkgs/overlays/version-info-fixup.nix index 14d890e..b1f2ecc 100644 --- a/pkgs/overlays/version-info-fixup.nix +++ b/pkgs/overlays/version-info-fixup.nix @@ -1,5 +1,12 @@ { inputs ? import ../../inputs.nix {} }: self: super: { - lib = super.lib.extend (import ../../lib/overlays/version-info-fixup.nix { inherit inputs; }); + lib = super.lib.extend (import ../../lib/overlays/version-info-fixup.nix { revision = inputs.lock.nixpkgs.revision; }); +} // +super.lib.optionalAttrs (super ? unstable && super ? unstableRevision) { + unstable = super.unstable // { + lib = super.unstable.lib.extend (import ../../lib/overlays/version-info-fixup.nix { + revision = super.unstableRevision; + }); + }; }