aboutsummaryrefslogtreecommitdiff
path: root/default.nix
blob: ec38017441c0df09ac26195e5c56220ae1d8e723 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
let 
  pkgs = import <nixpkgs> {};
in
  with pkgs;
  stdenv.mkDerivation rec {
    name = "scientifica";
    version = "v2.1";
    src = ./src;
    buildInputs = [ fontforge python3 xorg.mkfontdir ];

    buildPhase = ''
      for i in ./*; do
          fontforge -c 'open(argv[1]).generate(argv[2])' $i $i.otb
      done
      '';
    installPhase = ''
      fontDir="$out/share/fonts/misc"
      install -m 644 -D *.otb out/* -t "$fontDir"
      mkfontdir "$fontDir"
      '';
  }