1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-24 10:56:56 +00:00
nixpkgs/pkgs/applications/misc/taskwarrior/default.nix
2021-10-03 21:51:37 +08:00

43 lines
1.2 KiB
Nix

{ lib, stdenv, fetchFromGitHub, cmake, libuuid, gnutls, python3, xdg-utils }:
stdenv.mkDerivation rec {
pname = "taskwarrior";
version = "2.6.0";
src = fetchFromGitHub {
owner = "GothenburgBitFactory";
repo = "taskwarrior";
rev = "v${version}";
sha256 = "sha256-2wVjRecfIlNFAxXFaiKfxy9zArDIYDTfDdrnSM7H8fM=";
fetchSubmodules = true;
};
postPatch = ''
substituteInPlace src/commands/CmdNews.cpp \
--replace "xdg-open" "${lib.getBin xdg-utils}/bin/xdg-open"
'';
nativeBuildInputs = [ cmake libuuid gnutls python3 ];
doCheck = true;
preCheck = ''
patchShebangs --build test
'';
checkTarget = "test";
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/"
'';
meta = with lib; {
description = "Highly flexible command-line tool to manage TODO lists";
homepage = "https://taskwarrior.org";
license = licenses.mit;
maintainers = with maintainers; [ marcweber oxalica ];
platforms = platforms.unix;
};
}