about summary refs log tree commit diff
path: root/nixpkgs/pkgs/data/fonts/cantarell-fonts/default.nix
blob: e1c18695db1efe18fdcee01b61fded25c956231a (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
{ stdenv
, lib
, fetchurl
, meson
, ninja
, python3
, gettext
, appstream-glib
, gnome
}:

stdenv.mkDerivation rec {
  pname = "cantarell-fonts";
  version = "0.303.1";

  src = fetchurl {
    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
    sha256 = "+UY6BlnGPlfjgf3XU88ZKSJTlcW0kTWYlCR2GDBTBBE=";
  };

  nativeBuildInputs = [
    meson
    ninja
    python3
    python3.pkgs.psautohint
    python3.pkgs.cffsubr
    python3.pkgs.statmake
    python3.pkgs.ufo2ft
    python3.pkgs.setuptools
    python3.pkgs.ufolib2
    gettext
    appstream-glib
  ];

  # ad-hoc fix for https://github.com/NixOS/nixpkgs/issues/50855
  # until we fix gettext's envHook
  preBuild = ''
    export GETTEXTDATADIRS="$GETTEXTDATADIRS_FOR_BUILD"
  '';

  outputHashAlgo = "sha256";
  outputHashMode = "recursive";
  outputHash = "XeqHVdTQ7PTzxkjwfzS/BTR7+k/M69sfUKdRXGOTmZE=";

  passthru = {
    updateScript = gnome.updateScript {
      packageName = pname;
    };
  };

  meta = {
    description = "Default typeface used in the user interface of GNOME since version 3.0";
    platforms = lib.platforms.all;
    license = lib.licenses.ofl;
    maintainers = with lib.maintainers; [ ];
  };
}