From 30296bc49e14169df7a4cb8097a2ac04aeb85ef3 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Wed, 17 Oct 2018 14:55:35 -0400 Subject: [PATCH] pythonPackages.plyvel: refactor move to python-modules --- .../python-modules/plyvel/default.nix | 29 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 21 +------------- 2 files changed, 30 insertions(+), 20 deletions(-) create mode 100644 pkgs/development/python-modules/plyvel/default.nix diff --git a/pkgs/development/python-modules/plyvel/default.nix b/pkgs/development/python-modules/plyvel/default.nix new file mode 100644 index 000000000000..21561fab0351 --- /dev/null +++ b/pkgs/development/python-modules/plyvel/default.nix @@ -0,0 +1,29 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, pkgs +, pytest +, isPy3k +}: + +buildPythonPackage rec { + pname = "plyvel"; + version = "0.9"; + + src = fetchPypi { + inherit pname version; + sha256 = "1scq75qyks9vmjd19bx57f2y60mkdr44ajvb12p3cjg439l96zaq"; + }; + + buildInputs = [ pkgs.leveldb ] ++ stdenv.lib.optional isPy3k pytest; + + # no tests for python2 + doCheck = isPy3k; + + meta = with stdenv.lib; { + description = "Fast and feature-rich Python interface to LevelDB"; + homepage = https://github.com/wbolster/plyvel; + license = licenses.bsd3; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ee2f00439784..dc6d8732f108 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3006,26 +3006,7 @@ in { ply = callPackage ../development/python-modules/ply { }; - plyvel = buildPythonPackage (rec { - name = "plyvel-0.9"; - - src = pkgs.fetchurl { - url = "mirror://pypi/p/plyvel/${name}.tar.gz"; - sha256 = "1scq75qyks9vmjd19bx57f2y60mkdr44ajvb12p3cjg439l96zaq"; - }; - - buildInputs = with self; [ pkgs.leveldb ] - ++ optional isPy3k pytest; - - # no tests for python2 - doCheck = isPy3k; - - meta = { - description = "Fast and feature-rich Python interface to LevelDB"; - homepage = https://github.com/wbolster/plyvel; - license = licenses.bsd3; - }; - }); + plyvel = callPackage ../development/python-modules/plyvel { }; osc = buildPythonPackage { name = "osc-0.162.0-55-gb730f88";