2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2021-02-11 15:48:36 +00:00
|
|
|
, fetchFromGitHub
|
2021-10-22 17:27:15 +00:00
|
|
|
, python3
|
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-01-20 08:40:45 +00:00
|
|
|
version = "3.3";
|
2021-02-11 15:48:36 +00:00
|
|
|
format = "pyproject";
|
2017-08-30 14:04:29 +00:00
|
|
|
|
2021-02-11 15:48:36 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jrnl-org";
|
|
|
|
repo = pname;
|
2023-01-20 08:40:45 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
sha256 = "sha256-e2w0E8t6s0OWx2ROme2GdyzWhmCc6hnMfSdLTZqt3bg=";
|
2017-08-30 14:04:29 +00:00
|
|
|
};
|
|
|
|
|
2021-10-22 17:27:15 +00:00
|
|
|
nativeBuildInputs = with python3.pkgs; [
|
|
|
|
poetry-core
|
|
|
|
];
|
2021-02-11 15:48:36 +00:00
|
|
|
|
2021-10-22 17:27:15 +00:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
2021-02-11 15:48:36 +00:00
|
|
|
ansiwrap
|
|
|
|
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
|
2021-10-22 17:27:15 +00:00
|
|
|
pytestCheckHook
|
|
|
|
toml
|
|
|
|
];
|
|
|
|
|
2022-08-02 12:46:51 +00:00
|
|
|
# Upstream expects a old pytest-bdd version
|
|
|
|
# Once it changes we should update here too
|
|
|
|
# https://github.com/jrnl-org/jrnl/blob/develop/poetry.lock#L732
|
|
|
|
disabledTests = [
|
|
|
|
"bdd"
|
|
|
|
];
|
|
|
|
|
2022-02-19 10:16:39 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2023-01-20 08:40:45 +00:00
|
|
|
--replace 'rich = "^12.2.0"' 'rich = ">=12.2.0, <14.0.0"'
|
2022-02-19 10:16:39 +00:00
|
|
|
'';
|
2021-10-22 17:27:15 +00:00
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d);
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"jrnl"
|
|
|
|
];
|
2017-08-30 14:04:29 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2021-10-22 17:27:15 +00:00
|
|
|
description = "Simple command line journal application that stores your journal in a plain text file";
|
|
|
|
homepage = "https://jrnl.sh/";
|
2021-02-11 15:48:36 +00:00
|
|
|
license = licenses.gpl3Only;
|
2023-01-20 08:40:45 +00:00
|
|
|
maintainers = with maintainers; [ bryanasdev000 zalakain ];
|
2017-08-30 14:04:29 +00:00
|
|
|
};
|
|
|
|
}
|