nixpkgs/pkgs/applications/misc/jrnl/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

72 lines
1.3 KiB
Nix
Raw Normal View History

{ lib
2021-02-11 18:48:36 +03:00
, fetchFromGitHub
2021-10-22 20:27:15 +03:00
, python3
}:
2021-10-22 20:27:15 +03:00
python3.pkgs.buildPythonApplication rec {
pname = "jrnl";
version = "3.0";
2021-02-11 18:48:36 +03:00
format = "pyproject";
2021-02-11 18:48:36 +03:00
src = fetchFromGitHub {
owner = "jrnl-org";
repo = pname;
rev = "v${version}";
sha256 = "sha256-wyN7dlAbQwqvES8qEJ4Zo+fDMM/Lh9tNjf215Ywop10=";
};
2021-10-22 20:27:15 +03:00
nativeBuildInputs = with python3.pkgs; [
poetry-core
];
2021-02-11 18:48:36 +03:00
2021-10-22 20:27:15 +03:00
propagatedBuildInputs = with python3.pkgs; [
2021-02-11 18:48:36 +03:00
ansiwrap
asteval
colorama
cryptography
keyring
parsedatetime
python-dateutil
pytz
pyxdg
pyyaml
tzlocal
ruamel-yaml
rich
];
2021-10-22 20:27:15 +03:00
checkInputs = with python3.pkgs; [
pytest-bdd
pytest-xdist
2021-10-22 20:27:15 +03:00
pytestCheckHook
toml
];
# 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 13:16:39 +03:00
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'tzlocal = ">2.0, <3.0"' 'tzlocal = ">2.0, !=3.0"'
'';
2021-10-22 20:27:15 +03:00
preCheck = ''
export HOME=$(mktemp -d);
'';
pythonImportsCheck = [
"jrnl"
];
meta = with lib; {
2021-10-22 20:27:15 +03:00
description = "Simple command line journal application that stores your journal in a plain text file";
homepage = "https://jrnl.sh/";
2021-02-11 18:48:36 +03:00
license = licenses.gpl3Only;
maintainers = with maintainers; [ zalakain ];
};
}