plover: init referencing python3Packages.plover with aliases

Co-authored-by: Gavin John <gavinnjohn@gmail.com>
This commit is contained in:
Yueh-Shun Li
2026-04-26 02:50:51 +08:00
co-authored by Gavin John
parent 188701672b
commit 14b4884f7a
2 changed files with 17 additions and 11 deletions
+17
View File
@@ -0,0 +1,17 @@
{
lib,
config,
python3Packages,
# For aliases
plover,
}:
python3Packages.toPythonApplication python3Packages.plover
# Aliases to now-dropped plover.stable and plover.dev
# Added 2026-04-22
# TODO(@ShamrockLee): remove after Nixpkgs 25.11 EOL
// lib.optionalAttrs (config.allowAliases && !(lib.oldestSupportedReleaseIsAtLeast 2605)) {
dev =
lib.throwIf (lib.oldestSupportedReleaseIsAtLeast 2511) "plover.dev was renamed. Use plover instead."
plover; # Added 2026-04-26
stable = throw "plover.stable was renamed. Use plover instead."; # Added 2022-06-05; updated 2026-04-26
}
@@ -1,8 +1,6 @@
{
lib,
config,
stdenv,
plover,
buildPythonPackage,
fetchFromGitHub,
fetchpatch,
@@ -93,12 +91,3 @@ buildPythonPackage rec {
broken = stdenv.hostPlatform.isDarwin;
};
}
// lib.optionalAttrs config.allowAliases {
# TODO: After 26.05 branch-off, remove these aliases
dev =
if lib.versionOlder "25.05" lib.version then
throw "plover.dev was renamed. Use plover-dev instead." # added 2025-06-05`
else
plover;
stable = throw "plover.stable was renamed. Use plover instead."; # added 2022-06-05; updated 2025-06-27
}