diff options
author | Akshay <[email protected]> | 2020-10-07 05:50:39 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2020-10-07 05:50:39 +0100 |
commit | 67a5885d54fed9580b6ceee321f4077e7ac431fb (patch) | |
tree | 44e1fe5b6bc6428a5c08bd78b0e789bb29f71c01 /default.nix | |
parent | dfefca5d9bf49b08e1ac24c8820922e0bd89f9d6 (diff) |
add nix build instructions
Diffstat (limited to 'default.nix')
-rw-r--r-- | default.nix | 23 |
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 @@ | |||
1 | let | ||
2 | pkgs = import <nixpkgs> {}; | ||
3 | in | ||
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 | |||