about summary refs log tree commit diff
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
parent738e97fcca310a12f5f3975bf41952b325a60f80 (diff)
pubs: init at 0.7.0
-rw-r--r--pkgs/tools/misc/pubs/default.nix34
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 36 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;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 36fd29fdac435..d818bc71d88a4 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -4175,6 +4175,8 @@ with pkgs;
     libXNVCtrl = linuxPackages.nvidia_x11.settings.libXNVCtrl;
   };
 
+  pubs = callPackage ../tools/misc/pubs {};
+
   pv = callPackage ../tools/misc/pv { };
 
   pwgen = callPackage ../tools/security/pwgen { };