38 lines
1.3 KiB
Nix
38 lines
1.3 KiB
Nix
{
|
|
description = "Tabellarius: end-to-end encrypted message relay and client library";
|
|
|
|
# nixpkgs is pinned by flake.lock; a floating input would make two builds differ.
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
outputs = { self, nixpkgs }:
|
|
let
|
|
systems = [ "x86_64-linux" "aarch64-linux" ];
|
|
forAll = f: nixpkgs.lib.genAttrs systems (system: f nixpkgs.legacyPackages.${system});
|
|
in
|
|
{
|
|
packages = forAll (pkgs: {
|
|
default = pkgs.rustPlatform.buildRustPackage {
|
|
pname = "tabellarius";
|
|
version = "0.0.0";
|
|
src = pkgs.lib.cleanSource ./.;
|
|
cargoLock.lockFile = ./Cargo.lock;
|
|
doCheck = true;
|
|
meta.license = pkgs.lib.licenses.cpal10;
|
|
};
|
|
});
|
|
|
|
# The relay on NixOS: loopback only, behind Caddy with TLS and no logs (deploy/nixos).
|
|
nixosModules.default = import ./deploy/nixos/module.nix { inherit self; };
|
|
|
|
# A VM test that the server keeps no client address anywhere (needs Linux and KVM).
|
|
checks.x86_64-linux.relay-keeps-no-address =
|
|
import ./deploy/nixos/test.nix { inherit self; pkgs = nixpkgs.legacyPackages.x86_64-linux; };
|
|
|
|
devShells = forAll (pkgs: {
|
|
default = pkgs.mkShell {
|
|
packages = with pkgs; [ cargo rustc clippy rustfmt ];
|
|
};
|
|
});
|
|
};
|
|
}
|