Files
t3code-flake/flake.nix
T
unexplrd f31880051d Make desktop the default flake package
- Export `t3code-desktop` on all systems
- Switch `default` package and app to the desktop build
- Keep server package and app available
2026-04-24 20:19:01 +03:00

58 lines
1.3 KiB
Nix

{
description = "T3 Code packages for Nix";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
t3code = {
url = "github:pingdotgg/t3code";
flake = false;
};
};
outputs = {
self,
nixpkgs,
t3code,
...
}: let
lib = nixpkgs.lib;
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forAllSystems = lib.genAttrs systems;
in {
packages = forAllSystems (
system: let
pkgs = import nixpkgs {inherit system;};
t3code-server = pkgs.callPackage ./packages/server {src = t3code;};
t3code-desktop = pkgs.callPackage ./packages/desktop {src = t3code;};
in {
inherit t3code-server t3code-desktop;
default = t3code-desktop;
}
);
apps = forAllSystems (system: rec {
t3code-server = {
type = "app";
program = "${self.packages.${system}.t3code-server}/bin/t3";
};
t3code-desktop = {
type = "app";
program = "${self.packages.${system}.t3code-desktop}/bin/t3code-desktop";
};
default = t3code-desktop;
});
checks = forAllSystems (
system: {
t3code-server = self.packages.${system}.t3code-server;
t3code-desktop = self.packages.${system}.t3code-desktop;
}
);
};
}