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 | |
parent | dfefca5d9bf49b08e1ac24c8820922e0bd89f9d6 (diff) |
add nix build instructions
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | default.nix | 23 | ||||
-rw-r--r-- | shell.nix | 6 |
3 files changed, 31 insertions, 0 deletions
@@ -8,3 +8,5 @@ build/ | |||
8 | 8 | ||
9 | # ttf converter binary | 9 | # ttf converter binary |
10 | BitsNPicas.jar | 10 | BitsNPicas.jar |
11 | .envrc | ||
12 | result | ||
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 | |||
diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..850aa8d --- /dev/null +++ b/shell.nix | |||
@@ -0,0 +1,6 @@ | |||
1 | { pkgs ? import <nixpkgs> {} }: | ||
2 | |||
3 | with pkgs; | ||
4 | mkShell { | ||
5 | buildInputs = [ fontforge python3 xorg.mkfontdir ]; | ||
6 | } | ||