about summary refs log tree commit diff
path: root/pkgs/tools/misc/pubs
diff options
context:
space:
mode:
authorGabriel Ebner <gebner@gebner.org>2018-01-08 14:09:53 +0100
committerGabriel Ebner <gebner@gebner.org>2018-01-08 14:09:53 +0100
commit563f6880593a138e87d2b1030f2f821bd36bed63 (patch)
tree898635abd42a27cc58d1570150c5427047b6aa88 /pkgs/tools/misc/pubs
parent738e97fcca310a12f5f3975bf41952b325a60f80 (diff)
pubs: init at 0.7.0
Diffstat (limited to 'pkgs/tools/misc/pubs')
-rw-r--r--pkgs/tools/misc/pubs/default.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/pkgs/tools/misc/pubs/default.nix b/pkgs/tools/misc/pubs/default.nix
new file mode 100644
index 0000000000000..aa8c43b7cdd75
--- /dev/null
+++ b/pkgs/tools/misc/pubs/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchFromGitHub, python3Packages }:
+
+python3Packages.buildPythonApplication rec {
+  name = "pubs-${version}";
+  version = "0.7.0";
+
+  src = fetchFromGitHub {
+    owner = "pubs";
+    repo = "pubs";
+    rev = "v${version}";
+    sha256 = "0n5wbjx9wqy6smfg625mhma739jyg7c92766biaiffp0a2bzr475";
+  };
+
+  propagatedBuildInputs = with python3Packages; [
+    dateutil configobj bibtexparser pyyaml requests beautifulsoup4
+    pyfakefs ddt
+  ];
+
+  preCheck = ''
+    # API tests require networking
+    rm tests/test_apis.py
+
+    # pyfakefs works weirdly in the sandbox
+    export HOME=/
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Command-line bibliography manager";
+    homepage = https://github.com/pubs/pubs;
+    license = licenses.lgpl3;
+    maintainers = with maintainers; [ gebner ];
+    platforms = platforms.all;
+  };
+}