1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-06 12:33:51 +00:00
nixpkgs/pkgs/servers/misc/taskserver/default.nix

42 lines
1.3 KiB
Nix
Raw Normal View History

2021-01-15 07:07:56 +00:00
{ lib, stdenv, fetchurl, cmake, libuuid, gnutls, makeWrapper }:
2014-07-13 06:09:52 +01:00
stdenv.mkDerivation rec {
pname = "taskserver";
2015-09-27 11:35:40 +01:00
version = "1.1.0";
2014-07-13 06:09:52 +01:00
src = fetchurl {
url = "http://www.taskwarrior.org/download/taskd-${version}.tar.gz";
2015-09-27 11:35:40 +01:00
sha256 = "1d110q9vw8g5syzihxymik7hd27z1592wkpz55kya6lphzk8i13v";
2014-07-13 06:09:52 +01:00
};
patchPhase = ''
pkipath=$out/share/taskd/pki
mkdir -p $pkipath
cp -r pki/* $pkipath
echo "patching paths in pki/generate"
sed -i "s#^\.#$pkipath#" $pkipath/generate
for f in $pkipath/generate* ;do
i=$(basename $f)
echo patching $i
sed -i \
-e 's/which/type -p/g' \
-e 's#^\. ./vars#if test -e ./vars;then . ./vars; else echo "cannot find ./vars - copy the template from '$pkipath'/vars into the working directory";exit 1; fi#' $f
echo wrapping $i
makeWrapper $pkipath/$i $out/bin/taskd-pki-$i \
2021-01-15 07:07:56 +00:00
--prefix PATH : ${lib.makeBinPath [ gnutls ]}
done
'';
buildInputs = [ libuuid gnutls ];
nativeBuildInputs = [ cmake makeWrapper ];
2014-07-13 06:09:52 +01:00
meta = {
description = "Server for synchronising Taskwarrior clients";
homepage = "https://taskwarrior.org";
2021-01-15 07:07:56 +00:00
license = lib.licenses.mit;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ matthiasbeyer makefu ];
2014-07-13 06:09:52 +01:00
};
}