1{ stdenv, fetchurl, libxml2, gnutls, libxslt, pkgconfig, libgcrypt, libtool
2, openssl, nss, makeWrapper }:
3
4let
5 version = "1.2.26";
6in
7stdenv.mkDerivation rec {
8 name = "xmlsec-${version}";
9
10 src = fetchurl {
11 url = "https://www.aleksey.com/xmlsec/download/xmlsec1-${version}.tar.gz";
12 sha256 = "0l1dk344rn3j2vnj13daz72xd8j1msvzhg82n2il5ji0qz4pd0ld";
13 };
14
15 outputs = [ "out" "dev" ];
16
17 nativeBuildInputs = [ makeWrapper pkgconfig ];
18
19 buildInputs = [ libxml2 gnutls libxslt libgcrypt libtool openssl nss ];
20
21 enableParallelBuilding = true;
22 doCheck = true;
23
24 # enable deprecated soap headers required by lasso
25 # https://dev.entrouvert.org/issues/18771
26 configureFlags = [ "--enable-soap" ];
27
28 # otherwise libxmlsec1-gnutls.so won't find libgcrypt.so, after #909
29 NIX_LDFLAGS = [ "-lgcrypt" ];
30
31 postInstall = ''
32 moveToOutput "bin/xmlsec1-config" "$dev"
33 moveToOutput "lib/xmlsec1Conf.sh" "$dev"
34 '';
35
36 postFixup = ''
37 wrapProgram "$out/bin/xmlsec1" --prefix LD_LIBRARY_PATH ":" "$out/lib"
38 '';
39
40 meta = {
41 homepage = http://www.aleksey.com/xmlsec;
42 downloadPage = https://www.aleksey.com/xmlsec/download.html;
43 description = "XML Security Library in C based on libxml2";
44 license = stdenv.lib.licenses.mit;
45 platforms = with stdenv.lib.platforms; linux ++ darwin;
46 updateWalker = true;
47 };
48}