summary refs log tree commit diff
path: root/pkgs/data/icons/vanilla-dmz/default.nix
blob: 22b66b1c65dcb19692d949633a2416f7f337c09a (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
{ stdenvNoCC
, lib
, fetchzip
, xorg
, hicolor-icon-theme
}:

stdenvNoCC.mkDerivation rec {
  pname = "vanilla-dmz";
  version = "0.4.5";

  src = fetchzip {
    url = "mirror://debian/pool/main/d/dmz-cursor-theme/dmz-cursor-theme_${version}.tar.xz";
    sha256 = "14r8fri4byyzavzdifpga6118hxqjwpzd11xxj28s16zxcanq16m";
  };

  buildInputs = [
    xorg.xcursorgen
  ];

  propagatedBuildInputs = [
    hicolor-icon-theme
  ];

  dontDropIconThemeCache = true;

  buildPhase = ''
    runHook preBuild

    for theme in DMZ-{White,Black}; do
      pushd $theme/pngs
      ./make.sh
      popd
    done

    runHook postBuild
  '';

  installPhase = ''
    runHook preInstall

    for theme in DMZ-{White,Black}; do
      mkdir -p $out/share/icons/$theme/cursors
      cp -a $theme/xcursors/* $out/share/icons/$theme/cursors/
      install -m644 $theme/index.theme $out/share/icons/$theme/index.theme
    done

    ln -s $out/share/icons/{DMZ-White,Vanilla-DMZ}
    ln -s $out/share/icons/{DMZ-Black,Vanilla-DMZ-AA}

    runHook postInstall
  '';

  meta = with lib; {
    homepage = "http://jimmac.musichall.cz";
    description = "A style neutral scalable cursor theme";
    platforms = platforms.all;
    license = licenses.cc-by-sa-30;
    maintainers = with maintainers; [ cstrahan ];
  };
}