2016-04-06 22:38:10 +01:00
{ stdenv , fetchurl , cmake , libuuid , gnutls , makeWrapper }:
2014-07-13 06:09:52 +01:00
stdenv . mkDerivation rec {
name = " t a s k s e r v e r - ${ version } " ;
2015-09-27 11:35:40 +01:00
version = " 1 . 1 . 0 " ;
2014-07-13 06:09:52 +01:00
enableParallelBuilding = true ;
src = fetchurl {
url = " h t t p : / / w w w . t a s k w a r r i o r . o r g / d o w n l o a d / t a s k d - ${ version } . t a r . g z " ;
2015-09-27 11:35:40 +01:00
sha256 = " 1 d 1 1 0 q 9 v w 8 g 5 s y z i h x y m i k 7 h d 2 7 z 1 5 9 2 w k p z 5 5 k y a 6 l p h z k 8 i 1 3 v " ;
2014-07-13 06:09:52 +01:00
} ;
2016-04-06 22:38:10 +01:00
patchPhase = ''
pkipath = $ out/share/taskd/pki
mkdir - p $ pkipath
cp - r pki /* $ p k i p a t h
echo " p a t c h i n g p a t h s i n p k i / g e n e r a t e "
sed - i " s # ^ \. # $ p k i p a t h # " $ 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 \
2016-04-16 18:00:37 +01:00
- - prefix PATH : $ { stdenv . lib . makeBinPath [ gnutls ] }
2016-04-06 22:38:10 +01:00
done
'' ;
buildInputs = [ makeWrapper ] ;
2014-07-13 06:09:52 +01:00
nativeBuildInputs = [ cmake libuuid gnutls ] ;
meta = {
description = " S e r v e r f o r s y n c h r o n i s i n g T a s k w a r r i o r c l i e n t s " ;
homepage = http://taskwarrior.org ;
license = stdenv . lib . licenses . mit ;
platforms = stdenv . lib . platforms . linux ;
2016-04-06 22:38:10 +01:00
maintainers = with stdenv . lib . maintainers ; [ matthiasbeyer makefu ] ;
2014-07-13 06:09:52 +01:00
} ;
}