about summary refs log tree commit diff
path: root/pkgs/by-name/vi/vimix-cursors/package.nix
blob: 33de66e19e548d1df78363ae8bc1767708380006 (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
{ lib
, fetchFromGitHub
, stdenvNoCC
, inkscape
, python3Packages
, xcursorgen
}:
stdenvNoCC.mkDerivation {
  pname = "vimix-cursors";
  version = "2020-02-24-unstable-2021-09-18";

  src = fetchFromGitHub {
    owner = "vinceliuice";
    repo = "vimix-cursors";
    rev = "9bc292f40904e0a33780eda5c5d92eb9a1154e9c";
    hash = "sha256-zW7nJjmB3e+tjEwgiCrdEe5yzJuGBNdefDdyWvgYIUU=";
  };

  nativeBuildInputs = [
    inkscape
    python3Packages.cairosvg
    xcursorgen
  ];

  postPatch = ''
    patchShebangs .
  '';

  buildPhase = ''
    runHook preBuild

    HOME="$NIX_BUILD_ROOT" ./build.sh

    runHook postBuild
  '';

  installPhase = ''
    runHook preInstall

    install -dm 755 $out/share/icons
    for color in "" "-white"; do
      cp -pr "dist$color/"  "$out/share/icons/Vimix$color-cursors"
    done

    runHook postInstall
  '';

  meta = with lib; {
    description = "An X cursor theme inspired by Materia design";
    homepage = "https://github.com/vinceliuice/Vimix-cursors";
    license = licenses.gpl3Only;
    maintainers = with maintainers; [ ambroisie ];
    platforms = platforms.linux;
  };
}