From 63193b19b364ba33b7c63959ce4729c3517bb2f9 Mon Sep 17 00:00:00 2001 From: Robert Schütz Date: Thu, 5 Apr 2018 22:32:01 +0200 Subject: beancount: move to pythonPackages --- pkgs/applications/office/beancount/default.nix | 44 -------------------- .../python-modules/beancount/default.nix | 48 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 +- pkgs/top-level/python-packages.nix | 2 + 4 files changed, 51 insertions(+), 47 deletions(-) delete mode 100644 pkgs/applications/office/beancount/default.nix create mode 100644 pkgs/development/python-modules/beancount/default.nix diff --git a/pkgs/applications/office/beancount/default.nix b/pkgs/applications/office/beancount/default.nix deleted file mode 100644 index d500be8a1f22..000000000000 --- a/pkgs/applications/office/beancount/default.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ stdenv, fetchhg, pkgs, pythonPackages }: - -pythonPackages.buildPythonApplication rec { - version = "2.0.0"; - name = "beancount-${version}"; - namePrefix = ""; - - src = pkgs.fetchurl { - url = "mirror://pypi/b/beancount/${name}.tar.gz"; - sha256 = "0wxwf02d3raglwqsxdsgf89fniakv1m19q825w76k5z004g18y42"; - }; - - buildInputs = with pythonPackages; [ nose ]; - - # Automatic tests cannot be run because it needs to import some local modules for tests. - doCheck = false; - checkPhase = '' - nosetests - ''; - - propagatedBuildInputs = with pythonPackages; [ - beautifulsoup4 - bottle - chardet - dateutil - google_api_python_client - lxml - ply - python_magic - ]; - - meta = { - homepage = http://furius.ca/beancount/; - description = "Double-entry bookkeeping computer language"; - longDescription = '' - A double-entry bookkeeping computer language that lets you define - financial transaction records in a text file, read them in memory, - generate a variety of reports from them, and provides a web interface. - ''; - license = stdenv.lib.licenses.gpl2; - maintainers = with stdenv.lib.maintainers; [ ]; - }; -} - diff --git a/pkgs/development/python-modules/beancount/default.nix b/pkgs/development/python-modules/beancount/default.nix new file mode 100644 index 000000000000..2991ae9be82f --- /dev/null +++ b/pkgs/development/python-modules/beancount/default.nix @@ -0,0 +1,48 @@ +{ stdenv, buildPythonPackage, fetchPypi, isPy3k +, beautifulsoup4, bottle, chardet, dateutil +, google_api_python_client, lxml, ply, python_magic +, nose }: + +buildPythonPackage rec { + version = "2.0.0"; + pname = "beancount"; + + disabled = !isPy3k; + + src = fetchPypi { + inherit pname version; + sha256 = "0wxwf02d3raglwqsxdsgf89fniakv1m19q825w76k5z004g18y42"; + }; + + checkInputs = [ nose ]; + + # Automatic tests cannot be run because it needs to import some local modules for tests. + doCheck = false; + checkPhase = '' + nosetests + ''; + + propagatedBuildInputs = [ + beautifulsoup4 + bottle + chardet + dateutil + google_api_python_client + lxml + ply + python_magic + ]; + + meta = { + homepage = http://furius.ca/beancount/; + description = "Double-entry bookkeeping computer language"; + longDescription = '' + A double-entry bookkeeping computer language that lets you define + financial transaction records in a text file, read them in memory, + generate a variety of reports from them, and provides a web interface. + ''; + license = stdenv.lib.licenses.gpl2; + maintainers = with stdenv.lib.maintainers; [ ]; + }; +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6e98111c43da..71f2a508840c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18775,9 +18775,7 @@ with pkgs; bastet = callPackage ../games/bastet {}; - beancount = callPackage ../applications/office/beancount { - pythonPackages = python3Packages; - }; + beancount = with python3.pkgs; toPythonApplication beancount; bean-add = callPackage ../applications/office/beancount/bean-add.nix { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8d8374149a65..5a5ce5a50639 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -931,6 +931,8 @@ in { bcdoc = callPackage ../development/python-modules/bcdoc {}; + beancount = callPackage ../development/python-modules/beancount { }; + beautifulsoup4 = callPackage ../development/python-modules/beautifulsoup4 { }; beaker = buildPythonPackage rec { -- cgit 1.4.1