about summary refs log tree commit diff
path: root/pkgs/data/fonts/material-icons/default.nix
blob: 993e25ba2cd33488759aeba83f4b142ad00beb96 (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
{ lib, stdenvNoCC, fetchFromGitHub, nix-update-script }:

stdenvNoCC.mkDerivation (finalAttrs: {
  pname = "material-icons";
  version = "4.0.0";

  src = fetchFromGitHub {
    owner = "google";
    repo = "material-design-icons";
    rev = finalAttrs.version;
    hash = "sha256-wX7UejIYUxXOnrH2WZYku9ljv4ZAlvgk8EEJJHOCCjE=";
  };

  dontConfigure = true;
  dontBuild = true;

  installPhase = ''
    runHook preInstall

    mkdir -p $out/share/fonts/truetype
    cp font/*.ttf $out/share/fonts/truetype

    mkdir -p $out/share/fonts/opentype
    cp font/*.otf $out/share/fonts/opentype

    runHook postInstall
  '';

  passthru.updateScript = nix-update-script { };

  meta = with lib; {
    description = "System status icons by Google, featuring material design";
    homepage = "https://material.io/icons";
    license = licenses.asl20;
    platforms = platforms.all;
    maintainers = with maintainers; [ mpcsh ];
  };
})