From 2b56afea4d295a4d055ed4d5418790da5885376f Mon Sep 17 00:00:00 2001 From: Rahul Gopinath Date: Tue, 2 May 2017 21:14:50 -0700 Subject: [PATCH] dbfread: refactor --- .../python-modules/dbfread/default.nix | 19 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 16 +--------------- 2 files changed, 20 insertions(+), 15 deletions(-) create mode 100644 pkgs/development/python-modules/dbfread/default.nix diff --git a/pkgs/development/python-modules/dbfread/default.nix b/pkgs/development/python-modules/dbfread/default.nix new file mode 100644 index 000000000000..6bbc4775605b --- /dev/null +++ b/pkgs/development/python-modules/dbfread/default.nix @@ -0,0 +1,19 @@ +{ stdenv, fetchPypi, buildPythonPackage }: + +buildPythonPackage rec { + name = "${pname}-${version}"; + pname = "dbfread"; + version = "2.0.5"; + + src = fetchPypi { + inherit pname version; + sha256 = "0r5axq9ax0czyapm7b69krcv22r1nyb4vci7c5x8mx8pq1axim93"; + }; + + meta = with stdenv.lib; { + description = "Read DBF Files with Python"; + homepage = http://dbfread.readthedocs.org/; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ vrthra ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5d05ea6ef445..03958bc9d7f2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -159,21 +159,7 @@ in { dbf = callPackage ../development/python-modules/dbf { }; - dbfread = buildPythonPackage rec { - name = "dbfread-2.0.5"; - - meta = { - description = "Read DBF Files with Python"; - homepage = "http://dbfread.readthedocs.org/"; - license = licenses.mit; - maintainers = with maintainers; [ vrthra ]; - }; - - src = pkgs.fetchurl { - url = "mirror://pypi/d/dbfread/${name}.tar.gz"; - sha256 = "0r5axq9ax0czyapm7b69krcv22r1nyb4vci7c5x8mx8pq1axim93"; - }; - }; + dbfread = callPackage ../development/python-modules/dbfread { }; dkimpy = callPackage ../development/python-modules/dkimpy { };