-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor nix flake, based on overriding nixpkgs #345
Conversation
Looks good to me (Probably the problem was the combine.nix I didn't know I didn't need it at the time (my first flake after all)) |
Actually remove the warning for using umu-run aka the rename function Using umu-run package is not documented or documented either way so yeah |
eb39a88
to
e9cd956
Compare
As for the flake changes, I cannot give a review there. Though I will say that I'm not seeing any issue with #343 and it doesn't affect the other packaging formats so you don't need to worry about it. Your change to the Makefile will only be a problem if the user or distribution maintainer overrides INSTALLER_ARGS. On that event, it will be their responsibility. And suppose INSTALLER_ARGS is a problem in another way. Most Linux distribution maintainers are competent enough to evaluate bad packaging practices before distributing the software to their users and will apply patches to workaround them. Again, it will be on them for not patching or failing to find the bad practices. |
cc @LovingMelody for review as the change directly affects nix-citizen. |
This doesn't seem to build? umu-launcher/packaging/nix on MattSturgeon/main:main
at 15:49:15 ❯ nix build .\#umu-launcher .\#umu --override-input nixpkgs github:Nixos/nixpkgs/master
warning: not writing modified lock file of flake 'git+file:///home/melody/Development/umu-launcher?dir=packaging/nix':
• Updated input 'nixpkgs':
'github:nixos/nixpkgs/538bf58cdd0cff89a93217837f4d87b6eb45ab2c?narHash=sha256-w78d7bi8hkCWVmGbuE5D9YRIJY27dbEBgwLsCRd8dV8%3D' (2025-01-20)
→ 'github:Nixos/nixpkgs/66aa98b29099c636622a9d9c18370f13701716f6?narHash=sha256-b4LNBx%2BScZY3TdYvdFckvuOD7L3RrQ06YUiNG6lmaeM%3D' (2025-01-20)
error:
… in the condition of the assert statement
at /nix/store/ad8slsrhg8mz40jl69nx0z1blpcs4dyq-source/lib/customisation.nix:417:9:
416| drvPath =
417| assert condition;
| ^
418| drv.drvPath;
… while evaluating a branch condition
at /nix/store/ad8slsrhg8mz40jl69nx0z1blpcs4dyq-source/pkgs/stdenv/generic/check-meta.nix:504:6:
503| inherit (validity) valid;
504| in if validity ? handled then validity else validity // {
| ^
505| # Throw an error if trying to evaluate a non-valid derivation
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: attempt to call something which is not a function but a set: { type = "derivation"; LANG = «thunk»; __ignoreNulls = true; __structuredAttrs = false; all = «thunk»; args = «thunk»; buildInputs = «thunk»; builder = «thunk»; cmakeFlags = «thunk»; configureFlags = «thunk»; «45 attributes elided» }
at /nix/store/6ghygpfc3ciyp8hznp30cghv1dxlij9q-source/packaging/nix/flake.nix:21:9:
20| pkgs: name:
21| pkgs.${name} or throw (
| ^
22| "umu-launcher: " |
1f41ff2
to
f0906bd
Compare
efaa609
to
26c9c70
Compare
I've refactored and cleaned things up following feedback. To demonstrate everything working:
|
@MattSturgeon nixos-unstable should be used nonetheless. The names are slightly confusing, the actual difference to nixpkgs-unstable is the amount of tests ran (with nixos-unstable having more). |
This comment has been minimized.
This comment has been minimized.
So you think less testing is better? |
This comment has been minimized.
This comment has been minimized.
Yeah, so if the zstd library is included in the package already then it should be good. |
It is a No harm in explicitly adding it back to umu-launcher-unwrapped's inputs too if we're unsure. I've checked that the package builds as-is, but I'm not familiar enough to know what can/should be checked at runtime. |
@MattSturgeon I have a question why is paths are broken is this whats intended to happen ?? |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
add these to install flags I know its fixed but add this
|
This comment was marked as resolved.
This comment was marked as resolved.
yeah probably |
No, umu-delta-install should not be conditional with withDeltaUpdates. |
The umu-vendored make target depends on git submodules and is not needed now that we provide pyzstd as a nix package. Until now, it was disabled with a patch, however that broke in Open-Wine-Components#330. Instead of patching the makefile's `all` target, we can explicitly specify the targets we want to build/install using make flags. This is a temporary workaround until the Makefile can automatically disable the target when the dependency is already available. Maybe a make variable?
To clarify, both If so, this should be resolved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good thanks for doing the work I was not in a situation and still isn't in a situation to dedicate this much time thanks again @MattSturgeon
Yes, both of those targets are required regardless of withDeltaUpdates. |
https://github.com/Open-Wine-Components/umu-launcher/releases/tag/1.2.0 https://github.com/Open-Wine-Components/umu-launcher/releases/tag/1.2.1 https://github.com/Open-Wine-Components/umu-launcher/releases/tag/1.2.2 https://github.com/Open-Wine-Components/umu-launcher/releases/tag/1.2.3 Incorporates work done in: Open-Wine-Components/umu-launcher#345
https://github.com/Open-Wine-Components/umu-launcher/releases/tag/1.2.0 https://github.com/Open-Wine-Components/umu-launcher/releases/tag/1.2.1 https://github.com/Open-Wine-Components/umu-launcher/releases/tag/1.2.2 https://github.com/Open-Wine-Components/umu-launcher/releases/tag/1.2.3 Incorporates work done in: Open-Wine-Components/umu-launcher#345
https://github.com/Open-Wine-Components/umu-launcher/releases/tag/1.2.0 https://github.com/Open-Wine-Components/umu-launcher/releases/tag/1.2.1 https://github.com/Open-Wine-Components/umu-launcher/releases/tag/1.2.2 https://github.com/Open-Wine-Components/umu-launcher/releases/tag/1.2.3 Incorporates work done in: Open-Wine-Components/umu-launcher#345
https://github.com/Open-Wine-Components/umu-launcher/releases/tag/1.2.0 https://github.com/Open-Wine-Components/umu-launcher/releases/tag/1.2.1 https://github.com/Open-Wine-Components/umu-launcher/releases/tag/1.2.2 https://github.com/Open-Wine-Components/umu-launcher/releases/tag/1.2.3 Incorporates work done in: Open-Wine-Components/umu-launcher#345
https://github.com/Open-Wine-Components/umu-launcher/releases/tag/1.2.0 https://github.com/Open-Wine-Components/umu-launcher/releases/tag/1.2.1 https://github.com/Open-Wine-Components/umu-launcher/releases/tag/1.2.2 https://github.com/Open-Wine-Components/umu-launcher/releases/tag/1.2.3 https://github.com/Open-Wine-Components/umu-launcher/releases/tag/1.2.4 https://github.com/Open-Wine-Components/umu-launcher/releases/tag/1.2.5 Incorporates work done in: Open-Wine-Components/umu-launcher#345 Open-Wine-Components/umu-launcher#384
Now that there's a package being maintained in nixpkgs, it can be used as a starting point for the nix package here.
This is technically a breaking change, because the packages made available by the overlay are different and because the internals of the packages are different. But I've made efforts to avoid breaking changes to the public-facing API where practical.
Testing
If you have a nix flake setup as described in the README, you can simply replace your
inputs.umu.url
url string with:Also, you may want to remove any
follows
targeting the umu input, or alternatively runnix flake update
. Either way, the nixpkgs input must have NixOS/nixpkgs#369259 and NixOS/nixpkgs#375588.You may occasionally need to update your lockfile (
nix flake update
) to get the latest changes from this PR.Packages
umu-launcher
is now equivalent to the oldumu
andumu-run
packages (combine.nix
&umu-run.nix
)umu-launcher-unwrapped
is now equivalent to the oldumu-launcher
(umu-launcher.nix
)umu-launcher-unwrapped
is directly based on nixpkgs, overriding the relevant attrs to use this git repo instead of 1.1.4umu-launcher
uses the overriddenumu-launcher-unwrapped
implicitlyPublic API
The existing package-args API is still available, however warnings will be printed if it is used.
It consists of
override
-able package args:version
truststore
cbor2
(although this never had any effect)A new API is proposed:
version
withTruststore
withDeltaUpdates
The README has been updated to reflect the new package-args API.
Version
The package version is now based on the flake's
shortRev
, ordirtyShortRev
if the flake is used locally and there are uncommitted changes.This means users no longer need to override the version themselves.
The README has been updated to reflect this.
Nixpkgs
The new implementation relies on nixpkgs having the
umu-launcher-unwrapped
package added in NixOS/nixpkgs#369259 and a small fix from NixOS/nixpkgs#375588.That package has been in:
The nixpkgs maintainers are: