aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/desktops/cinnamon/muffin/default.nix
blob: 2913d4761ff8aaf837a1b6918fd74580d143ab66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
{ fetchFromGitHub
, cinnamon-desktop
, glib
, file
, gnome3
, gnome-doc-utils
, fetchpatch
, gobject-introspection
, gtk3
, intltool
, json-glib
, libinput
, libstartup_notification
, libXtst
, libxkbcommon
, pkgconfig
, stdenv
, udev
, xorg
, wrapGAppsHook
, pango
, cairo
, gtk-doc
, docbook_xsl
, docbook_xml_dtd_43
, docbook_xml_dtd_42
, docbook_xml_dtd_412
, autoconf
, automake
, gettext
, libtool
}:

# it's a frankensteins monster with some cinnamon sparkles added on top of it

stdenv.mkDerivation rec {
  pname = "muffin";
  version = "4.4.2";

  src = fetchFromGitHub {
    owner = "linuxmint";
    repo = pname;
    rev = version;
    sha256 = "1kzjw4a5p69j8x55vpbpn6gy8pkbbyii6kzw2nzbypmipgnnijw8";
  };

  patches = [
    # backport patch that disables wayland components via build flags
    # https://github.com/linuxmint/muffin/pull/548#issuecomment-578316820
    (fetchpatch {
      url = "https://github.com/linuxmint/muffin/commit/f78bf5b309b3d306848f47cc241b31e9399999a7.patch";
      sha256 = "1c79aa9w2v23xlz86x3l42pavwrqx5d6nmfd9nms29hjsk8mpf4i";
    })
    # mute some warnings that caused build failures
    # https://github.com/linuxmint/muffin/issues/535#issuecomment-536917143
    (fetchpatch {
      url = "https://src.fedoraproject.org/rpms/muffin/raw/6b0af3a22173e374804371a1cca74e23d696dd37/f/0001-fix-warnings-when-compiling.patch";
      sha256 = "15wdbn3afn3103v7rq1icp8n0vqqwrrya03h0g2rzqlrsc7wrvzw";
    })
  ];

  buildInputs = [
    gtk3
    glib
    pango
    cairo
    json-glib
    cinnamon-desktop
    xorg.libXcomposite
    xorg.libXcursor
    xorg.libXdamage
    xorg.libXext
    xorg.libXfixes
    xorg.libXi
    xorg.libxkbfile
    xorg.xkeyboardconfig

    libxkbcommon
    gnome3.zenity
    libinput
    libstartup_notification
    libXtst
    udev
    gobject-introspection
  ];

  nativeBuildInputs = [
    autoconf
    automake
    gettext
    libtool
    wrapGAppsHook
    pkgconfig
    intltool

    gnome-doc-utils
    gtk-doc
    docbook_xsl
    docbook_xml_dtd_43
    docbook_xml_dtd_42
    docbook_xml_dtd_412
  ];

  preConfigure = ''
    NOCONFIGURE=1 ./autogen.sh
  '';

  meta = with stdenv.lib; {
    homepage = "https://github.com/linuxmint/muffin";
    description = "The window management library for the Cinnamon desktop (libmuffin) and its sample WM binary (muffin)";
    license = licenses.gpl2;
    platforms = platforms.linux;
    maintainers = [ maintainers.mkg20001 ];
  };
}