summary refs log tree commit diff
path: root/pkgs/tools/networking/tlspool/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/networking/tlspool/default.nix')
-rw-r--r--pkgs/tools/networking/tlspool/default.nix53
1 files changed, 24 insertions, 29 deletions
diff --git a/pkgs/tools/networking/tlspool/default.nix b/pkgs/tools/networking/tlspool/default.nix
index 02d3f2c2948..b992fef2253 100644
--- a/pkgs/tools/networking/tlspool/default.nix
+++ b/pkgs/tools/networking/tlspool/default.nix
@@ -1,56 +1,51 @@
-{ pkgs, stdenv, fetchFromGitHub, unzip, libtool, pkgconfig, git, p11-kit,
-  libtasn1, db, openldap, libmemcached, cyrus_sasl, openssl, softhsm, bash,
-  python, libkrb5, quickder, unbound, ldns, gnupg, gnutls-kdh,
-  useSystemd ? true, systemd, swig
+{ stdenv, fetchFromGitHub
+, cmake, pkgconfig, arpa2cm
+, openldap, p11-kit, unbound, libtasn1, db, openssl, quickder, libkrb5, ldns, gnutls-kdh
+, softhsm
 }:
 
 let
   pname = "tlspool";
-  version = "20170123";
+  version = "20180227";
 in
 
 stdenv.mkDerivation rec {
   name = "${pname}-${version}";
-  src = fetchFromGitHub { 
+  src = fetchFromGitHub {
     owner = "arpa2";
     repo = "tlspool";
-    rev = "90cfa0758b02849114ba6373f280a4f2d3e534bf";
-    sha256 = "1qyq6da5bsgb8y9f3jhfrnhbvjns4k80lpkrydkvfx83bg494370";
+    rev = "b4459637d71c7602e94d455e23c74f3973b9cf30";
+    sha256 = "0x78f2bdsiglwicwn3injm5ysfjlfa0yzdpnc0r3iw4z0n89rj2r";
   };
 
-  propagatedBuildInputs = [ python softhsm openldap p11-kit.dev p11-kit.out gnupg ];
-  nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ unbound unzip git libtasn1 db libmemcached cyrus_sasl openssl bash quickder
-                  libkrb5 ldns libtool swig pkgs.pythonPackages.pip gnutls-kdh ]
-                ++ stdenv.lib.optional useSystemd systemd;
+  nativeBuildInputs = [
+    cmake pkgconfig arpa2cm
+  ];
 
-  patches = [ ./fixing-rpath.patch ./configvar-fix.patch ];
+  buildInputs = [
+    openldap p11-kit unbound libtasn1 db openssl quickder libkrb5 ldns gnutls-kdh
+  ];
 
   postPatch = ''
+    # CMake is probably confused because the current version isn't 1.2.6, but 1.2-6
+    substituteInPlace CMakeLists.txt \
+      --replace "Quick-DER 1.2.4" "Quick-DER 1.2"
     substituteInPlace etc/tlspool.conf \
       --replace "dnssec_rootkey ../etc/root.key" "dnssec_rootkey $out/etc/root.key" \
       --replace "pkcs11_path /usr/local/lib/softhsm/libsofthsm2.so" "pkcs11_path ${softhsm}/lib/softhsm/libsofthsm2.so"
-    substituteInPlace lib/Makefile \
-      --replace "DESTDIR=\$(DESTDIR) PREFIX=\$(PREFIX)" "DESTDIR=\$(DESTDIR) PREFIX=\$(PREFIX) SWIG=${swig}/bin/swig"
   '';
 
-  buildPhase = ''
-    make clean
-    make DESTDIR=$out PREFIX=/ all
-  '';
-
-  installPhase = ''
-    mkdir -p $out/bin $out/lib $out/sbin $out/etc/tlspool/ $out/include/${pname}/pulleyback
-    make DESTDIR=$out PREFIX=/ install
-    cp -R etc/* $out/etc/tlspool/
-    cp include/tlspool/*.h $out/include/${pname}
-    cp pulleyback/*.h $out/include/${pname}/pulleyback/
-    cp src/*.h $out/include/${pname}
+  postInstall = ''
+    mkdir -p $out/include/${pname}/pulleyback $out/etc/tlspool
+    cp -R $src/etc/* $out/etc/tlspool/
+    cp $src/include/tlspool/*.h $out/include/${pname}
+    cp $src/pulleyback/*.h $out/include/${pname}/pulleyback/
+    cp $src/src/*.h $out/include/${pname}
   '';
 
   meta = with stdenv.lib; {
     description = "A supercharged TLS daemon that allows for easy, strong and consistent deployment";
-    license = licenses.bsd2;
+    license = licenses.gpl3;
     homepage = http://www.tlspool.org;
     maintainers = with maintainers; [ leenaars qknight ];
   };