about summary refs log tree commit diff
path: root/pkgs/by-name/cl/clarity-city/package.nix
blob: 3d3fc445d7ad6fd5d7f33539457938c693002088 (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
{ lib, stdenvNoCC, fetchFromGitHub }:

stdenvNoCC.mkDerivation (finalAttrs: {
  pname = "clarity-city";
  version = "1.0.0";

  src = fetchFromGitHub {
    owner = "vmware";
    repo = "clarity-city";
    rev = "v${finalAttrs.version}";
    hash = "sha256-1POSdd2ICnyNNmGadIujezNK8qvARD0kkLR4yWjs5kA=";
  };

  installPhase = ''
    runHook preInstall

    install -Dm644 TrueType/*.ttf -t $out/share/fonts/truetype
    install -Dm644 OpenType/*.otf -t $out/share/fonts/opentype
    install -Dm644 Webfonts/EOT/*.eot -t $out/share/fonts/eot
    install -Dm644 Webfonts/WOFF/*.woff -t $out/share/fonts/woff
    install -Dm644 Webfonts/WOFF2/*.woff2 -t $out/share/fonts/woff2

    runHook postInstall
  '';

  meta = with lib; {
    description = "An open source sans-serif typeface";
    homepage = "https://github.com/vmware/clarity-city";
    license = licenses.ofl;
    platforms = platforms.all;
    maintainers = with maintainers; [ sagikazarmark ];
  };
})