buildPython*: support fixed-point arguments#271387
Conversation
|
input-remapper part looks good, you'll probably get a merge conflict if #249777 gets merged first |
Thank you for reviewing.
That one is easy to resolve. No worries. |
Is this automatically done because the wrapper are shared or required extra codes changes? If it is the latter I am inclined to not add it to stronger underline the EOL status of python 2. |
There was a problem hiding this comment.
I am not sure about this but we could we just not add support for python 2 to move it closer to removal?
There was a problem hiding this comment.
It's still relevant because it is used by pypy2.pkgs.buildPython*. and that PyPy says that they will continue to support PyPy 2, as RPython (the language they use to implement the PyPy interpreter) is essentially a Python 2 subset.
There was a problem hiding this comment.
Even if we are going to drop python2/mk-python-derivation.nix, I have to address the syntax error as they share the same makeOveridablePythonAttrs code in python-packages-base.nix.
pkgs/by-name/py/pyspread/package.nix
Outdated
There was a problem hiding this comment.
I don't like this pattern, when only changing version it silently makes the FOD none reproducible.
There was a problem hiding this comment.
Looks like fetchpypi doesn't let you pass in anything that sends up in the source derivation's name
There was a problem hiding this comment.
In xrootd.passthru.tests.test-xrdcp, I pass a version to the FOD that consists of <xrootd version from finalAttrs>-<xrootd drv hash from finalAttrs> to make it rebuilds everytime xrootd gets rebuild.
The version trick might also be suitable for source FODs. However, for vendoring FODs, it could be a waste of time and space to rebuild when the vendorHash remains the same.
The ultimate solution might be a mechanism to generate automatic passthru.tests for all the FOD passed into stdenv.mkDerivaiton. Automatically-generated passthru.tests test cases could also be a way to run ShellCheck against build commands (#21166).
There was a problem hiding this comment.
In the case of fetchPypi, the outPath changes when version changes. The FOD package will be rebuild even when hash isn't changed.
eb79c07 to
e942382
Compare
913d18b to
523affa
Compare
|
Great work! |
|
Successfully created backport PR for |
|
Thanks everyone for making this happen! I'm thrilled. Documentation was missing here, and I suggest adding it in: Also, please see issue: |
Only possible since NixOS#271387.
Only possible since NixOS#271387.
Description of changes
This PR enables the fixed-point arguments support in
buildPythonPackageandbuildPythonApplicationfor Python 2 and 3 with slight modification againstmk-python-derivation.nixwith no rebuilds.Prerequisites:
overridePythonAttrsdeprecation #375921<pkg>.overrideAttrs#267296stdenvcustomization through(buildPython*.override { inherit stdenv; })#271762I will rebase this feature branch once the dependent PRs merge. The diff will be greatly shortened then.
Update: Rebased. This PR is now ready for review.
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Priorities
Add a 👍 reaction to pull requests you find important.