2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
python3,
|
|
|
|
testers,
|
|
|
|
jrnl,
|
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";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "4.1";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jrnl-org";
|
2024-04-21 15:54:59 +00:00
|
|
|
repo = "jrnl";
|
2023-02-02 18:25:31 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-DtujXSDJWnOrHjVgJEJNKJMhSrNBHlR2hvHeHLSIF2o=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
postPatch = ''
|
|
|
|
# Support pytest_bdd 7.1.2 and later, https://github.com/jrnl-org/jrnl/pull/1878
|
|
|
|
substituteInPlace tests/lib/when_steps.py \
|
|
|
|
--replace-fail "from pytest_bdd.steps import inject_fixture" "from pytest_bdd.compat import inject_fixture"
|
|
|
|
'';
|
2021-02-13 14:23:35 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = with python3.pkgs; [ poetry-core ];
|
|
|
|
|
|
|
|
dependencies = with python3.pkgs; [
|
2021-02-13 14:23:35 +00:00
|
|
|
asteval
|
|
|
|
colorama
|
|
|
|
cryptography
|
|
|
|
keyring
|
|
|
|
parsedatetime
|
|
|
|
python-dateutil
|
|
|
|
pytz
|
|
|
|
pyxdg
|
|
|
|
pyyaml
|
|
|
|
tzlocal
|
2022-08-12 12:06:08 +00:00
|
|
|
ruamel-yaml
|
|
|
|
rich
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = with python3.pkgs; [
|
2021-10-28 06:52:43 +00:00
|
|
|
pytest-bdd
|
2022-08-12 12:06:08 +00:00
|
|
|
pytest-xdist
|
2021-10-28 06:52:43 +00:00
|
|
|
pytestCheckHook
|
|
|
|
toml
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d);
|
|
|
|
'';
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonImportsCheck = [ "jrnl" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = jrnl;
|
|
|
|
version = "v${version}";
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-04-21 15:54:59 +00:00
|
|
|
description = "Command line journal application that stores your journal in a plain text file";
|
2021-10-28 06:52:43 +00:00
|
|
|
homepage = "https://jrnl.sh/";
|
2024-04-21 15:54:59 +00:00
|
|
|
changelog = "https://github.com/jrnl-org/jrnl/releases/tag/v${version}";
|
2021-02-13 14:23:35 +00:00
|
|
|
license = licenses.gpl3Only;
|
2024-04-21 15:54:59 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
bryanasdev000
|
|
|
|
zalakain
|
|
|
|
];
|
2023-10-09 19:29:22 +00:00
|
|
|
mainProgram = "jrnl";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|