2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config, glib, zlib, gnupg, gpgme, libidn2, libunistring, gobject-introspection
|
2020-03-02 13:06:43 +00:00
|
|
|
, vala }:
|
2017-08-31 15:01:08 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2022-07-31 08:53:45 +00:00
|
|
|
version = "3.2.12";
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "gmime";
|
2017-08-31 15:01:08 +00:00
|
|
|
|
2022-05-01 11:07:08 +00:00
|
|
|
src = fetchurl { # https://github.com/jstedfast/gmime/releases
|
|
|
|
url = "https://github.com/jstedfast/gmime/releases/download/${version}/gmime-${version}.tar.xz";
|
2022-07-31 08:53:45 +00:00
|
|
|
sha256 = "sha256-OPm3aBgjQsSExBIobbjVgRaX/4FiQ3wFea3w0G4icFs=";
|
2017-08-31 15:01:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2023-03-25 22:45:29 +00:00
|
|
|
nativeBuildInputs = [ pkg-config gobject-introspection vala ];
|
|
|
|
buildInputs = [
|
|
|
|
zlib
|
|
|
|
gpgme
|
|
|
|
libidn2
|
|
|
|
libunistring
|
|
|
|
vala # for share/vala/Makefile.vapigen
|
|
|
|
];
|
2017-09-25 09:58:08 +00:00
|
|
|
propagatedBuildInputs = [ glib ];
|
2020-03-02 13:06:43 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--enable-introspection=yes"
|
|
|
|
"--enable-vala=yes"
|
2023-03-25 22:45:29 +00:00
|
|
|
] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ "ac_cv_have_iconv_detect_h=yes" ];
|
2017-08-31 15:01:08 +00:00
|
|
|
|
2018-08-08 18:32:23 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace tests/testsuite.c \
|
|
|
|
--replace /bin/rm rm
|
|
|
|
'';
|
|
|
|
|
2023-03-25 22:45:29 +00:00
|
|
|
preConfigure = ''
|
|
|
|
PKG_CONFIG_VAPIGEN_VAPIGEN="$(type -p vapigen)"
|
|
|
|
export PKG_CONFIG_VAPIGEN_VAPIGEN
|
|
|
|
'' + lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
|
|
|
|
cp ${if stdenv.hostPlatform.isMusl then ./musl-iconv-detect.h else ./iconv-detect.h} ./iconv-detect.h
|
|
|
|
'';
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [ gnupg ];
|
2018-08-08 18:32:23 +00:00
|
|
|
|
2018-10-30 15:54:54 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2017-08-31 15:01:08 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2020-03-02 13:06:43 +00:00
|
|
|
homepage = "https://github.com/jstedfast/gmime/";
|
2017-08-31 15:01:08 +00:00
|
|
|
description = "A C/C++ library for creating, editing and parsing MIME messages and structures";
|
|
|
|
license = licenses.lgpl21Plus;
|
2019-02-22 15:14:13 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2017-08-31 15:01:08 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|