aboutsummaryrefslogtreecommitdiff
path: root/default.nix
blob: e9cf4fecf670ea8a8001dd0797f3afa6ef246d17 (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 = "v0.1.0";
    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"
      '';
  }