depot/third_party/nixpkgs/pkgs/applications/misc/jrnl/default.nix
Default email a0cb138ada Project import generated by Copybara.
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
2023-02-02 18:25:31 +00:00

71 lines
1.4 KiB
Nix

{ lib
, fetchFromGitHub
, python3
}:
python3.pkgs.buildPythonApplication rec {
pname = "jrnl";
version = "3.3";
format = "pyproject";
src = fetchFromGitHub {
owner = "jrnl-org";
repo = pname;
rev = "refs/tags/v${version}";
sha256 = "sha256-e2w0E8t6s0OWx2ROme2GdyzWhmCc6hnMfSdLTZqt3bg=";
};
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
];
# 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"
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'rich = "^12.2.0"' 'rich = ">=12.2.0, <14.0.0"'
'';
preCheck = ''
export HOME=$(mktemp -d);
'';
pythonImportsCheck = [
"jrnl"
];
meta = with lib; {
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 ];
};
}