Skip to content

Commit

Permalink
tlspool: 20170123 -> 20180227 and fix
Browse files Browse the repository at this point in the history
  • Loading branch information
infinisil authored and globin committed Mar 30, 2018
1 parent a26a68d commit 7ffbbd3
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 101 deletions.
36 changes: 0 additions & 36 deletions pkgs/tools/networking/tlspool/configvar-fix.patch

This file was deleted.

53 changes: 24 additions & 29 deletions pkgs/tools/networking/tlspool/default.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
Expand Down
36 changes: 0 additions & 36 deletions pkgs/tools/networking/tlspool/fixing-rpath.patch

This file was deleted.

0 comments on commit 7ffbbd3

Please sign in to comment.