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

pythonPackages.gdown: init at 3.11.1 #91462

Merged
merged 2 commits into from Jun 26, 2020
Merged

pythonPackages.gdown: init at 3.11.1 #91462

merged 2 commits into from Jun 26, 2020

Conversation

breakds
Copy link
Contributor

@breakds breakds commented Jun 25, 2020

Motivation for this change

Add gdown which provides both a CLI tool as well as a python package for downloading artifacts from Google Drive.

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/)
  • 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.

maintainers/maintainer-list.nix Show resolved Hide resolved
Comment on lines 21 to 23
doCheck = false;

doInstallCheck = true;
installCheckPhase = ''
$out/bin/gdown --help > /dev/null
'';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

buildPythonApplication's checkPhase maps to installCheckPhase on derviation, and checkPhase = true; is default for python packages

Suggested change
doCheck = false;
doInstallCheck = true;
installCheckPhase = ''
$out/bin/gdown --help > /dev/null
'';
checkPhase = ''
$out/bin/gdown --help > /dev/null
'';

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I made the changes and updated. I kept the doCheck = false; there to skip running this module's test.

@jonringer jonringer changed the title Gdown pythonPackages.gdown: init at 3.11.1 Jun 25, 2020
@breakds
Copy link
Contributor Author

breakds commented Jun 26, 2020

I tried to force push to the branch to update the PR. Found that there is an extra commit on wesnoth gets slipped in. Being not familiar enough with the pull request mechanism, how I can get rid of it?

Thanks!

@jonringer
Copy link
Contributor

jonringer commented Jun 26, 2020

Being not familiar enough with the pull request mechanism, how I can get rid of it?

git rebase -i HEAD~3

# change pick -> drop on commits you want to drop
# save
git push .. .. --force

@breakds
Copy link
Contributor Author

breakds commented Jun 26, 2020

Huh didn't figure it was that easy. Okay I updated the diff the dropped the unnecessary commit. Thanks @jonringer!

@jonringer
Copy link
Contributor

According to the readme, this is meant to also be used as an application. Do you mind adding the following to pkgs/top-level/all-packages.nix:

  gdown = with python3Packages; toPythonApplication gdown;

More information on this can be found here

@breakds
Copy link
Contributor Author

breakds commented Jun 26, 2020

According to the readme, this is meant to also be used as an application. Do you mind adding the following to pkgs/top-level/all-packages.nix:

  gdown = with python3Packages; toPythonApplication gdown;

More information on this can be found here

Thanks for the reference. Added it and tested it with nix-build -A gdown on my machine.

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

diff LGTM
commits LGTM
has tests 👍

https://github.com/NixOS/nixpkgs/pull/91462
3 packages built:
gdown python27Packages.gdown python37Packages.gdown

@jonringer jonringer merged commit 929d7dd into NixOS:master Jun 26, 2020
@breakds
Copy link
Contributor Author

breakds commented Jun 26, 2020

Thanks a lot @jonringer !

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

Successfully merging this pull request may close these issues.

None yet

2 participants