Skip to content

Commit fcb7227

Browse files
committed
push runtime closure instead
1 parent 8c62907 commit fcb7227

File tree

3 files changed

+37
-31
lines changed

3 files changed

+37
-31
lines changed

.github/workflows/nix.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,16 @@ jobs:
1010
uses: cachix/install-nix-action@v25
1111
with:
1212
nix_path: nixpkgs=channel:nixos-unstable
13-
- name: build & push
13+
- name: install cachix
1414
run: |
1515
nix profile install nixpkgs#cachix
16-
nix-build | cachix push kira
16+
- name: install jq
17+
run: |
18+
nix profile install nixpkgs#jq
19+
- name: build & push
20+
run: |
21+
nix build --json \
22+
| jq -r '.[].outputs | to_entries[].value' \
23+
| cachix push kira
1724
env:
1825
CACHIX_AUTH_TOKEN: '${{ secrets.CACHIX_AUTH_TOKEN }}'

default.nix

Lines changed: 0 additions & 28 deletions
This file was deleted.

flake.nix

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,36 @@
2424
utils.lib.eachDefaultSystem
2525
(system: let
2626
pkgs = nixpkgs.legacyPackages.${system};
27+
inherit (pkgs) buildNpmPackage;
2728
in {
2829
packages = {
29-
default = import ./default.nix {inherit pkgs;};
30+
default = buildNpmPackage {
31+
name = "iosevka-q60";
32+
33+
nativeBuildInputs = with pkgs; [
34+
ttfautohint
35+
];
36+
37+
src = ./.;
38+
39+
npmDepsHash = "sha256-TOFCTYReO7eNBv1udG1Ie3Zww3uOVPFTo0x0jwyCAHE=";
40+
41+
buildPhase = ''
42+
runHook preBuild
43+
npm run build -- ttf::IosevkaCode --jCmd=6
44+
npm run build -- ttf::IosevkaTerminal --jCmd=6
45+
runHook postBuild
46+
'';
47+
48+
installPhase = ''
49+
runHook preInstall
50+
fontdir="$out/share/fonts/truetype"
51+
install -d "$fontdir"
52+
install "dist/IosevkaCode/TTF"/* "$fontdir"
53+
install "dist/IosevkaTerminal/TTF"/* "$fontdir"
54+
runHook postInstall
55+
'';
56+
};
3057
};
3158

3259
apps.default = utils.lib.mkApp {drv = self.packages.${system}.default;};

0 commit comments

Comments
 (0)