From 8b905d1cb0751b67a3565c0d8f6e2ae2ba58462d Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sun, 31 Dec 2017 12:13:18 +0100 Subject: [PATCH] python.pkgs.biopython: move expression --- .../python-modules/biopython/default.nix | 32 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 28 +--------------- 2 files changed, 33 insertions(+), 27 deletions(-) create mode 100644 pkgs/development/python-modules/biopython/default.nix diff --git a/pkgs/development/python-modules/biopython/default.nix b/pkgs/development/python-modules/biopython/default.nix new file mode 100644 index 00000000000..caa6d9a6da7 --- /dev/null +++ b/pkgs/development/python-modules/biopython/default.nix @@ -0,0 +1,32 @@ +{ lib +, buildPythonPackage +, fetchPypi +, numpy +}: + +buildPythonPackage rec { + pname = "biopython"; + version = "1.68"; + + src = fetchPypi { + inherit pname version; + sha256 = "07qc7nz0k77y8hf8s18rscvibvm91zw0kkq7ylrhisf8vp8hkp6i"; + }; + + propagatedBuildInputs = [ numpy ]; + # Checks try to write to $HOME, which does not work with nix + doCheck = false; + meta = { + description = "Python library for bioinformatics"; + longDescription = '' + Biopython is a set of freely available tools for biological computation + written in Python by an international team of developers. It is a + distributed collaborative effort to develop Python libraries and + applications which address the needs of current and future work in + bioinformatics. + ''; + homepage = http://biopython.org/wiki/Documentation; + maintainers = with lib.maintainers; [ luispedro ]; + license = lib.licenses.bsd3; + }; +} \ No newline at end of file diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 925f971d2fa..26fe809436c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1239,33 +1239,7 @@ in { }; }; - biopython = buildPythonPackage rec { - name = "biopython-${version}"; - version = "1.68"; - - src = pkgs.fetchurl { - url = "mirror://pypi/b/biopython/${name}.tar.gz"; - sha256 = "07qc7nz0k77y8hf8s18rscvibvm91zw0kkq7ylrhisf8vp8hkp6i"; - }; - - propagatedBuildInputs = with self; [ numpy ]; - # Checks try to write to $HOME, which does not work with nix - doCheck = false; - meta = { - description = "Python library for bioinformatics"; - - longDescription = '' - Biopython is a set of freely available tools for biological computation - written in Python by an international team of developers. It is a - distributed collaborative effort to develop Python libraries and - applications which address the needs of current and future work in - bioinformatics. - ''; - - homepage = http://biopython.org/wiki/Documentation; - maintainers = with maintainers; [ luispedro ]; - }; - }; + biopython = callPackage ../development/python-modules/biopython { }; bedup = buildPythonPackage rec { version = "0.10.1";