From 6df9c74238edc0d1a95569b1b6b9cc4c0a757e1b Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 31 Oct 2017 17:28:59 +0100 Subject: [PATCH] pythonPackages: Move my libraries to python-modules --- .../python-modules/keyutils/default.nix | 24 ++++++++ .../python-modules/raven/default.nix | 23 +++++++ .../python-modules/zipstream/default.nix | 22 +++++++ pkgs/top-level/python-packages.nix | 61 +------------------ 4 files changed, 72 insertions(+), 58 deletions(-) create mode 100644 pkgs/development/python-modules/keyutils/default.nix create mode 100644 pkgs/development/python-modules/raven/default.nix create mode 100644 pkgs/development/python-modules/zipstream/default.nix diff --git a/pkgs/development/python-modules/keyutils/default.nix b/pkgs/development/python-modules/keyutils/default.nix new file mode 100644 index 000000000000..2746f1616682 --- /dev/null +++ b/pkgs/development/python-modules/keyutils/default.nix @@ -0,0 +1,24 @@ +{ lib, buildPythonPackage, fetchurl, pkgs, pytestrunner }: + +let + pname = "keyutils"; + version = "0.5"; +in buildPythonPackage rec { + name = "${pname}-${version}"; + + src = fetchurl { + url = "mirror://pypi/k/${pname}/${name}.tar.gz"; + sha256 = "0dskys71vkn59vlsfs1ljli0qnzk7b10iv4pawxawnk2hvyjrf10"; + }; + + buildInputs = [ pkgs.keyutils pytestrunner ]; + + doCheck = false; + + meta = { + description = "A set of python bindings for keyutils"; + homepage = https://github.com/sassoftware/python-keyutils; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ primeos ]; + }; +} diff --git a/pkgs/development/python-modules/raven/default.nix b/pkgs/development/python-modules/raven/default.nix new file mode 100644 index 000000000000..00bc54d844b1 --- /dev/null +++ b/pkgs/development/python-modules/raven/default.nix @@ -0,0 +1,23 @@ +{ lib, buildPythonPackage, fetchurl, isPy3k, contextlib2 }: + +buildPythonPackage rec { + name = "raven-6.3.0"; + + src = fetchurl { + url = "mirror://pypi/r/raven/${name}.tar.gz"; + sha256 = "1wgddbd092vih6k6mknp68vvm1pp12fikjqzglw6mnyw8njnbr7k"; + }; + + # way too many dependencies to run tests + # see https://github.com/getsentry/raven-python/blob/master/setup.py + doCheck = false; + + propagatedBuildInputs = lib.optionals (!isPy3k) [ contextlib2 ]; + + meta = { + description = "A Python client for Sentry (getsentry.com)"; + homepage = https://github.com/getsentry/raven-python; + license = [ lib.licenses.bsd3 ]; + maintainers = with lib.maintainers; [ primeos ]; + }; +} diff --git a/pkgs/development/python-modules/zipstream/default.nix b/pkgs/development/python-modules/zipstream/default.nix new file mode 100644 index 000000000000..aac2bceeb15d --- /dev/null +++ b/pkgs/development/python-modules/zipstream/default.nix @@ -0,0 +1,22 @@ +{ lib, buildPythonPackage, fetchurl, nose }: + +let + pname = "zipstream"; + version = "1.1.4"; +in buildPythonPackage rec { + name = "${pname}-${version}"; + + src = fetchurl { + url = "mirror://pypi/z/${pname}/${name}.tar.gz"; + sha256 = "01im5anqdyggmwkigqcjg0qw2a5bnn84h33mfaqjjd69a28lpwif"; + }; + + buildInputs = [ nose ]; + + meta = { + description = "A zip archive generator"; + homepage = https://github.com/allanlei/python-zipstream; + license = lib.licenses.gpl3Plus; + maintainers = with lib.maintainers; [ primeos ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 10cd211b5e18..de843c3dc508 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7367,24 +7367,7 @@ in { }; }; - raven = buildPythonPackage rec { - name = "raven-6.3.0"; - - src = pkgs.fetchurl { - url = "mirror://pypi/r/raven/${name}.tar.gz"; - sha256 = "1wgddbd092vih6k6mknp68vvm1pp12fikjqzglw6mnyw8njnbr7k"; - }; - - # way too many dependencies to run tests - # see https://github.com/getsentry/raven-python/blob/master/setup.py - doCheck = false; - - propagatedBuildInputs = optionals (!isPy3k) [ self.contextlib2 ]; - - meta = { - maintainers = with maintainers; [ primeos ]; - }; - }; + raven = callPackage ../development/python-modules/raven { }; rethinkdb = buildPythonPackage rec { name = "rethinkdb-${version}"; @@ -10574,27 +10557,7 @@ in { keyring = callPackage ../development/python-modules/keyring { }; - keyutils = buildPythonPackage rec { - name = "${pname}-${version}"; - pname = "keyutils"; - version = "0.5"; - - src = pkgs.fetchurl { - url = "mirror://pypi/k/${pname}/${name}.tar.gz"; - sha256 = "0dskys71vkn59vlsfs1ljli0qnzk7b10iv4pawxawnk2hvyjrf10"; - }; - - buildInputs = with self; [ pkgs.keyutils pytestrunner ]; - - doCheck = false; - - meta = { - description = "A set of python bindings for keyutils"; - homepage = https://github.com/sassoftware/python-keyutils; - license = licenses.asl20; - maintainers = with maintainers; [ primeos ]; - }; - }; + keyutils = callPackage ../development/python-modules/keyutils { }; klaus = buildPythonPackage rec { version = "0.9.1"; @@ -21860,25 +21823,7 @@ EOF }; }); - zipstream = buildPythonPackage rec { - name = "${pname}-${version}"; - pname = "zipstream"; - version = "1.1.4"; - - src = pkgs.fetchurl { - url = "mirror://pypi/z/${pname}/${name}.tar.gz"; - sha256 = "01im5anqdyggmwkigqcjg0qw2a5bnn84h33mfaqjjd69a28lpwif"; - }; - - buildInputs = with self; [ nose ]; - - meta = { - description = "A zip archive generator"; - homepage = "https://github.com/allanlei/python-zipstream"; - license = licenses.gpl3Plus; - maintainers = with maintainers; [ primeos ]; - }; - }; + zipstream = callPackage ../development/python-modules/zipstream { }; zodb = callPackage ../development/python-modules/zodb {};