2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
2021-01-17 03:51:22 +00:00
|
|
|
, cmake, pkg-config, arpa2cm
|
2018-03-25 17:02:56 +00:00
|
|
|
, openldap, p11-kit, unbound, libtasn1, db, openssl, quickder, libkrb5, ldns, gnutls-kdh
|
|
|
|
, softhsm
|
2017-03-03 16:38:33 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
pname = "tlspool";
|
2018-03-25 17:02:56 +00:00
|
|
|
version = "20180227";
|
2017-03-03 16:38:33 +00:00
|
|
|
in
|
|
|
|
|
2019-08-13 21:52:01 +00:00
|
|
|
stdenv.mkDerivation {
|
2017-03-03 16:38:33 +00:00
|
|
|
name = "${pname}-${version}";
|
2018-03-25 17:02:56 +00:00
|
|
|
src = fetchFromGitHub {
|
2017-03-03 16:38:33 +00:00
|
|
|
owner = "arpa2";
|
|
|
|
repo = "tlspool";
|
2018-03-25 17:02:56 +00:00
|
|
|
rev = "b4459637d71c7602e94d455e23c74f3973b9cf30";
|
|
|
|
sha256 = "0x78f2bdsiglwicwn3injm5ysfjlfa0yzdpnc0r3iw4z0n89rj2r";
|
2017-03-03 16:38:33 +00:00
|
|
|
};
|
|
|
|
|
2018-03-25 17:02:56 +00:00
|
|
|
nativeBuildInputs = [
|
2021-01-17 03:51:22 +00:00
|
|
|
cmake pkg-config arpa2cm
|
2018-03-25 17:02:56 +00:00
|
|
|
];
|
2017-03-03 16:38:33 +00:00
|
|
|
|
2018-03-25 17:02:56 +00:00
|
|
|
buildInputs = [
|
|
|
|
openldap p11-kit unbound libtasn1 db openssl quickder libkrb5 ldns gnutls-kdh
|
|
|
|
];
|
2017-03-03 16:38:33 +00:00
|
|
|
|
2017-08-11 09:40:08 +00:00
|
|
|
postPatch = ''
|
2018-03-25 17:02:56 +00:00
|
|
|
# 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"
|
2017-03-03 16:38:33 +00:00
|
|
|
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"
|
|
|
|
'';
|
|
|
|
|
2018-03-25 17:02:56 +00:00
|
|
|
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}
|
2017-03-03 16:38:33 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-03-03 16:38:33 +00:00
|
|
|
description = "A supercharged TLS daemon that allows for easy, strong and consistent deployment";
|
2018-03-25 17:02:56 +00:00
|
|
|
license = licenses.gpl3;
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://www.tlspool.org";
|
2017-03-03 16:38:33 +00:00
|
|
|
maintainers = with maintainers; [ leenaars qknight ];
|
|
|
|
};
|
|
|
|
}
|