nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, future
5, pyparsing
6, pytestCheckHook
7, pythonOlder
8}:
9
10buildPythonPackage rec {
11 pname = "bibtexparser";
12 version = "1.2.0";
13 format = "setuptools";
14
15 disabled = pythonOlder "3.7";
16
17 src = fetchFromGitHub {
18 owner = "sciunto-org";
19 repo = "python-${pname}";
20 rev = "v${version}";
21 hash = "sha256-M9fDI28Yq0uUHPx51wiuRPmRTLkjVqj7ixapbSftnJc=";
22 };
23
24 propagatedBuildInputs = [
25 future
26 pyparsing
27 ];
28
29 checkInputs = [
30 pytestCheckHook
31 ];
32
33 postPatch = ''
34 # https://github.com/sciunto-org/python-bibtexparser/pull/259
35 substituteInPlace bibtexparser/tests/test_crossref_resolving.py \
36 --replace "import unittest2 as unittest" "import unittest"
37 '';
38
39 pythonImportsCheck = [
40 "bibtexparser"
41 ];
42
43 meta = with lib; {
44 description = "Bibtex parser for Python";
45 homepage = "https://github.com/sciunto-org/python-bibtexparser";
46 license = with licenses; [ lgpl3Only /* or */ bsd3 ];
47 maintainers = with maintainers; [ fridh ];
48 };
49}