nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenvNoCC, fetchzip }:
2
3# Source Sans Pro got renamed to Source Sans 3 (see
4# https://github.com/adobe-fonts/source-sans/issues/192). 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 name = "source-sans-pro-${version}";
10 version = "3.006";
11
12 src = fetchzip {
13 url = "https://github.com/adobe-fonts/source-sans/archive/${version}R.zip";
14 hash = "sha256-1Savijgq3INuUN89MR0t748HOuGseXVw5Kd4hYwuVas=";
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-sans/";
29 description = "Sans serif font family for user interface environments";
30 license = licenses.ofl;
31 platforms = platforms.all;
32 maintainers = with maintainers; [ ttuegel ];
33 };
34}