1{ fetchurl, lib, stdenv, gettext, npth, libgpg-error, buildPackages }:
2
3stdenv.mkDerivation rec {
4 pname = "libassuan";
5 version = "2.5.6";
6
7 src = fetchurl {
8 url = "mirror://gnupg/${pname}/${pname}-${version}.tar.bz2";
9 sha256 = "sha256-6f0nIY1TlJBOTjl4j5sXQnEcPmtBaJoxqjOAvVqk9CY=";
10 };
11
12 outputs = [ "out" "dev" "info" ];
13 outputBin = "dev"; # libassuan-config
14
15 depsBuildBuild = [ buildPackages.stdenv.cc ];
16 buildInputs = [ npth gettext ];
17
18 configureFlags = [
19 # Required for cross-compilation.
20 "--with-libgpg-error-prefix=${libgpg-error.dev}"
21 ];
22
23 doCheck = true;
24
25 # Make sure includes are fixed for callers who don't use libassuan-config
26 postInstall = ''
27 sed -i 's,#include <gpg-error.h>,#include "${libgpg-error.dev}/include/gpg-error.h",g' $dev/include/assuan.h
28 '';
29
30 meta = with lib; {
31 description = "IPC library used by GnuPG and related software";
32 longDescription = ''
33 Libassuan is a small library implementing the so-called Assuan
34 protocol. This protocol is used for IPC between most newer
35 GnuPG components. Both, server and client side functions are
36 provided.
37 '';
38 homepage = "http://gnupg.org";
39 license = licenses.lgpl2Plus;
40 platforms = platforms.all;
41 maintainers = [ ];
42 };
43}