aboutsummaryrefslogtreecommitdiff
path: root/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix23
1 files changed, 23 insertions, 0 deletions
diff --git a/default.nix b/default.nix
new file mode 100644
index 0000000..e9cf4fe
--- /dev/null
+++ b/default.nix
@@ -0,0 +1,23 @@
1let
2 pkgs = import <nixpkgs> {};
3in
4 with pkgs;
5 stdenv.mkDerivation rec {
6 name = "scientifica";
7 version = "v0.1.0";
8 src = ./src;
9 buildInputs = [ fontforge python3 xorg.mkfontdir ];
10
11 buildPhase = ''
12 for i in ./*; do
13 fontforge -c 'open(argv[1]).generate(argv[2])' $i $i.otb
14 done
15 '';
16 installPhase = ''
17 fontDir="$out/share/fonts/misc"
18 install -m 644 -D *.otb out/* -t "$fontDir"
19 mkfontdir "$fontDir"
20 '';
21 }
22
23