2021-01-15 22:18:51 +00:00
{ lib , stdenv , fetchurl , cmake , libuuid , gnutls , makeWrapper }:
2020-04-24 23:36:52 +00:00
stdenv . mkDerivation rec {
pname = " t a s k s e r v e r " ;
version = " 1 . 1 . 0 " ;
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 " ;
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 " ;
} ;
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 \
2021-01-15 22:18:51 +00:00
- - prefix PATH : $ { lib . makeBinPath [ gnutls ] }
2020-04-24 23:36:52 +00:00
done
'' ;
2021-01-15 22:18:51 +00:00
buildInputs = [ libuuid gnutls ] ;
nativeBuildInputs = [ cmake makeWrapper ] ;
2020-04-24 23:36:52 +00:00
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 = " h t t p s : / / t a s k w a r r i o r . o r g " ;
2021-01-15 22:18:51 +00:00
license = lib . licenses . mit ;
platforms = lib . platforms . linux ;
maintainers = with lib . maintainers ; [ matthiasbeyer makefu ] ;
2020-04-24 23:36:52 +00:00
} ;
}