nixpkgs/pkgs/tools/networking/tlspool/default.nix

53 lines
1.6 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub
2021-01-17 03:51:22 +00:00
, cmake, pkg-config, arpa2cm
2018-03-25 18:02:56 +01: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 18:02:56 +01:00
version = "20180227";
2017-03-03 16:38:33 +00:00
in
2019-08-13 22:52:01 +01:00
stdenv.mkDerivation {
2017-03-03 16:38:33 +00:00
name = "${pname}-${version}";
2018-03-25 18:02:56 +01:00
src = fetchFromGitHub {
2017-03-03 16:38:33 +00:00
owner = "arpa2";
repo = "tlspool";
2018-03-25 18:02:56 +01:00
rev = "b4459637d71c7602e94d455e23c74f3973b9cf30";
sha256 = "0x78f2bdsiglwicwn3injm5ysfjlfa0yzdpnc0r3iw4z0n89rj2r";
2017-03-03 16:38:33 +00:00
};
2018-03-25 18:02:56 +01:00
nativeBuildInputs = [
2021-01-17 03:51:22 +00:00
cmake pkg-config arpa2cm
2018-03-25 18:02:56 +01:00
];
2017-03-03 16:38:33 +00:00
2018-03-25 18:02:56 +01:00
buildInputs = [
openldap p11-kit unbound libtasn1 db openssl quickder libkrb5 ldns gnutls-kdh
];
2017-03-03 16:38:33 +00:00
postPatch = ''
2018-03-25 18:02:56 +01: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 18:02:56 +01: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
'';
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 18:02:56 +01:00
license = licenses.gpl3;
homepage = "http://www.tlspool.org";
2017-03-03 16:38:33 +00:00
maintainers = with maintainers; [ leenaars qknight ];
};
}