2024-06-10 16:38:55 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
cmake,
|
|
|
|
libuuid,
|
|
|
|
gnutls,
|
|
|
|
python3,
|
|
|
|
xdg-utils,
|
|
|
|
installShellFiles,
|
|
|
|
}:
|
2011-12-29 22:14:08 +00:00
|
|
|
|
2013-04-08 03:58:23 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "taskwarrior";
|
2022-03-16 07:48:50 +00:00
|
|
|
version = "2.6.2";
|
2021-10-03 10:23:38 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "GothenburgBitFactory";
|
|
|
|
repo = "taskwarrior";
|
|
|
|
rev = "v${version}";
|
2024-07-14 10:59:26 +00:00
|
|
|
hash = "sha256-0YveqiylXJi4cdDCfnPtwCVOJbQrZYsxnXES+9B4Yfw=";
|
2021-10-03 10:23:38 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
2021-03-03 19:22:20 +00:00
|
|
|
|
2021-10-03 10:23:38 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/commands/CmdNews.cpp \
|
|
|
|
--replace "xdg-open" "${lib.getBin xdg-utils}/bin/xdg-open"
|
2021-03-03 19:22:20 +00:00
|
|
|
'';
|
2012-06-22 12:51:41 +00:00
|
|
|
|
2024-06-10 16:38:55 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
libuuid
|
|
|
|
gnutls
|
|
|
|
python3
|
|
|
|
installShellFiles
|
|
|
|
];
|
2012-06-22 12:51:41 +00:00
|
|
|
|
2021-03-03 19:22:20 +00:00
|
|
|
doCheck = true;
|
|
|
|
preCheck = ''
|
2021-10-03 10:23:38 +00:00
|
|
|
patchShebangs --build test
|
2021-03-03 19:22:20 +00:00
|
|
|
'';
|
|
|
|
checkTarget = "test";
|
|
|
|
|
2015-01-18 13:13:53 +00:00
|
|
|
postInstall = ''
|
2023-03-04 17:48:20 +00:00
|
|
|
# ZSH is installed automatically from some reason, only bash and fish need
|
|
|
|
# manual installation
|
|
|
|
installShellCompletion --cmd task \
|
|
|
|
--bash $out/share/doc/task/scripts/bash/task.sh \
|
|
|
|
--fish $out/share/doc/task/scripts/fish/task.fish
|
|
|
|
rm -r $out/share/doc/task/scripts/bash
|
|
|
|
rm -r $out/share/doc/task/scripts/fish
|
2023-03-05 16:35:48 +00:00
|
|
|
# Install vim and neovim plugin
|
2023-03-08 10:18:33 +00:00
|
|
|
mkdir -p $out/share/vim-plugins
|
2023-03-05 16:35:48 +00:00
|
|
|
mv $out/share/doc/task/scripts/vim $out/share/vim-plugins/task
|
2023-03-08 10:18:33 +00:00
|
|
|
mkdir -p $out/share/nvim
|
|
|
|
ln -s $out/share/vim-plugins/task $out/share/nvim/site
|
2015-01-18 13:13:53 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-02-08 10:44:46 +00:00
|
|
|
description = "Highly flexible command-line tool to manage TODO lists";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://taskwarrior.org";
|
2015-06-22 06:25:07 +00:00
|
|
|
license = licenses.mit;
|
2024-06-10 16:38:55 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
marcweber
|
|
|
|
oxalica
|
|
|
|
];
|
2022-05-05 00:46:39 +00:00
|
|
|
mainProgram = "task";
|
2021-03-03 19:22:20 +00:00
|
|
|
platforms = platforms.unix;
|
2011-12-29 22:14:08 +00:00
|
|
|
};
|
|
|
|
}
|