nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv, fetchurl, cmake, libuuid, gnutls, makeWrapper }:
2
3stdenv.mkDerivation rec {
4 name = "taskserver-${version}";
5 version = "1.1.0";
6
7 enableParallelBuilding = true;
8
9 src = fetchurl {
10 url = "http://www.taskwarrior.org/download/taskd-${version}.tar.gz";
11 sha256 = "1d110q9vw8g5syzihxymik7hd27z1592wkpz55kya6lphzk8i13v";
12 };
13
14 patchPhase = ''
15 pkipath=$out/share/taskd/pki
16 mkdir -p $pkipath
17 cp -r pki/* $pkipath
18 echo "patching paths in pki/generate"
19 sed -i "s#^\.#$pkipath#" $pkipath/generate
20 for f in $pkipath/generate* ;do
21 i=$(basename $f)
22 echo patching $i
23 sed -i \
24 -e 's/which/type -p/g' \
25 -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
26
27 echo wrapping $i
28 makeWrapper $pkipath/$i $out/bin/taskd-pki-$i \
29 --prefix PATH : ${stdenv.lib.makeBinPath [ gnutls ]}
30 done
31 '';
32
33 buildInputs = [ makeWrapper ];
34 nativeBuildInputs = [ cmake libuuid gnutls ];
35
36 meta = {
37 description = "Server for synchronising Taskwarrior clients";
38 homepage = https://taskwarrior.org;
39 license = stdenv.lib.licenses.mit;
40 platforms = stdenv.lib.platforms.linux;
41 maintainers = with stdenv.lib.maintainers; [ matthiasbeyer makefu ];
42 };
43}