1{
2 lib,
3 stdenv,
4 fetchurl,
5 pkg-config,
6 gettext,
7 itstool,
8 libxml2,
9 caja,
10 gtk3,
11 hicolor-icon-theme,
12 json-glib,
13 mate-desktop,
14 wrapGAppsHook3,
15 mateUpdateScript,
16 # can be defaulted to true once switch to meson
17 withMagic ? stdenv.buildPlatform.canExecute stdenv.hostPlatform,
18 file,
19}:
20
21stdenv.mkDerivation rec {
22 pname = "engrampa";
23 version = "1.28.2";
24
25 src = fetchurl {
26 url = "https://pub.mate-desktop.org/releases/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
27 hash = "sha256-Hpl3wjdFv4hDo38xUXHZr5eBSglxrqw9d08BdlCsCe8=";
28 };
29
30 nativeBuildInputs = [
31 pkg-config
32 gettext
33 itstool
34 libxml2 # for xmllint
35 wrapGAppsHook3
36 ];
37
38 buildInputs = [
39 caja
40 gtk3
41 hicolor-icon-theme
42 json-glib
43 mate-desktop
44 ]
45 ++ lib.optionals withMagic [
46 file
47 ];
48
49 configureFlags = [
50 "--with-cajadir=$$out/lib/caja/extensions-2.0"
51 ]
52 ++ lib.optionals withMagic [
53 "--enable-magic"
54 ];
55
56 enableParallelBuilding = true;
57
58 passthru.updateScript = mateUpdateScript { inherit pname; };
59
60 meta = with lib; {
61 description = "Archive Manager for MATE";
62 mainProgram = "engrampa";
63 homepage = "https://mate-desktop.org";
64 license = with licenses; [
65 gpl2Plus
66 lgpl2Plus
67 fdl11Plus
68 ];
69 platforms = platforms.unix;
70 teams = [ teams.mate ];
71 };
72}