2022-04-27 09:35:20 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
2022-08-12 12:06:08 +00:00
|
|
|
, fetchpatch
|
2022-04-27 09:35:20 +00:00
|
|
|
, python3
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "pubs";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "0.9.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pubs";
|
|
|
|
repo = "pubs";
|
|
|
|
rev = "v${version}";
|
2022-04-27 09:35:20 +00:00
|
|
|
hash = "sha256-U/9MLqfXrzYVGttFSafw4pYDy26WgdsJMCxciZzO1pw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
patches = [
|
|
|
|
# https://github.com/pubs/pubs/pull/278
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/pubs/pubs/commit/9623d2c3ca8ff6d2bb7f6c8d8624f9a174d831bc.patch";
|
|
|
|
hash = "sha256-6qoufKPv3k6C9BQTZ2/175Nk7zWPh89vG+zebx6ZFOk=";
|
|
|
|
})
|
|
|
|
# https://github.com/pubs/pubs/pull/279
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/pubs/pubs/commit/05e214eb406447196c77c8aa3e4658f70e505f23.patch";
|
|
|
|
hash = "sha256-UBkKiYaG6y6z8lsRpdcsaGsoklv6qj07KWdfkQcVl2g=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
|
|
pyyaml
|
|
|
|
bibtexparser
|
|
|
|
python-dateutil
|
|
|
|
six
|
|
|
|
requests
|
|
|
|
configobj
|
2020-09-25 04:45:31 +00:00
|
|
|
beautifulsoup4
|
2022-04-27 09:35:20 +00:00
|
|
|
feedparser
|
|
|
|
argcomplete
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = with python3.pkgs; [
|
2022-04-27 09:35:20 +00:00
|
|
|
pyfakefs
|
|
|
|
mock
|
|
|
|
ddt
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# Disabling git tests because they expect git to be preconfigured
|
|
|
|
# with the user's details. See
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/94663
|
|
|
|
"tests/test_git.py"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
disabledTests = [
|
|
|
|
# https://github.com/pubs/pubs/issues/276
|
|
|
|
"test_readme"
|
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Command-line bibliography manager";
|
|
|
|
homepage = "https://github.com/pubs/pubs";
|
2022-04-27 09:35:20 +00:00
|
|
|
license = licenses.lgpl3Only;
|
|
|
|
maintainers = with maintainers; [ gebner dotlambda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|