ripasso-cursive: cosmetic changes (#361736)
[NixPkgs.git] / pkgs / by-name / jr / jrnl / package.nix
blob787a8c46374a5e51d9829ef236b3f15e35c91b7a
2   lib,
3   fetchFromGitHub,
4   python3,
5   testers,
6   jrnl,
7 }:
9 python3.pkgs.buildPythonApplication rec {
10   pname = "jrnl";
11   version = "4.1";
12   pyproject = true;
14   src = fetchFromGitHub {
15     owner = "jrnl-org";
16     repo = "jrnl";
17     rev = "refs/tags/v${version}";
18     hash = "sha256-DtujXSDJWnOrHjVgJEJNKJMhSrNBHlR2hvHeHLSIF2o=";
19   };
21   postPatch = ''
22     # Support pytest_bdd 7.1.2 and later, https://github.com/jrnl-org/jrnl/pull/1878
23     substituteInPlace tests/lib/when_steps.py \
24       --replace-fail "from pytest_bdd.steps import inject_fixture" "from pytest_bdd.compat import inject_fixture"
25   '';
27   build-system = with python3.pkgs; [ poetry-core ];
29   dependencies = with python3.pkgs; [
30     asteval
31     colorama
32     cryptography
33     keyring
34     parsedatetime
35     python-dateutil
36     pytz
37     pyxdg
38     pyyaml
39     tzlocal
40     ruamel-yaml
41     rich
42   ];
44   nativeCheckInputs = with python3.pkgs; [
45     pytest-bdd
46     pytest-xdist
47     (pytestCheckHook.override { pytest = pytest_7; })
48     toml
49   ];
51   preCheck = ''
52     export HOME=$(mktemp -d);
53   '';
55   pythonImportsCheck = [ "jrnl" ];
57   passthru.tests.version = testers.testVersion {
58     package = jrnl;
59     version = "v${version}";
60   };
62   meta = with lib; {
63     description = "Command line journal application that stores your journal in a plain text file";
64     homepage = "https://jrnl.sh/";
65     changelog = "https://github.com/jrnl-org/jrnl/releases/tag/v${version}";
66     license = licenses.gpl3Only;
67     maintainers = with maintainers; [
68       bryanasdev000
69       zalakain
70     ];
71     mainProgram = "jrnl";
72   };