-
Notifications
You must be signed in to change notification settings - Fork 104
Expand file tree
/
Copy pathflake.nix
More file actions
48 lines (41 loc) · 1.15 KB
/
flake.nix
File metadata and controls
48 lines (41 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{
description = "ghostty-web - Web terminal using Ghostty's VT100 parser via WASM";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
zig-overlay.url = "github:mitchellh/zig-overlay";
};
outputs = { self, nixpkgs, flake-utils, zig-overlay }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ zig-overlay.overlays.default ];
};
zig = pkgs.zigpkgs."0.15.2";
in {
devShells.default = pkgs.mkShell {
buildInputs = [
pkgs.bun
pkgs.nodejs_22
zig
];
};
packages.default = pkgs.stdenv.mkDerivation {
pname = "ghostty-web";
version = "0.3.0";
src = ./.;
nativeBuildInputs = [ pkgs.bun pkgs.nodejs_22 ];
buildPhase = ''
export HOME=$TMPDIR
bun install --frozen-lockfile
bun run build
'';
installPhase = ''
mkdir -p $out
cp -r dist/* $out/
'';
};
}
);
}