Skip to content

Commit

Permalink
papis: 0.6 -> 0.7.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Schütz committed Jan 31, 2019
1 parent eddf96d commit 4de602e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 32 deletions.
58 changes: 27 additions & 31 deletions pkgs/tools/misc/papis/default.nix
@@ -1,52 +1,48 @@
{ lib, fetchFromGitHub, bashInteractive
, python3, vim
{ lib, fetchFromGitHub, fetchpatch
, python3, xdg_utils
}:

let
python = python3;

in python.pkgs.buildPythonApplication rec {
python3.pkgs.buildPythonApplication rec {
pname = "papis";
version = "0.6";
version = "0.7.5";

# Missing tests on Pypi
src = fetchFromGitHub {
owner = "papis";
repo = pname;
rev = "v${version}";
sha256 = "0zy8q154zhpqb75c775nwq3mdl1szhzhkfi0nvyjmzfgsv2g1wa2";
sha256 = "1b481sj92z9nw7gwbrpkgd4nlmqc1n73qilkc51k2r56cy1kjvss";
};

postPatch = ''
sed -i 's/configparser>=3.0.0/# configparser>=3.0.0/' setup.py
patchShebangs tests
'';
# Update click version to 7.0.0
patches = fetchpatch {
url = https://github.com/papis/papis/commit/fddb80978a37a229300b604c26e992e2dc90913f.patch;
sha256 = "0cmagfdaaml1pxhnxggifpb47z5g1p231qywnvnqpd3dm93382w1";
};

propagatedBuildInputs = with python.pkgs; [
argcomplete arxiv2bib beautifulsoup4 bibtexparser
configparser dmenu-python habanero papis-python-rofi
pylibgen prompt_toolkit pyparser python_magic pyyaml
requests unidecode urwid vobject tkinter whoosh
vim
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
];

checkInputs = with python.pkgs; [ pytest ];
checkInputs = (with python3.pkgs; [
pytest
]) ++ [
xdg_utils
];

# Papis tries to create the config folder under $HOME during the tests
# most of the downloader tests require a network connection
checkPhase = ''
mkdir -p check-phase
export PATH=$out/bin:$PATH
# Still don't know why this fails
sed -i 's/--set dir=hello //' tests/bash/test_default.sh
# This test has been disabled since it requires a network connaction
sed -i 's/test_downloader_getter(self):/disabled_test_downloader_getter(self):/' papis/downloaders/tests/test_main.py
export HOME=$(pwd)/check-phase
make test
SH=${bashInteractive}/bin/bash make test-non-pythonic
HOME=$(mktemp -d) pytest papis tests --ignore tests/downloaders
'';

# FIXME: find out why 39 tests fail
doCheck = false;

meta = {
description = "Powerful command-line document and bibliography manager";
homepage = http://papis.readthedocs.io/en/latest/;
Expand Down
2 changes: 1 addition & 1 deletion pkgs/top-level/all-packages.nix
Expand Up @@ -15734,7 +15734,7 @@ in

papirus-icon-theme = callPackage ../data/icons/papirus-icon-theme { };

papis = python3Packages.callPackage ../tools/misc/papis { };
papis = callPackage ../tools/misc/papis { };

pecita = callPackage ../data/fonts/pecita {};

Expand Down

0 comments on commit 4de602e

Please sign in to comment.