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: add pyhepmc, graphviz; bump rootpy #23094

Merged
merged 5 commits into from Mar 3, 2017

Conversation

veprbl
Copy link
Member

@veprbl veprbl commented Feb 22, 2017

Motivation for this change
Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@veprbl, thanks for your PR! By analyzing the history of the files in this pull request, we identified @FRidh to be a potential reviewer.

disable = isPy3k;

src = pkgs.fetchurl {
url = "https://pypi.python.org/packages/01/98/8dec899491e4ac01a6fc8269e3b6dffd35421321b6858e21672489678fa8/graphviz-0.5.2.zip";
Copy link
Member

Choose a reason for hiding this comment

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

You could replace this with:

url = "mirror://pypi/g/graphviz/${name}.zip";

This makes updating the derivation easier singe changing the version attribute is enough to update the url as well.

graphviz = buildPythonPackage rec {
name = "graphviz-${version}";
version = "0.5.2";
disable = isPy3k;
Copy link
Member

Choose a reason for hiding this comment

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

According to the project page: “This package runs under Python 2.6, 2.7, and 3.3+”.

The setup.py has:

        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',

as classifiers.

Any reason to disable this derivation for python3?

name = "rootpy-${version}";

src = pkgs.fetchurl {
url = "https://pypi.python.org/packages/d5/40/feddb2c9d1cadfe05d1d9aea1a71be093dc700879c9f6af40a10b1330f34/rootpy-0.8.3.tar.gz";
sha256 = "14q9bhs2a53598571x8yikj68x2iyl6090wbvdrpbwr238799b0z";
url = "https://pypi.python.org/packages/c0/a4/2672dad1920c23375fd8155c8fd7940b7e36fdd3cd018a886420dc6c76d0/rootpy-0.9.0.tar.gz";
Copy link
Member

Choose a reason for hiding this comment

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

Here you could also use mirror://pypi/r/rootpy/${name}.tar.gz as a simplification.

@veprbl veprbl force-pushed the for_upstream branch 2 times, most recently from f05b6ec to 2b33ecc Compare February 28, 2017 00:24
@lsix
Copy link
Member

lsix commented Feb 28, 2017

Hi @veprbl,

Here is the error from travis-ci (which is the same I got locally if A try to build this PR):

trying https://bitbucket.org/lukas_heinrich/pyhepmc/commits/325f89b7b72922e9add9ca9dd0f7ca4a6c83bf00/raw

output path ‘/nix/store/gfp9la8vwsbihdc5csdkm9hpxdv1hq3y-raw’ has sha256 hash ‘0rcx9hksd9aav0mycpycbwcgc7sy1hrkjyknn1y8ljspy31fg7id’ when ‘01msflk0zs7yvijqip1swykfw35g7f30628bsh9hhnk1bfyanf8b’ was expected

cannot build derivation ‘/nix/store/9q3c25hshkpia6cxjw6izw2i8l6assyq-python2.7-pyhepmc-0.5.0.drv’: 1 dependencies couldn't be built

Apparently, the hash of the patch you fetch for pyhepmc do not match.

This is quite strange because I can run:

$ nix-prefetch-url https://bitbucket.org/lukas_heinrich/pyhepmc/commits/325f89b7b72922e9add9ca9dd0f7ca4a6c83bf00/raw
downloading ‘https://bitbucket.org/lukas_heinrich/pyhepmc/commits/325f89b7b72922e9add9ca9dd0f7ca4a6c83bf00/raw’... [0/0 KiB, 0.0 KiB/s]
path is ‘/nix/store/gfp9la8vwsbihdc5csdkm9hpxdv1hq3y-raw’
01msflk0zs7yvijqip1swykfw35g7f30628bsh9hhnk1bfyanf8b

Did you have any trouble when building your derivation?

@veprbl
Copy link
Member Author

veprbl commented Feb 28, 2017

I can reproduce exactly your result. I'm not sure what is going on, probably bitbucket gets triggered by some different http headers that fetchpatch could send. I will just put the patch itself to the repo. Hope that's alright.

edit: fetchpatch does postprocessing which nix-prefetch-url doesn't do - that's why hashes differ

@lsix lsix merged commit a25c939 into NixOS:master Mar 3, 2017
@lsix
Copy link
Member

lsix commented Mar 3, 2017

Builds fine, merged.

Thanks.

@veprbl
Copy link
Member Author

veprbl commented Mar 3, 2017

Thank you for review!

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

4 participants