2021-01-15 07:07:56 +00:00
{ lib , stdenv , fetchurl , cmake , libuuid , gnutls , makeWrapper }:
2014-07-13 05:09:52 +00:00
stdenv . mkDerivation rec {
2019-08-15 12:41:18 +00:00
pname = " t a s k s e r v e r " ;
2015-09-27 10:35:40 +00:00
version = " 1 . 1 . 0 " ;
2014-07-13 05:09:52 +00:00
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 10:35:40 +00: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 05:09:52 +00:00
} ;
2016-04-06 21:38:10 +00: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 \
2021-01-15 07:07:56 +00:00
- - prefix PATH : $ { lib . makeBinPath [ gnutls ] }
2016-04-06 21:38:10 +00:00
done
'' ;
2020-12-31 07:48:55 +00:00
buildInputs = [ libuuid gnutls ] ;
nativeBuildInputs = [ cmake makeWrapper ] ;
2014-07-13 05:09: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 " ;
2020-04-01 01:11:51 +00:00
homepage = " h t t p s : / / t a s k w a r r i o r . o r g " ;
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 05:09:52 +00:00
} ;
}