nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenvNoCC, fetchzip }:
2
3stdenvNoCC.mkDerivation rec {
4 pname = "u001";
5 version = "unstable-2016-08-01"; # date in the zip file, actual creation date unknown
6
7 src = fetchzip {
8 url = "https://fontlibrary.org/assets/downloads/u001/3ea00b3c0c8fa6ce4373e5766fafd651/u001.zip";
9 sha256 = "sha256-7H32pfr0g68XP5B48VUY99e6fbd7rhH6fEnCKNXWEkU=";
10 stripRoot = false;
11 };
12
13 installPhase = ''
14 runHook preInstall
15
16 TTF_DIR=$out/share/fonts/truetype
17
18 mkdir -p $TTF_DIR
19
20 # We’ll adjust the nonstandard naming convention here
21 cp u001-reg.ttf $TTF_DIR/U001-Regular.ttf
22 cp u001-ita.ttf $TTF_DIR/U001-Italic.ttf
23 cp u001-bol.ttf $TTF_DIR/U001-Bold.ttf
24 cp u001-bolita.ttf $TTF_DIR/U001-BoldItalic.ttf
25 cp u001con-reg.ttf $TTF_DIR/U001Condensed-Regular.ttf
26 cp u001con-ita.ttf $TTF_DIR/U001Condensed-Italic.ttf
27 cp u001con-bol.ttf $TTF_DIR/U001Condensed-Bold.ttf
28 cp u001con-bolita.ttf $TTF_DIR/U001Condensed-BoldItalic.ttf
29
30 runHook postInstall
31 '';
32
33 meta = with lib; {
34 description = "A Univers-like typeface that comes with GhostPDL made by URW++";
35 homepage = "https://fontlibrary.org/en/font/u001";
36 license = licenses.aladdin;
37 platforms = platforms.all;
38 maintainers = with maintainers; [ toastal ];
39 };
40}