2021-10-04 12:37:57 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, libuuid, gnutls, python3, xdg-utils }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "taskwarrior";
|
2021-10-04 12:37:57 +00:00
|
|
|
version = "2.6.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "GothenburgBitFactory";
|
|
|
|
repo = "taskwarrior";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-2wVjRecfIlNFAxXFaiKfxy9zArDIYDTfDdrnSM7H8fM=";
|
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
2021-03-09 03:18:52 +00:00
|
|
|
|
2021-10-04 12:37:57 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/commands/CmdNews.cpp \
|
|
|
|
--replace "xdg-open" "${lib.getBin xdg-utils}/bin/xdg-open"
|
2021-03-09 03:18:52 +00:00
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-10-04 12:37:57 +00:00
|
|
|
nativeBuildInputs = [ cmake libuuid gnutls python3 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
doCheck = true;
|
|
|
|
preCheck = ''
|
2021-10-04 12:37:57 +00:00
|
|
|
patchShebangs --build test
|
2021-03-09 03:18:52 +00:00
|
|
|
'';
|
|
|
|
checkTarget = "test";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p "$out/share/bash-completion/completions"
|
|
|
|
ln -s "../../doc/task/scripts/bash/task.sh" "$out/share/bash-completion/completions/task.bash"
|
|
|
|
mkdir -p "$out/share/fish/vendor_completions.d"
|
|
|
|
ln -s "../../../share/doc/task/scripts/fish/task.fish" "$out/share/fish/vendor_completions.d/"
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Highly flexible command-line tool to manage TODO lists";
|
|
|
|
homepage = "https://taskwarrior.org";
|
|
|
|
license = licenses.mit;
|
2021-10-04 12:37:57 +00:00
|
|
|
maintainers = with maintainers; [ marcweber oxalica ];
|
2021-03-09 03:18:52 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|