nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at flake-libs 68 lines 1.5 kB view raw
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 [ 38 "--enable-introspection=yes" 39 ] 40 ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ "ac_cv_have_iconv_detect_h=yes" ]; 41 42 postPatch = '' 43 substituteInPlace tests/testsuite.c \ 44 --replace /bin/rm rm \ 45 --replace /bin/mkdir mkdir 46 47 substituteInPlace tests/test-pkcs7.c \ 48 --replace /bin/mkdir mkdir 49 ''; 50 51 preConfigure = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' 52 cp ${ 53 if stdenv.hostPlatform.isMusl then ./musl-iconv-detect.h else ./iconv-detect.h 54 } ./iconv-detect.h 55 ''; 56 57 nativeCheckInputs = [ gnupg ]; 58 59 enableParallelBuilding = true; 60 61 meta = with lib; { 62 homepage = "https://github.com/jstedfast/gmime/"; 63 description = "C/C++ library for creating, editing and parsing MIME messages and structures"; 64 license = licenses.lgpl21Plus; 65 maintainers = [ ]; 66 platforms = platforms.unix; 67 }; 68}