2024-04-11 13:34:12 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
python3,
|
|
|
|
testers,
|
|
|
|
jrnl,
|
2017-08-30 14:04:29 +00:00
|
|
|
}:
|
|
|
|
|
2021-10-22 17:27:15 +00:00
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2017-08-30 14:04:29 +00:00
|
|
|
pname = "jrnl";
|
2023-11-05 10:47:24 +00:00
|
|
|
version = "4.1";
|
2024-04-11 13:31:11 +00:00
|
|
|
pyproject = true;
|
2017-08-30 14:04:29 +00:00
|
|
|
|
2021-02-11 15:48:36 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jrnl-org";
|
2024-04-11 13:31:11 +00:00
|
|
|
repo = "jrnl";
|
2023-01-20 08:40:45 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-11-05 10:47:24 +00:00
|
|
|
hash = "sha256-DtujXSDJWnOrHjVgJEJNKJMhSrNBHlR2hvHeHLSIF2o=";
|
2017-08-30 14:04:29 +00:00
|
|
|
};
|
|
|
|
|
2024-04-11 13:33:35 +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"
|
|
|
|
'';
|
|
|
|
|
2024-04-11 13:34:12 +00:00
|
|
|
build-system = with python3.pkgs; [ poetry-core ];
|
2021-02-11 15:48:36 +00:00
|
|
|
|
2024-04-11 13:31:11 +00:00
|
|
|
dependencies = with python3.pkgs; [
|
2021-02-11 15:48:36 +00:00
|
|
|
asteval
|
|
|
|
colorama
|
|
|
|
cryptography
|
|
|
|
keyring
|
|
|
|
parsedatetime
|
|
|
|
python-dateutil
|
|
|
|
pytz
|
|
|
|
pyxdg
|
|
|
|
pyyaml
|
|
|
|
tzlocal
|
2022-08-02 12:46:51 +00:00
|
|
|
ruamel-yaml
|
|
|
|
rich
|
2017-08-30 14:04:29 +00:00
|
|
|
];
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = with python3.pkgs; [
|
2021-10-22 17:27:15 +00:00
|
|
|
pytest-bdd
|
2022-08-02 12:46:51 +00:00
|
|
|
pytest-xdist
|
2024-04-28 22:57:23 +00:00
|
|
|
(pytestCheckHook.override { pytest = pytest_7; })
|
2021-10-22 17:27:15 +00:00
|
|
|
toml
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d);
|
|
|
|
'';
|
|
|
|
|
2024-04-11 13:34:12 +00:00
|
|
|
pythonImportsCheck = [ "jrnl" ];
|
2017-08-30 14:04:29 +00:00
|
|
|
|
2023-11-05 10:52:47 +00:00
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = jrnl;
|
|
|
|
version = "v${version}";
|
|
|
|
};
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2024-04-11 13:31:11 +00:00
|
|
|
description = "Command line journal application that stores your journal in a plain text file";
|
2021-10-22 17:27:15 +00:00
|
|
|
homepage = "https://jrnl.sh/";
|
2024-04-11 13:31:11 +00:00
|
|
|
changelog = "https://github.com/jrnl-org/jrnl/releases/tag/v${version}";
|
2021-02-11 15:48:36 +00:00
|
|
|
license = licenses.gpl3Only;
|
2024-04-11 13:34:12 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
bryanasdev000
|
|
|
|
zalakain
|
|
|
|
];
|
2023-09-04 19:52:32 +00:00
|
|
|
mainProgram = "jrnl";
|
2017-08-30 14:04:29 +00:00
|
|
|
};
|
|
|
|
}
|