Skip to content

Commit

Permalink
WIP: flake
Browse files Browse the repository at this point in the history
update nix
  • Loading branch information
awnion committed Oct 15, 2024
1 parent 6da59e9 commit f9b5bcf
Show file tree
Hide file tree
Showing 3 changed files with 132 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ insert_final_newline = true
[*.y{,a}ml]
indent_size = 2

[.nix]
[*.nix]
indent_size = 2
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.

53 changes: 53 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
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;
};
};

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
curl
cacert
ttfautohint-nox
nodejs_22
nodePackages.npm
gnutar

# nodePackages.pnpm
];

src = font_src;

buildPhase = ''
cp -v ${./private-build-plans.toml} private-build-plans.toml
npm install 2>&1 > /dev/null
npm run build -- ttf::afio
'';
installPhase = ''
mkdir -p $out/
mkdir -p $out/share
cp -r * $out/share/
ls -la > $out/ls.txt
# cp -avL dist/*/ttf/* $out
'';
};
};
});
}

0 comments on commit f9b5bcf

Please sign in to comment.