|
1 | 1 | {
|
2 | 2 | # Dependencies
|
3 |
| - callPackage, |
4 | 3 | lib,
|
5 | 4 | rustPlatform,
|
6 | 5 | umu-launcher-unwrapped,
|
7 | 6 | version,
|
8 | 7 | # Freeform overrides
|
9 | 8 | ...
|
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 |
11 | 17 | # Unknown args will be used to override the nixpkgs package
|
12 | 18 | # NOTE: All known args must be removed here
|
13 | 19 | overrideArgs = builtins.removeAttrs args [
|
14 |
| - "callPackage" |
15 | 20 | "lib"
|
16 | 21 | "rustPlatform"
|
17 | 22 | "umu-launcher-unwrapped"
|
18 | 23 | "version"
|
19 | 24 | ];
|
20 | 25 |
|
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 |
28 | 28 | 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 == {} |
36 | 30 | then umu-launcher-unwrapped
|
37 | 31 | else umu-launcher-unwrapped.override overrideArgs;
|
38 | 32 | in
|
|
0 commit comments