From afc8d5d4e6be34765e8b8c4328d3ea0f1c62725a Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Mon, 27 Jan 2025 00:29:26 +0000 Subject: [PATCH] Warn when nix package version is set unnecessarily 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. --- packaging/nix/package.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/packaging/nix/package.nix b/packaging/nix/package.nix index 91de9654..7d6e68a3 100644 --- a/packaging/nix/package.nix +++ b/packaging/nix/package.nix @@ -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;};