nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 66 lines 1.7 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 cmake, 6 libuuid, 7 gnutls, 8 makeWrapper, 9 nixosTests, 10}: 11 12stdenv.mkDerivation (finalAttrs: { 13 pname = "taskserver"; 14 version = "1.1.0"; 15 16 src = fetchurl { 17 url = "http://www.taskwarrior.org/download/taskd-${finalAttrs.version}.tar.gz"; 18 sha256 = "1d110q9vw8g5syzihxymik7hd27z1592wkpz55kya6lphzk8i13v"; 19 }; 20 21 patchPhase = '' 22 pkipath=$out/share/taskd/pki 23 mkdir -p $pkipath 24 cp -r pki/* $pkipath 25 echo "patching paths in pki/generate" 26 sed -i "s#^\.#$pkipath#" $pkipath/generate 27 for f in $pkipath/generate* ;do 28 i=$(basename $f) 29 echo patching $i 30 sed -i \ 31 -e 's/which/type -p/g' \ 32 -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 33 34 echo wrapping $i 35 makeWrapper $pkipath/$i $out/bin/taskd-pki-$i \ 36 --prefix PATH : ${lib.makeBinPath [ gnutls ]} 37 done 38 39 substituteInPlace {doc/,src/,./}CMakeLists.txt \ 40 --replace-fail "cmake_minimum_required (VERSION 2.8)" "cmake_minimum_required(VERSION 3.10)" 41 substituteInPlace CMakeLists.txt \ 42 --replace-fail "cmake_policy(SET CMP0037 OLD)" "" 43 ''; 44 45 buildInputs = [ 46 libuuid 47 gnutls 48 ]; 49 nativeBuildInputs = [ 50 cmake 51 makeWrapper 52 ]; 53 54 passthru.tests = { inherit (nixosTests) taskserver; }; 55 56 meta = { 57 description = "Server for synchronising Taskwarrior 2 clients"; 58 homepage = "https://taskwarrior.org"; 59 license = lib.licenses.mit; 60 platforms = lib.platforms.linux; 61 maintainers = with lib.maintainers; [ 62 matthiasbeyer 63 makefu 64 ]; 65 }; 66})