2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2021-02-13 14:23:35 +00:00
|
|
|
, fetchFromGitHub
|
2021-10-28 06:52:43 +00:00
|
|
|
, fetchpatch
|
|
|
|
, python3
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "jrnl";
|
2021-10-28 06:52:43 +00:00
|
|
|
version = "2.8.3";
|
2021-02-13 14:23:35 +00:00
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jrnl-org";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-10-28 06:52:43 +00:00
|
|
|
sha256 = "sha256-+kPr7ndY6u1HMw6m0UZJ5jxVIPNjlTfQt7OYEdZkHBE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
nativeBuildInputs = with python3.pkgs; [
|
|
|
|
poetry-core
|
|
|
|
];
|
2021-02-13 14:23:35 +00:00
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
2021-02-13 14:23:35 +00:00
|
|
|
ansiwrap
|
|
|
|
asteval
|
|
|
|
colorama
|
|
|
|
cryptography
|
|
|
|
keyring
|
|
|
|
parsedatetime
|
|
|
|
python-dateutil
|
|
|
|
pytz
|
|
|
|
pyxdg
|
|
|
|
pyyaml
|
|
|
|
tzlocal
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
checkInputs = with python3.pkgs; [
|
|
|
|
pytest-bdd
|
|
|
|
pytestCheckHook
|
|
|
|
toml
|
|
|
|
];
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
# Switch to poetry-core, https://github.com/jrnl-org/jrnl/pull/1359
|
|
|
|
(fetchpatch {
|
|
|
|
name = "switch-to-poetry-core.patch";
|
|
|
|
url = "https://github.com/jrnl-org/jrnl/commit/a55a240eff7a167af5974a03e9de6f7b818eafd9.patch";
|
|
|
|
sha256 = "1w3gb4vasvh51nggf89fsqsm4862m0g7hr36qz22n4vg9dds175m";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d);
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"jrnl"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-10-28 06:52:43 +00:00
|
|
|
description = "Simple command line journal application that stores your journal in a plain text file";
|
|
|
|
homepage = "https://jrnl.sh/";
|
2021-02-13 14:23:35 +00:00
|
|
|
license = licenses.gpl3Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ zalakain ];
|
|
|
|
};
|
|
|
|
}
|