Skip to content

Commit

Permalink
WIP: flake
Browse files Browse the repository at this point in the history
  • Loading branch information
awnion committed Sep 30, 2024
1 parent c9f3538 commit 1222848
Show file tree
Hide file tree
Showing 3 changed files with 131 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@

_output
_output.*
result
78 changes: 78 additions & 0 deletions flake.lock

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

52 changes: 52 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
description = "A flake for building afio font";

inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";

font_src = {
url = "github:be5invis/Iosevka?shallow=1";
flake = false;
};

# font_config = {
# url = "./private-build-plans.toml";
# flake = false;
# };
};

outputs = { self, nixpkgs, flake-utils, font_src, ... }@inputs: flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
packages = rec {
default = pkgs.stdenv.mkDerivation {
name = "afio";
buildInputs = with pkgs; [
qt5.qmake
qt5.qtbase
cacert
ttfautohint
nodejs
nodePackages.pnpm
];

src = font_src;

buildPhase = ''
cp -v ${./private-build-plans.toml} private-build-plans.toml
pnpm i
npm run build -- ttf::afio
'';
installPhase = ''
mkdir -p $out/
ls -la > $out/ls.txt
cp -avL dist/*/ttf/* $out
'';
};
};
});
}

0 comments on commit 1222848

Please sign in to comment.