nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenvNoCC, fetchzip }:
2
3# Source Serif Pro got renamed to Source Serif 4 (see
4# https://github.com/adobe-fonts/source-serif/issues/77). This is the
5# last version named "Pro". It is useful for backward compatibility
6# with older documents/templates/etc.
7
8stdenvNoCC.mkDerivation rec {
9 pname = "source-serif-pro";
10 version = "3.001";
11
12 src = fetchzip {
13 url = "https://github.com/adobe-fonts/source-serif/releases/download/${version}R/source-serif-pro-${version}R.zip";
14 hash = "sha256-chXoaPOACtQ7wz/etElXuIJH/yvUsP03WlxeCfqWF/w=";
15 };
16
17 installPhase = ''
18 runHook preInstall
19
20 install -Dm444 OTF/*.otf -t $out/share/fonts/opentype
21 install -Dm444 TTF/*.ttf -t $out/share/fonts/truetype
22 install -Dm444 VAR/*.otf -t $out/share/fonts/variable
23
24 runHook postInstall
25 '';
26
27 meta = with lib; {
28 homepage = "https://adobe-fonts.github.io/source-serif/";
29 description = "Typeface for setting text in many sizes, weights, and languages. Designed to complement Source Sans";
30 license = licenses.ofl;
31 platforms = platforms.all;
32 maintainers = with maintainers; [ ttuegel ];
33 };
34}