2021-06-06 17:42:02 +02:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitLab
|
|
|
|
, fetchpatch
|
|
|
|
, meson
|
|
|
|
, ninja
|
2021-01-17 03:14:13 +01:00
|
|
|
, pkg-config
|
2019-09-13 20:26:00 +02:00
|
|
|
, gettext
|
|
|
|
, itstool
|
|
|
|
, libxml2
|
|
|
|
, glib
|
2021-06-30 03:53:39 +02:00
|
|
|
, shared-mime-info
|
2019-09-13 20:26:00 +02:00
|
|
|
}:
|
2009-02-16 15:57:35 +01:00
|
|
|
|
2019-09-13 20:26:00 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-13 23:52:01 +02:00
|
|
|
pname = "shared-mime-info";
|
2021-06-06 17:42:02 +02:00
|
|
|
version = "2.1";
|
2009-02-16 15:57:35 +01:00
|
|
|
|
2021-06-06 17:42:02 +02:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.freedesktop.org";
|
|
|
|
owner = "xdg";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
|
|
|
sha256 = "07bxv44p43pqq4ymfnyy50yli7lwdqymhvclna42rkn1cazq3vb5";
|
2009-02-16 15:57:35 +01:00
|
|
|
};
|
|
|
|
|
2021-06-06 17:42:02 +02:00
|
|
|
patches = [
|
|
|
|
# xmlto is only used for building the docs, which are not installed anyways.
|
|
|
|
(fetchpatch {
|
|
|
|
name = "xmlto-optional.patch";
|
|
|
|
url = "https://gitlab.freedesktop.org/xdg/shared-mime-info/-/merge_requests/110.patch";
|
|
|
|
sha256 = "0p5gxlcmn8ji5bc7pd105s1halqwa1d28lfx9yj43rn6mav7allx";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2019-09-13 20:26:00 +02:00
|
|
|
nativeBuildInputs = [
|
2021-06-06 17:42:02 +02:00
|
|
|
meson
|
|
|
|
ninja
|
2021-01-17 03:14:13 +01:00
|
|
|
pkg-config
|
2019-09-13 20:26:00 +02:00
|
|
|
gettext
|
|
|
|
itstool
|
2021-06-30 03:53:39 +02:00
|
|
|
libxml2
|
2021-07-04 03:50:36 +02:00
|
|
|
] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) shared-mime-info;
|
2019-09-13 20:26:00 +02:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libxml2
|
|
|
|
glib
|
|
|
|
];
|
2009-02-16 15:57:35 +01:00
|
|
|
|
2021-07-04 03:50:36 +02:00
|
|
|
strictDeps = true;
|
|
|
|
|
2021-06-06 17:42:02 +02:00
|
|
|
mesonFlags = [
|
|
|
|
"-Dupdate-mimedb=true"
|
|
|
|
];
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2009-02-16 15:57:35 +01:00
|
|
|
description = "A database of common MIME types";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://freedesktop.org/wiki/Software/shared-mime-info";
|
2017-09-30 19:59:38 +02:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.unix;
|
2021-06-06 17:42:02 +02:00
|
|
|
maintainers = teams.freedesktop.members ++ [ maintainers.mimame ];
|
2009-02-16 15:57:35 +01:00
|
|
|
};
|
|
|
|
}
|