Skip to content

Commit

Permalink
Warn when nix package version is set unnecessarily
Browse files Browse the repository at this point in the history
The README used to recommend overriding `version = shortRev`, however we
now use `shortRev` by default.

Notify users of this change by warning when `version` is overridden to
the version we would've used anyway.
  • Loading branch information
MattSturgeon committed Jan 31, 2025
1 parent 8cb9879 commit afc8d5d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packaging/nix/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
# Warnings added in https://github.com/Open-Wine-Components/umu-launcher/pull/345 (2025-01-27)
lib.warnIf (args ? truststore) "umu-launcher: the argument `truststore` has been renamed to `withTruststore`."
lib.warnIf (args ? cbor2) "umu-launcher: the argument `cbor2` has never had any effect. The new argument `withDeltaUpdates` should be used instead."
lib.warnIf (version == umu-launcher-unwrapped.version) "umu-launcher: the argument `version` is no longer necessary. The version now uses `shortRev` by default."
lib.optionalAttrs (args ? version) {inherit version;}
// lib.optionalAttrs (args ? withTruststore || args ? truststore) {inherit withTruststore;}
// lib.optionalAttrs (args ? withDeltaUpdates) {inherit withDeltaUpdates;};
Expand Down

0 comments on commit afc8d5d

Please sign in to comment.