Skip to content

Commit 4d33ffd

Browse files
committed
build(nix): drop support for outdated nixpkgs revisions
Require nixpkgs to have a 1.2.0+ umu-launcher package.
1 parent dd5af27 commit 4d33ffd

File tree

3 files changed

+11
-112
lines changed

3 files changed

+11
-112
lines changed

packaging/nix/old-unwrapped.nix

Lines changed: 0 additions & 60 deletions
This file was deleted.

packaging/nix/pyzstd.nix

Lines changed: 0 additions & 35 deletions
This file was deleted.

packaging/nix/unwrapped.nix

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,32 @@
11
{
22
# Dependencies
3-
callPackage,
43
lib,
54
rustPlatform,
65
umu-launcher-unwrapped,
76
version,
87
# Freeform overrides
98
...
10-
} @ args: let
9+
} @ args:
10+
# Nixpkgs bumped 1.1.4 -> 1.2.5 on 2025-02-20
11+
# Available in all unstable channels since 2025-02-24
12+
# https://github.com/NixOS/nixpkgs/pull/381975
13+
assert lib.assertMsg (lib.versionAtLeast umu-launcher-unwrapped.version "1.2.0") ''
14+
You have updated your umu-launcher input, however you have an outdated nixpkgs input. A nixpkgs input with umu-launcher 1.2.0+ is required.
15+
Please update your nixpkgs revision by running `nix flake lock --update-input nixpkgs` or `nix flake update`.
16+
''; let
1117
# Unknown args will be used to override the nixpkgs package
1218
# NOTE: All known args must be removed here
1319
overrideArgs = builtins.removeAttrs args [
14-
"callPackage"
1520
"lib"
1621
"rustPlatform"
1722
"umu-launcher-unwrapped"
1823
"version"
1924
];
2025

21-
# Remove unsupported args not accepted by old-unwrapped.nix
22-
oldVersionArgs = builtins.removeAttrs args [
23-
"callPackage"
24-
"version"
25-
];
26-
27-
# Figure out and/or override the base package
26+
# Use the unwrapped package as-is or override it,
27+
# based on whether we have any override args
2828
package =
29-
# Nixpkgs bumped 1.1.4 -> 1.2.3 on 2025-02-17
30-
# https://github.com/NixOS/nixpkgs/pull/381975
31-
if lib.versionOlder umu-launcher-unwrapped.version "1.2.0"
32-
then callPackage ./old-unwrapped.nix oldVersionArgs
33-
# Use the unwrapped package as-is or override it,
34-
# based on whether we have any override args
35-
else if overrideArgs == {}
29+
if overrideArgs == {}
3630
then umu-launcher-unwrapped
3731
else umu-launcher-unwrapped.override overrideArgs;
3832
in

0 commit comments

Comments
 (0)