Repository navigation
Expand file tree
/
Copy pathflake.nix
More file actions
71 lines (63 loc) · 1.82 KB
/
Copy pathflake.nix
File metadata and controls
71 lines (63 loc) · 1.82 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{
description = "Share a terminal in the browser";
nixConfig = {
extra-substituters = [ "https://shuymn.cachix.org" ];
extra-trusted-public-keys = [ "shuymn.cachix.org-1:bUcNU5/B3gNbM7htHCYmKVVb1bUwNx2vc2W4aOJlloQ=" ];
};
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
# libghostty-vt, at the commit scripts/libghostty-vt.sh builds (`make lint` checks it).
ghostty = {
url = "github:ghostty-org/ghostty/f54340ad77814fe319d136e5e915d6a48de8dd23";
flake = false;
};
};
outputs =
{
self,
nixpkgs,
ghostty,
}:
let
# nixpkgs-unstable no longer supports x86_64-darwin.
systems = [
"x86_64-linux"
"aarch64-linux"
"aarch64-darwin"
];
forAllSystems = nixpkgs.lib.genAttrs systems;
pkgsFor = system: nixpkgs.legacyPackages.${system};
in
{
packages = forAllSystems (
system:
let
pkgs = pkgsFor system;
kastty = pkgs.callPackage ./nix/package.nix {
bun = pkgs.callPackage ./nix/bun.nix { };
commit = self.rev or "";
libghostty-vt = pkgs.callPackage "${ghostty}/nix/libghostty-vt.nix" {
optimize = "ReleaseFast";
revision = ghostty.shortRev;
};
};
in
{
inherit kastty;
default = kastty;
}
);
apps = forAllSystems (system: {
kastty = {
type = "app";
program = "${self.packages.${system}.kastty}/bin/kastty";
meta.description = "Run kastty";
};
default = self.apps.${system}.kastty;
});
checks = forAllSystems (system: {
package = self.packages.${system}.kastty;
});
formatter = forAllSystems (system: (pkgsFor system).nixfmt);
};
}