Files
nixpkgs/pkgs/by-name/wa/watson/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

68 lines
1.5 KiB
Nix

{
lib,
fetchFromGitHub,
python3,
installShellFiles,
fetchpatch,
}:
python3.pkgs.buildPythonApplication rec {
pname = "watson";
version = "2.1.0";
pyproject = true;
src = fetchFromGitHub {
owner = "jazzband";
repo = "Watson";
rev = version;
sha256 = "sha256-/AASYeMkt18KPJljAjNPRYOpg/T5xuM10LJq4LrFD0g=";
};
patches = [
# https://github.com/jazzband/Watson/pull/473
(fetchpatch {
name = "fix-completion.patch";
url = "https://github.com/jazzband/Watson/commit/43ad061a981eb401c161266f497e34df891a5038.patch";
sha256 = "sha256-v8/asP1wooHKjyy9XXB4Rtf6x+qmGDHpRoHEne/ZCxc=";
})
];
nativeBuildInputs = [ installShellFiles ];
build-system = with python3.pkgs; [ setuptools ];
dependencies = with python3.pkgs; [
arrow
click
click-didyoumean
requests
];
nativeCheckInputs = with python3.pkgs; [
pytestCheckHook
pytest-mock
mock
pytest-datafiles
];
postInstall = ''
installShellCompletion --bash --name watson watson.completion
installShellCompletion --zsh --name _watson watson.zsh-completion
installShellCompletion --fish watson.fish
'';
pythonImportsCheck = [ "watson" ];
meta = with lib; {
homepage = "https://github.com/jazzband/Watson";
description = "Wonderful CLI to track your time";
mainProgram = "watson";
license = licenses.mit;
maintainers = with maintainers; [
mguentner
nathyong
oxzi
];
};
}