Skip to content
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

pipenv: refactor runtimeDeps #89293

Open
wants to merge 1 commit into
base: master
from

Conversation

@das-g
Copy link
Member

das-g commented Jun 1, 2020

Make runtimeDeps a function, so that it will return a selection of the packages in the set passed to it by python3.withPackages, rather than the same packages taken directly from python3.pkgs.

Motivation for this change

Follow up to #89164 (comment)

As mentioned in #89164 (comment), I'm unsure whether ignoring the packages python3.withPackages passes to its argument and instead using packages taken directly from python3.pkgs is good style:

with python3.pkgs;
let
runtimeDeps = [
certifi
setuptools
pip
virtualenv
virtualenv-clone
];
pythonEnv = python3.withPackages(ps: with ps; runtimeDeps);

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
    except for:
    • .pipenv-resolver-wrapped
    • .pipenv-wrapped
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Result of nixpkgs-review 1
(empty)

Make `runtimeDeps` a function, so that it will return a selection
of the packages in the set passed to it by `python3.withPackages`,
rather than the same packages taken directly from `python3.pkgs`.
@das-g das-g mentioned this pull request Jun 1, 2020
2 of 10 tasks complete
@das-g das-g requested a review from FRidh Jun 1, 2020
@drewrisinger
Copy link
Contributor

drewrisinger commented Jun 1, 2020

Would you like to add yourself as a maintainer?
cc @berdario maintainer @kalekseev from original PR.

Copy link
Contributor

drewrisinger left a comment

Diff LGTM.
Looks like OfBorg build works, not tested locally.

@das-g
Copy link
Member Author

das-g commented Jun 1, 2020

Would you like to add yourself as a maintainer?

As I use pipenv less and less (I think I prefer poetry and other alternatives) I'm not too eager, but if it helps NixPkgs, I'm also not against it either.

@kalekseev
Copy link
Contributor

kalekseev commented Jun 1, 2020

Would you like to add yourself as a maintainer?
cc @berdario maintainer @kalekseev from original PR.

Hi @drewrisinger, thanks for the proposal but I've just started using nix and I'm not sure if I will stick with it or not so it's too early for me to become a maintainer of the package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.