21a137680a
- Move shared Node module setup into `packages/common.nix` - Rename package entrypoints under `packages/server` and `packages/desktop` - Update flake outputs to expose `t3code-server` as the default
63 lines
1.4 KiB
Nix
63 lines
1.4 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;};
|
|
in
|
|
{
|
|
inherit t3code-server;
|
|
default = t3code-server;
|
|
}
|
|
// lib.optionalAttrs (system == "x86_64-linux") {
|
|
t3code-desktop = pkgs.callPackage ./packages/desktop {src = t3code;};
|
|
}
|
|
);
|
|
|
|
apps = forAllSystems (system: {
|
|
default = {
|
|
type = "app";
|
|
program = "${self.packages.${system}.t3code-server}/bin/t3";
|
|
};
|
|
t3code-server = {
|
|
type = "app";
|
|
program = "${self.packages.${system}.t3code-server}/bin/t3";
|
|
};
|
|
});
|
|
|
|
checks = forAllSystems (
|
|
system:
|
|
{
|
|
t3code-server = self.packages.${system}.t3code-server;
|
|
}
|
|
// lib.optionalAttrs (system == "x86_64-linux") {
|
|
t3code-desktop = self.packages.${system}.t3code-desktop;
|
|
}
|
|
);
|
|
};
|
|
}
|