pkgs/overlays/version-info-fixup: support unstable-with-meta overlay

This commit is contained in:
Wroclaw 2025-01-12 22:19:00 +01:00
parent 77ef7434f2
commit bb3c272119
3 changed files with 12 additions and 5 deletions

View file

@ -1,8 +1,8 @@
{ inputs ? import ../../inputs.nix {} }: { revision }:
selfLib: superLib: { selfLib: superLib: {
trivial = superLib.trivial // { trivial = superLib.trivial // {
versionSuffix = ".git.${builtins.substring 0 12 inputs.lock.nixpkgs.revision}"; versionSuffix = ".git.${builtins.substring 0 12 revision}";
revisionWithDefault = default: inputs.lock.nixpkgs.revision or default; revisionWithDefault = default: revision;
}; };
} }

View file

@ -5,7 +5,7 @@
let 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 = { self = {
inherit inputs lib self; inherit inputs lib self;

View file

@ -1,5 +1,12 @@
{ inputs ? import ../../inputs.nix {} }: { inputs ? import ../../inputs.nix {} }:
self: super: { 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;
});
};
} }