summary refs log tree commit diff
path: root/pkgs/desktops/deepin/deepin-icon-theme/default.nix
blob: 464d6f19ceda7811f8496bed0d9c24d4a9544e57 (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
{ stdenv
, fetchFromGitHub
, gtk3
, xcursorgen
, papirus-icon-theme
, deepin
, hicolor-icon-theme
}:

stdenv.mkDerivation rec {
  pname = "deepin-icon-theme";
  version = "15.12.71";

  src = fetchFromGitHub {
    owner = "linuxdeepin";
    repo = pname;
    rev = version;
    sha256 = "12rzzjp906np95ckbxrd4mb345lm198wz69kxy48f8q1zg78q8iw";
  };

  nativeBuildInputs = [
    gtk3
    xcursorgen
  ];

  propagatedBuildInputs = [
    papirus-icon-theme
    hicolor-icon-theme
  ];

  dontDropIconThemeCache = true;

  postPatch = ''
    patchShebangs tools/hicolor.links
    patchShebangs tools/display_unused_links.sh
    patchShebangs cursors-src/cursors/bitmaps/make.sh
    patchShebangs cursors-src/render-cursors.sh

    # keep icon-theme.cache
    sed -i -e 's|\(-rm -f .*/icon-theme.cache\)|# \1|g' Makefile
  '';

  buildTargets = "all hicolor-links";
  installTargets = [ "install-icons" "install-cursors" ];
  installFlags = [ "PREFIX=${placeholder "out"}" ];

  postInstall = ''
    cp -a ./Sea ./usr/share/icons/hicolor "$out"/share/icons/
  '';

  passthru.updateScript = deepin.updateScript { inherit pname version src; };

  meta = with stdenv.lib; {
    description = "Icons for the Deepin Desktop Environment";
    homepage = "https://github.com/linuxdeepin/deepin-icon-theme";
    license = licenses.gpl3;
    platforms = platforms.unix;
    maintainers = with maintainers; [ romildo ];
  };
}