1{ lib, stdenv, fetchurl, fetchpatch, glib, pkg-config, libfm-extra }:
2
3stdenv.mkDerivation rec {
4 pname = "menu-cache";
5 version = "1.1.0";
6
7 src = fetchurl {
8 url = "mirror://sourceforge/lxde/menu-cache-${version}.tar.xz";
9 sha256 = "1iry4zlpppww8qai2cw4zid4081hh7fz8nzsp5lqyffbkm2yn0pd";
10 };
11
12 patches = [
13 # Pull patch pending upstream inclusion for -fno-common toolchain support:
14 # https://github.com/lxde/menu-cache/pull/19
15 (fetchpatch {
16 name = "fno-common.patch";
17 url = "https://github.com/lxde/menu-cache/commit/1ce739649b4d66339a03fc0ec9ee7a2f7c141780.patch";
18 sha256 = "08x3h0w2pl8ifj83v9jkf4j3zxcwsyzh251divlhhnwx0rw1pyn7";
19 })
20 ];
21
22 nativeBuildInputs = [ pkg-config ];
23
24 buildInputs = [ glib libfm-extra ];
25
26 meta = with lib; {
27 description = "Library to read freedesktop.org menu files";
28 homepage = "https://blog.lxde.org/tag/menu-cache/";
29 license = licenses.gpl2Plus;
30 maintainers = [ maintainers.ttuegel ];
31 platforms = platforms.linux ++ platforms.darwin;
32 };
33}