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

snakemake: init at 5.2.2 #45730

Merged
merged 2 commits into from Sep 2, 2018
Merged

snakemake: init at 5.2.2 #45730

merged 2 commits into from Sep 2, 2018

Conversation

Helkafen
Copy link
Contributor

Motivation for this change

Snakemake is a workflow management system. Useful in bio-informatics and HPC, where reproducibility is appreciated.
Also add dependency: ratelimiter (init at 1.2.0.post0)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions (Ubuntu 18.04)
  • 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 nox --run "nox-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)
  • Fits CONTRIBUTING.md.

Copy link
Contributor

@jtojnar jtojnar left a comment

Choose a reason for hiding this comment

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

Please move the packages to pkgs/development/python-modules/<name>/default.nix, as per the comment on top of pkgs/top-level/python-packages.nix. It would be also nice if you could have one commit per package, and use python.pkgs.<name> in the commit message, instead of just <name>.

@Helkafen
Copy link
Contributor Author

Hi Jan. Thanks for the review! The packages are moved to separate default.nix files and I updated the commit messages.

@ryantm
Copy link
Member

ryantm commented Aug 31, 2018

Related: #45828

'';

meta = with stdenv.lib; {
homepage = "https://github.com/RazerM/ratelimiter";
Copy link
Contributor

Choose a reason for hiding this comment

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

Plain URLs do not need to be quoted.

sed -i -e 's/\x9d//g' README.rst
'';

doCheck = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

No need for explicit doCheck – python pakages are checked automatically.

}:

buildPythonPackage rec {
name = "${pname}-${version}";
Copy link
Contributor

Choose a reason for hiding this comment

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

name is not necessary in python packages.

pname = "ratelimiter";
version = "1.2.0.post0";

propagatedBuildInputs = [];
Copy link
Contributor

Choose a reason for hiding this comment

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

Why keep this?


doCheck = true;

buildInputs = [ pytest ];
Copy link
Contributor

Choose a reason for hiding this comment

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

You can use checkInputs.


meta = with stdenv.lib; {
homepage = "http://snakemake.bitbucket.io";
license = "MIT";
Copy link
Contributor

Choose a reason for hiding this comment

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

Use licenses.mit.

meta = with stdenv.lib; {
homepage = "http://snakemake.bitbucket.io";
license = "MIT";
description = "A workflow management system that aims to reduce the complexity of creating workflows by providing a fast and comfortable execution environment, together with a clean and modern specification language in python style. Snakemake workflows are essentially Python scripts extended by declarative code to define rules. Rules describe how to create output files from input files";
Copy link
Contributor

Choose a reason for hiding this comment

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

This is too long for description, move it to longDescription and use something shorter for description. You can get inspiration on Repology.

sha256 = "5c395dcabdbbde2e5178ef3f89b568a3066454a6ddc223b76473dac22f89b4f7";
};

prePatch = ''
Copy link
Contributor

Choose a reason for hiding this comment

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

Unfortunately, Python < 3.7 requires glibcLocales in nativeBuildInputs and something like LC_ALL = "en_US.UTF-8"; in the expression. But it is still better than seding.

@Helkafen
Copy link
Contributor Author

All your suggestions have been applied. The locales thing makes more sense indeed!

@Helkafen
Copy link
Contributor Author

Added "disabledIf (!isPy3k)" because Snakemake is no longer supported on Python 2.

@renatoGarcia renatoGarcia mentioned this pull request Aug 31, 2018
9 tasks
@renatoGarcia
Copy link
Member

The Snakemake is more a standalone application that a Python library. IMO it should be better placed at pkgs/applications/science/misc/snakemake/ for example that at pkgs/development/python-modules/snakemake/.

@Helkafen
Copy link
Contributor Author

Helkafen commented Sep 1, 2018

Moved to pkgs/applications/science/misc/snakemake, and added the long description by Renato.

@ryantm
Copy link
Member

ryantm commented Sep 2, 2018

@GrahamcOfBorg build snakemake

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: snakemake

Partial log (click to expand)

/build/snakemake-5.2.2
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/0h631fx7pqfkx3grv5g6d5m0b0jrxzlz-python3.6-snakemake-5.2.2
strip is /nix/store/y4ymnvgxygpq05h03kyzbj572zmh6zla-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/0h631fx7pqfkx3grv5g6d5m0b0jrxzlz-python3.6-snakemake-5.2.2/lib  /nix/store/0h631fx7pqfkx3grv5g6d5m0b0jrxzlz-python3.6-snakemake-5.2.2/bin
patching script interpreter paths in /nix/store/0h631fx7pqfkx3grv5g6d5m0b0jrxzlz-python3.6-snakemake-5.2.2
checking for references to /build in /nix/store/0h631fx7pqfkx3grv5g6d5m0b0jrxzlz-python3.6-snakemake-5.2.2...
wrapping `/nix/store/0h631fx7pqfkx3grv5g6d5m0b0jrxzlz-python3.6-snakemake-5.2.2/bin/snakemake-bash-completion'...
wrapping `/nix/store/0h631fx7pqfkx3grv5g6d5m0b0jrxzlz-python3.6-snakemake-5.2.2/bin/snakemake'...
/nix/store/0h631fx7pqfkx3grv5g6d5m0b0jrxzlz-python3.6-snakemake-5.2.2

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: snakemake

Partial log (click to expand)

/build/snakemake-5.2.2
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/8y6ivbcxq5bs92i4nbsgc2ddcnbpnb6a-python3.6-snakemake-5.2.2
strip is /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/8y6ivbcxq5bs92i4nbsgc2ddcnbpnb6a-python3.6-snakemake-5.2.2/lib  /nix/store/8y6ivbcxq5bs92i4nbsgc2ddcnbpnb6a-python3.6-snakemake-5.2.2/bin
patching script interpreter paths in /nix/store/8y6ivbcxq5bs92i4nbsgc2ddcnbpnb6a-python3.6-snakemake-5.2.2
checking for references to /build in /nix/store/8y6ivbcxq5bs92i4nbsgc2ddcnbpnb6a-python3.6-snakemake-5.2.2...
wrapping `/nix/store/8y6ivbcxq5bs92i4nbsgc2ddcnbpnb6a-python3.6-snakemake-5.2.2/bin/snakemake'...
wrapping `/nix/store/8y6ivbcxq5bs92i4nbsgc2ddcnbpnb6a-python3.6-snakemake-5.2.2/bin/snakemake-bash-completion'...
/nix/store/8y6ivbcxq5bs92i4nbsgc2ddcnbpnb6a-python3.6-snakemake-5.2.2

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: snakemake

Partial log (click to expand)

  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed snakemake-5.2.2
/private/tmp/nix-build-python3.6-snakemake-5.2.2.drv-0/snakemake-5.2.2
post-installation fixup
strip is /nix/store/df6k4mgdjxciy0f637lryp7c9ln7n1m3-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/srg5zq3qlcvyf3viz6bjp4fwl6a1yvbk-python3.6-snakemake-5.2.2/lib  /nix/store/srg5zq3qlcvyf3viz6bjp4fwl6a1yvbk-python3.6-snakemake-5.2.2/bin
patching script interpreter paths in /nix/store/srg5zq3qlcvyf3viz6bjp4fwl6a1yvbk-python3.6-snakemake-5.2.2
wrapping `/nix/store/srg5zq3qlcvyf3viz6bjp4fwl6a1yvbk-python3.6-snakemake-5.2.2/bin/snakemake'...
wrapping `/nix/store/srg5zq3qlcvyf3viz6bjp4fwl6a1yvbk-python3.6-snakemake-5.2.2/bin/snakemake-bash-completion'...
/nix/store/srg5zq3qlcvyf3viz6bjp4fwl6a1yvbk-python3.6-snakemake-5.2.2

@ryantm ryantm merged commit 7b54a50 into NixOS:master Sep 2, 2018
@ryantm
Copy link
Member

ryantm commented Sep 2, 2018

Looks good to me; merged. I hope @renatoGarcia submits a PR to add himself as a maintainer too.

@renatoGarcia
Copy link
Member

Thanks both of you, @ryantm and @Helkafen, for the consideration.
Helkafen, you didn't add a maintainers field on snakemake expression. Would you mind if I submit a PR with both our names like at here?

@Helkafen
Copy link
Contributor Author

Helkafen commented Sep 5, 2018

@renatoGarcia Sure!

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

6 participants