Skip to content

Commit

Permalink
huge configing
Browse files Browse the repository at this point in the history
  • Loading branch information
molarmanful committed Jan 14, 2025
1 parent 4878e89 commit d92ba40
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 44 deletions.
19 changes: 19 additions & 0 deletions bited-build.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[kirsch]
xs = [2, 3]
zip_includes = ["README.md", "LICENSE", "AUTHORS"]
x_format = "{name}_{x}x"
sfnt_lang = "English (US)"
ttfix = '''
f.os2_version = 4
f.os2_vendor = "BenP"
f.os2_panose = (2, 0, 6, 9, 0, 0, 0, 0, 0, 0)
f.os2_weight_width_slope_only = True
'''

[kirsch.sfnt]
"UniqueID" = "molarmanful: kirsch: 2024"
"Vendor URL" = "https://github.com/molarmanful/kirsch"
"Designer" = "Benjamin Pang"
"Designer URL" = "https://benpa.ng"
"License" = "This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is available with a FAQ at: https://scripts.sil.org/OFL"
"License URL" = "https://scripts.sil.org/OFL"
21 changes: 21 additions & 0 deletions bited-img.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
font_size = 16
bg = "#1F0318"
fg = "#86CB92"

[gens]
sample = [
"prog",
"eng",
"multi",
"scala",
"clojure",
"go",
"svelte",
"apl",
"engalt",
"pretty",
"math",
"box",
"braille"
]
all = [ "header", "sample" ]
20 changes: 0 additions & 20 deletions bited-img.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
pname ? "kirsch",
version,
bdf,
cfg ? "",
nerd ? false,
release ? false,

Expand All @@ -18,7 +18,7 @@ stdenvNoCC.mkDerivation {
buildPhase = ''
runHook preBuild
rm -rf out
${bited-build}/bin/bited-build ${bdf} out \
${bited-build}/bin/bited-build ${cfg} out \
${lib.optionalString nerd "--nerd"} \
${lib.optionalString release "--release"}
runHook postBuild
Expand Down
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 33 additions & 16 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

outputs =
{
self,
nixpkgs,
utils,
bited-utils,
Expand All @@ -18,21 +19,15 @@
let
name = "kirsch";
version = builtins.readFile ./VERSION;
bdf = "src/kirsch.bdf";
in

utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ bited-utils.overlay ];
};
build = o: pkgs.callPackage ./. ({ inherit version bdf; } // o);
in
{

packages = rec {
{
overlays =
final: prev:
let
build = o: final.callPackage ./. ({ inherit version; } // o);
in
{
kirsch = build { pname = name; };
kirsch-nerd = build {
pname = "${name}-nerd";
Expand All @@ -43,11 +38,33 @@
nerd = true;
release = true;
};
kirsch-img = pkgs.callPackage ./img.nix {
inherit bdf;
kirsch-img = final.callPackage ./img.nix {
name = "${name}-img";
};
default = kirsch;
};
}

// utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [
bited-utils.overlay
self.overlay
];
};
in
{

packages = {
inherit (pkgs)
kirsch
kirsch-nerd
kirsch-release
kirsch-img
;
default = pkgs.kirsch;
};

devShell = pkgs.mkShell {
Expand Down

0 comments on commit d92ba40

Please sign in to comment.