about summary refs log tree commit diff
path: root/pkgs/desktops/deepin/deepin-metacity/default.nix
blob: b5eb711087630ea7bf59c32c43c2fd7598bc8af1 (plain) (blame)
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
{ stdenv, fetchFromGitHub, pkgconfig, intltool, libtool, gnome3, bamf,
  json-glib, libcanberra-gtk3, libxkbcommon, libstartup_notification,
  deepin-wallpapers, deepin-desktop-schemas }:

stdenv.mkDerivation rec {
  name = "${pname}-${version}";
  pname = "deepin-metacity";
  version = "3.22.22";

  src = fetchFromGitHub {
    owner = "linuxdeepin";
    repo = pname;
    rev = version;
    sha256 = "0gr10dv8vphla6z7zqiyyg3n3ag4rrlz43c4kr7fd5xwx2bfvp3d";
  };

  nativeBuildInputs = [
    pkgconfig
    intltool
    libtool
    gnome3.gnome-common
    gnome3.glib.dev
  ];

  buildInputs = [
    gnome3.dconf
    gnome3.gtk
    gnome3.libgtop
    gnome3.zenity
    bamf
    json-glib
    libcanberra-gtk3
    libstartup_notification
    libxkbcommon
    deepin-wallpapers
    deepin-desktop-schemas
  ];

  postPatch = ''
    sed -i src/ui/deepin-background-cache.c \
      -e 's;/usr/share/backgrounds/default_background.jpg;${deepin-wallpapers}/share/backgrounds/deepin/desktop.jpg;'
  '';

  NIX_CFLAGS_COMPILE = "-I${gnome3.glib.dev}/include/gio-unix-2.0";

  configureFlags = [ "--disable-themes-documentation" ];

  preConfigure = ''
    HOME=$TMP
    NOCONFIGURE=1 ./autogen.sh
  '';

  enableParallelBuilding = true;

  meta = with stdenv.lib; {
    description = "2D window manager for Deepin";
    homepage = https://github.com/linuxdeepin/deepin-metacity;
    license = licenses.gpl3;
    platforms = platforms.linux;
    maintainers = with maintainers; [ romildo ];
  };
}