summary refs log tree commit diff
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
authorMatthieu Coudron <coudron@iij.ad.jp>2019-04-11 19:55:08 +0900
committerFrederik Rietdijk <freddyrietdijk@fridh.nl>2019-04-11 12:55:08 +0200
commita4c15f1b35016e2ee74f2477ccca350bc7407475 (patch)
tree13a1f84f59b5871fe27476cccf066b5847024e49 /pkgs/development/python-modules
parent5d8144579701803bb107af824c37cc7807ec13c6 (diff)
downloadnixpkgs-a4c15f1b35016e2ee74f2477ccca350bc7407475.tar
nixpkgs-a4c15f1b35016e2ee74f2477ccca350bc7407475.tar.gz
nixpkgs-a4c15f1b35016e2ee74f2477ccca350bc7407475.tar.bz2
nixpkgs-a4c15f1b35016e2ee74f2477ccca350bc7407475.tar.lz
nixpkgs-a4c15f1b35016e2ee74f2477ccca350bc7407475.tar.xz
nixpkgs-a4c15f1b35016e2ee74f2477ccca350bc7407475.tar.zst
nixpkgs-a4c15f1b35016e2ee74f2477ccca350bc7407475.zip
python3Packages.papis: provide as a library too (#59070)
* python3Packages.papis: provides as a library too

The project is turning into a dependency for several scripts and possibly UIs
(see the different repositories at https://github.com/papis/) so it makes sense
to have it as a library.

* moved papis to python-modules

* add myself as maintainer
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r--pkgs/development/python-modules/papis/default.nix49
1 files changed, 49 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/papis/default.nix b/pkgs/development/python-modules/papis/default.nix
new file mode 100644
index 00000000000..d9be946900c
--- /dev/null
+++ b/pkgs/development/python-modules/papis/default.nix
@@ -0,0 +1,49 @@
+{ lib, buildPythonPackage, fetchFromGitHub, fetchpatch, xdg_utils
+, requests, filetype, pyparsing, configparser, arxiv2bib
+, pyyaml, chardet, beautifulsoup4, colorama, bibtexparser
+, pylibgen, click, python-slugify, habanero, isbnlib
+, prompt_toolkit, pygments
+#, optional, dependencies
+, jinja2, whoosh, pytest
+}:
+
+buildPythonPackage rec {
+  pname = "papis";
+  version = "0.8.2";
+
+  # Missing tests on Pypi
+  src = fetchFromGitHub {
+    owner = "papis";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0sa4hpgjvqkjcmp9bjr27b5m5jg4pfspdc8nf1ny80sr0kzn72hb";
+  };
+
+  propagatedBuildInputs = [
+    requests filetype pyparsing configparser arxiv2bib
+    pyyaml chardet beautifulsoup4 colorama bibtexparser
+    pylibgen click python-slugify habanero isbnlib
+    prompt_toolkit pygments
+    # optional dependencies
+    jinja2 whoosh
+  ];
+
+  checkInputs = ([
+    pytest
+  ]) ++ [
+    xdg_utils
+  ];
+
+  # most of the downloader tests and 4 other tests require a network connection
+  checkPhase = ''
+    HOME=$(mktemp -d) pytest papis tests --ignore tests/downloaders \
+      -k "not test_get_data and not test_doi_to_data and not test_general and not get_document_url"
+  '';
+
+  meta = {
+    description = "Powerful command-line document and bibliography manager";
+    homepage = http://papis.readthedocs.io/en/latest/;
+    license = lib.licenses.gpl3;
+    maintainers = with lib.maintainers; [ nico202 teto ];
+  };
+}