Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 pkg-config, 6 glib, 7 zlib, 8 gnupg, 9 libgpg-error, 10 gobject-introspection, 11}: 12 13stdenv.mkDerivation rec { 14 version = "2.6.23"; 15 pname = "gmime"; 16 17 src = fetchurl { 18 url = "mirror://gnome/sources/gmime/2.6/${pname}-${version}.tar.xz"; 19 sha256 = "0slzlzcr3h8jikpz5a5amqd0csqh2m40gdk910ws2hnaf5m6hjbi"; 20 }; 21 22 outputs = [ 23 "out" 24 "dev" 25 ]; 26 27 nativeBuildInputs = [ 28 pkg-config 29 gobject-introspection 30 ]; 31 propagatedBuildInputs = [ 32 glib 33 zlib 34 libgpg-error 35 ]; 36 configureFlags = [ 37 "--enable-introspection=yes" 38 ] 39 ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ "ac_cv_have_iconv_detect_h=yes" ]; 40 41 postPatch = '' 42 substituteInPlace tests/testsuite.c \ 43 --replace /bin/rm rm \ 44 --replace /bin/mkdir mkdir 45 46 substituteInPlace tests/test-pkcs7.c \ 47 --replace /bin/mkdir mkdir 48 ''; 49 50 preConfigure = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' 51 cp ${ 52 if stdenv.hostPlatform.isMusl then ./musl-iconv-detect.h else ./iconv-detect.h 53 } ./iconv-detect.h 54 ''; 55 56 nativeCheckInputs = [ gnupg ]; 57 58 enableParallelBuilding = true; 59 60 meta = with lib; { 61 homepage = "https://github.com/jstedfast/gmime/"; 62 description = "C/C++ library for creating, editing and parsing MIME messages and structures"; 63 license = licenses.lgpl21Plus; 64 maintainers = [ ]; 65 platforms = platforms.unix; 66 }; 67}