nixpkgs/pkgs/tools/misc/papis/default.nix

57 lines
1.5 KiB
Nix
Raw Normal View History

{ lib, fetchFromGitHub, fetchpatch
, python3, xdg_utils
2018-02-09 12:16:36 +00:00
}:
python3.pkgs.buildPythonApplication rec {
2018-02-09 12:16:36 +00:00
pname = "papis";
version = "0.7.5";
2018-02-09 12:16:36 +00:00
# Missing tests on Pypi
src = fetchFromGitHub {
2018-02-21 11:10:38 +00:00
owner = "papis";
2018-02-09 12:16:36 +00:00
repo = pname;
rev = "v${version}";
sha256 = "1b481sj92z9nw7gwbrpkgd4nlmqc1n73qilkc51k2r56cy1kjvss";
2018-02-09 12:16:36 +00:00
};
# Update click version to 7.0.0
patches = fetchpatch {
url = https://github.com/papis/papis/commit/fddb80978a37a229300b604c26e992e2dc90913f.patch;
sha256 = "0cmagfdaaml1pxhnxggifpb47z5g1p231qywnvnqpd3dm93382w1";
};
2018-02-09 12:16:36 +00:00
propagatedBuildInputs = with python3.pkgs; [
click requests filetype pyparsing configparser
arxiv2bib pyyaml chardet beautifulsoup4 prompt_toolkit
bibtexparser python-slugify pyparser pylibgen
habanero isbnlib
# optional dependencies
dmenu-python whoosh
2018-02-09 12:16:36 +00:00
];
postInstall = ''
install -Dt "$out/etc/bash_completion.d" scripts/shell_completion/build/bash/papis
'';
2018-02-09 12:16:36 +00:00
checkInputs = (with python3.pkgs; [
pytest
]) ++ [
xdg_utils
];
2018-02-21 11:10:38 +00:00
# most of the downloader tests require a network connection
checkPhase = ''
HOME=$(mktemp -d) pytest papis tests --ignore tests/downloaders
2018-02-20 22:53:43 +00:00
'';
2018-02-09 12:16:36 +00:00
# FIXME: find out why 39 tests fail
doCheck = false;
2018-02-09 12:16:36 +00:00
meta = {
description = "Powerful command-line document and bibliography manager";
homepage = http://papis.readthedocs.io/en/latest/;
license = lib.licenses.gpl3;
maintainers = [ lib.maintainers.nico202 ];
};
}