Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixpkgs.lib: Include .version #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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