about summary refs log tree commit diff
path: root/pkgs/by-name/po/poppins/package.nix
blob: b56b2c3f2c8d6e9df183bd99781dc751c5f4b83e (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
{
  lib,
  stdenvNoCC,
  fetchFromGitHub,
  unzip,
}:
stdenvNoCC.mkDerivation rec {
  pname = "poppins";
  version = "4.003";

  src = fetchFromGitHub {
    owner = "itfoundry";
    repo = "poppins";
    rev = "v${version}";
    hash = "sha256-7+RQHYxNFqOw2EeS2hgrbK/VbUAiPorUtkyRb5MFh5w=";
  };

  nativeBuildInputs = [unzip];

  installPhase = ''
    runHook preInstall
    unzip products/Poppins-4.003-GoogleFonts-TTF.zip
    unzip products/PoppinsLatin-5.001-Latin-TTF.zip
    install -Dm644 *.ttf -t $out/share/fonts/truetype
    runHook postInstall
  '';

  meta = {
    description = "A Devanagari + Latin family for Google Fonts";
    homepage = "https://github.com/itfoundry/Poppins/";
    license = lib.licenses.ofl;
    maintainers = with lib.maintainers; [nyawox];
    platforms = lib.platforms.all;
  };
}