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

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

62 lines
1.1 KiB
Nix
Raw Normal View History

{ lib
2021-02-11 15:48:36 +00:00
, fetchFromGitHub
2021-10-22 17:27:15 +00:00
, python3
}:
2021-10-22 17:27:15 +00:00
python3.pkgs.buildPythonApplication rec {
pname = "jrnl";
2022-02-19 10:16:39 +00:00
version = "2.8.4";
2021-02-11 15:48:36 +00:00
format = "pyproject";
2021-02-11 15:48:36 +00:00
src = fetchFromGitHub {
owner = "jrnl-org";
repo = pname;
rev = "v${version}";
2022-02-19 10:16:39 +00:00
sha256 = "sha256-Edu+GW/D+R5r0R750Z1f8YUVPMYbm9PK4D73sTDzDEc=";
};
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
];
2021-10-22 17:27:15 +00:00
checkInputs = with python3.pkgs; [
pytest-bdd
pytestCheckHook
toml
];
2022-02-19 10:16:39 +00:00
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'tzlocal = ">2.0, <3.0"' 'tzlocal = ">2.0, !=3.0"'
'';
2021-10-22 17:27:15 +00:00
preCheck = ''
export HOME=$(mktemp -d);
'';
pythonImportsCheck = [
"jrnl"
];
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;
maintainers = with maintainers; [ zalakain ];
};
}