Skip to content

nixpkgs.lib: Include .version#5

Open
bb010g wants to merge 1 commit intonix-community:masterfrom
bb010g:include-version
Open

nixpkgs.lib: Include .version#5
bb010g wants to merge 1 commit intonix-community:masterfrom
bb010g:include-version

Conversation

@bb010g
Copy link

@bb010g bb010g commented Aug 18, 2023

Used by release, version, and isInOldestRelease.

I know #1 already was refused, but I think this is valid for versioning lib itself. Example use: https://github.com/hercules-ci/flake-parts/blob/70d1b51a85170b46b57a2ad62308501651daa5c1/lib.nix#L214-L229

  # A best effort, lenient estimate. Please use a recent nixpkgs lib if you
  # override it at all.
  minVersion = "22.05";


in


if builtins.compareVersions lib.version minVersion < 0
then
  abort ''
    The nixpkgs-lib dependency of flake-parts was overridden but is too old.
    The minimum supported version of nixpkgs-lib is ${minVersion},
    but the actual version is ${lib.version}${revInfo}.
  ''
else

  flake-parts-lib

Used by `release`, `version`, and `isInOldestRelease`.
@roberth
Copy link
Contributor

roberth commented Aug 18, 2023

I'd prefer this to be handled upstream in nixpkgs itself, so that pulling the lib subtree stays simple and eventually Nix could support it natively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants