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

63 lines
1.2 KiB
Nix
Raw Normal View History

{ lib
, fetchFromGitHub
, python3
}:
python3.pkgs.buildPythonApplication rec {
pname = "jrnl";
version = "4.0.1";
format = "pyproject";
src = fetchFromGitHub {
owner = "jrnl-org";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-NpI19NQxfDiqcfFI9kMqfMboI4fQTqCG7AoG9o8YoEI=";
};
nativeBuildInputs = with python3.pkgs; [
poetry-core
];
propagatedBuildInputs = with python3.pkgs; [
ansiwrap
asteval
colorama
cryptography
keyring
parsedatetime
python-dateutil
pytz
pyxdg
pyyaml
tzlocal
ruamel-yaml
rich
];
nativeCheckInputs = with python3.pkgs; [
pytest-bdd
pytest-xdist
pytestCheckHook
toml
];
preCheck = ''
export HOME=$(mktemp -d);
'';
pythonImportsCheck = [
"jrnl"
];
meta = with lib; {
changelog = "https://github.com/jrnl-org/jrnl/releases/tag/v${version}";
description = "Simple command line journal application that stores your journal in a plain text file";
homepage = "https://jrnl.sh/";
license = licenses.gpl3Only;
maintainers = with maintainers; [ bryanasdev000 zalakain ];
mainProgram = "jrnl";
};
}