2021-03-03 11:22:20 -08:00
|
|
|
{ lib, stdenv, fetchurl, cmake, libuuid, gnutls, python3, bash }:
|
2011-12-29 14:14:08 -08:00
|
|
|
|
2013-04-07 20:58:23 -07:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 05:41:18 -07:00
|
|
|
pname = "taskwarrior";
|
2021-03-03 11:22:20 -08:00
|
|
|
version = "2.5.3";
|
|
|
|
|
|
|
|
srcs = [
|
|
|
|
(fetchurl {
|
|
|
|
url = " https://github.com/GothenburgBitFactory/taskwarrior/releases/download/v${version}/${sourceRoot}.tar.gz";
|
|
|
|
sha256 = "0fwnxshhlha21hlgg5z1ad01w13zm1hlmncs274y5n8i15gdfhvj";
|
|
|
|
})
|
|
|
|
(fetchurl {
|
|
|
|
url = "https://github.com/GothenburgBitFactory/taskwarrior/releases/download/v${version}/tests-${version}.tar.gz";
|
|
|
|
sha256 = "165xmf9h6rb7l6l9nlyygj0mx9bi1zyd78z0lrl3nadhmgzggv0b";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
sourceRoot = "task-${version}";
|
|
|
|
|
|
|
|
postUnpack = ''
|
|
|
|
mv test ${sourceRoot}
|
|
|
|
'';
|
2012-06-22 05:51:41 -07:00
|
|
|
|
2014-10-25 18:08:00 -07:00
|
|
|
nativeBuildInputs = [ cmake libuuid gnutls ];
|
2012-06-22 05:51:41 -07:00
|
|
|
|
2021-03-03 11:22:20 -08:00
|
|
|
doCheck = true;
|
|
|
|
preCheck = ''
|
|
|
|
find test -type f -exec sed -i \
|
|
|
|
-e "s|/usr/bin/env python3|${python3.interpreter}|" \
|
|
|
|
-e "s|/usr/bin/env bash|${bash}/bin/bash|" \
|
|
|
|
{} +
|
|
|
|
'';
|
|
|
|
checkTarget = "test";
|
|
|
|
|
2015-01-18 05:13:53 -08:00
|
|
|
postInstall = ''
|
2017-06-01 09:39:16 -07:00
|
|
|
mkdir -p "$out/share/bash-completion/completions"
|
2018-01-10 11:51:59 -08:00
|
|
|
ln -s "../../doc/task/scripts/bash/task.sh" "$out/share/bash-completion/completions/task.bash"
|
2017-08-15 15:26:51 -07:00
|
|
|
mkdir -p "$out/share/fish/vendor_completions.d"
|
|
|
|
ln -s "../../../share/doc/task/scripts/fish/task.fish" "$out/share/fish/vendor_completions.d/"
|
2018-05-14 03:46:00 -07:00
|
|
|
mkdir -p "$out/share/zsh/site-functions"
|
|
|
|
ln -s "../../../share/doc/task/scripts/zsh/_task" "$out/share/zsh/site-functions/"
|
2015-01-18 05:13:53 -08:00
|
|
|
'';
|
|
|
|
|
2021-01-10 23:54:33 -08:00
|
|
|
meta = with lib; {
|
2017-02-08 02:44:46 -08:00
|
|
|
description = "Highly flexible command-line tool to manage TODO lists";
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://taskwarrior.org";
|
2015-06-21 23:25:07 -07:00
|
|
|
license = licenses.mit;
|
2019-03-12 15:45:33 -07:00
|
|
|
maintainers = with maintainers; [ marcweber ];
|
2021-03-03 11:22:20 -08:00
|
|
|
platforms = platforms.unix;
|
2011-12-29 14:14:08 -08:00
|
|
|
};
|
|
|
|
}
|