-
Notifications
You must be signed in to change notification settings - Fork 48
Support overriding 1.2.0+ nix package #374
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
Support overriding 1.2.0+ nix package #374
Conversation
Prepare for the upcoming version bump in nixpkgs, by making the unnecessary or conflicting overrides conditional.
1b9e757
to
a0e341d
Compare
Great, the relevant pull request was finally merged in nixpkgs. @LovingMelody are you fine/have any strong feelings for these changes? If not, then I can go ahead and merge this. |
(prev.pythonPath or []) | ||
++ [ | ||
urllib3 | ||
(callPackage ./pyzstd.nix {}) |
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.
I believe we can drop this once it lands in unstable.
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.
If we're confident that we have an up-to-date nixpkgs revision, then the entire old-unwrapped.nix
file can go, along with the pyzstd package.
It is only kept to allow for a smoother transition for end users who may end up bumping their umu input but their nixpkgs input remains slightly behind.
We should be able to drop it in a few weeks. Maybe throwing an error if a v1.1.4 base package is still found.
|
||
# Broken? Tests parse_args with no options (./umu_run.py) | ||
# Fails with AssertionError: SystemExit not raised | ||
"test_parse_args_noopts" |
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.
I understand why the game drive tests fail but am not sure for this one. I suppose it's related to the other tests failing, and I am not too interested in looking into it.
Aside: If either pyzstd or zstd get updated, which will happen soon, then I imagine it will require a rebuild for the upstream nixpkg, correct? |
Typically nixpkgs will update shortly after a new version is released. If umu still needs the old version, then nixpkgs may consider packaging both versions. Or the dependency can be overridden to use the old version, specifically for umu. Otherwise, if umu requires the new version before it is available in nixpkgs, then we can apply overrides here. How much effort we put in here would depend on how important it is for umu to have a specific version of zstd. |
No strong feelings on this pr |
Prepare for the upcoming version bump in nixpkgs, by making the unnecessary or conflicting overrides conditional on the version of the package being overridden.
This is compatible with nixpkgs inputs both with and without NixOS/nixpkgs#381975, because we can check the base-package's version and choose an override impl based on that.
If the base package is older than 1.2.0, we use the old/current impl. If the package is 1.2.0 or newer, we can drop those overrides and only use the newer simpler impl.
I've split the old & new impl into separate files to simplify the diff and make the eventual removal easier.
Testing
To test the "old" impl, you can simply clone this PR and run
nix build
.To test the "new" impl, against NixOS/nixpkgs#381975, you can override the
nixpkgs
input and then build:nix flake lock --override-input nixpkgs 'github:nixos/nixpkgs?ref=pull/381975/merge' nix build
Tip
Use
ref=pull/<number>/merge
to test a PR merged with the latest nixpkgs masteror use
ref=pull/<number>/head
to test the PR itself.cc @beh-10257 @LovingMelody @diniamo @R1kaB3rN
Nixpkgs PR NixOS/nixpkgs#381975