all repos — char/flake @ 8d1939e9cfcb56b8f44410ecf856923be2f06781

nixos flake

packages/berkeley-mono/package.nix (view raw)

 1{
 2  stdenv,
 3  requireFile,
 4  unzip,
 5  lib,
 6}:
 7stdenv.mkDerivation {
 8  pname = "berkeley-mono";
 9  version = "1.0";
10
11  src =
12    let
13      name = "berkeley-mono-typeface.zip";
14    in
15    requireFile {
16      name = name;
17      url = "https://berkeleygraphics.com/typefaces/berkeley-mono/";
18      sha256 = "sha256-PRmfxq1DYPbuIMmOie8T6iE26J2V97JEj2/a2OQ1uiw=";
19    };
20
21  buildInputs = [ unzip ];
22  phases = [
23    "unpackPhase"
24    "installPhase"
25  ];
26  pathsToLink = [ "/share/fonts/truetype/" ];
27  sourceRoot = ".";
28  installPhase = ''
29    install_path=$out/share/fonts/truetype
30    mkdir -p $install_path
31    find -name "BerkeleyMono*.ttf" -exec cp {} $install_path \;
32  '';
33
34  meta = with lib; {
35    homepage = "https://berkeleygraphics.com/typefaces/berkeley-mono/";
36    description = ''
37      A love letter to the golden era of computing.
38    '';
39    platforms = platforms.all;
40    licence = licences.unfree;
41  };
42}