atagen

roundabout

public
Star0
Watch0

Commit e50aca5650c2

tarball

atagen <boss@atagen.co>2026-09-27 03:59 UTC

3 files changed+138-0
nix: flake with package, plugin marketplace and checks
Added file: flake.lock+27 additions
@@ -0,0 +1,27 @@
1+{
2+ "nodes": {
3+ "nixpkgs": {
4+ "locked": {
5+ "lastModified": 1790323409,
6+ "narHash": "sha256-VVTPf+Hyd5ebpjBMHmrLMSBIeW6ls48Bqtosj7CNKLA=",
7+ "owner": "NixOS",
8+ "repo": "nixpkgs",
9+ "rev": "e94cb152ed51bd6e24eb4a41f1460252beb52cd2",
10+ "type": "github"
11+ },
12+ "original": {
13+ "owner": "NixOS",
14+ "ref": "nixos-unstable",
15+ "repo": "nixpkgs",
16+ "type": "github"
17+ }
18+ },
19+ "root": {
20+ "inputs": {
21+ "nixpkgs": "nixpkgs"
22+ }
23+ }
24+ },
25+ "root": "root",
26+ "version": 7
27+}
Added file: flake.nix+87 additions
@@ -0,0 +1,87 @@
1+{
2+ description = "one build at a time, please";
3+
4+ inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
5+
6+ outputs =
7+ { self, nixpkgs }:
8+ let
9+ inherit (nixpkgs) lib;
10+ forAllSystems = lib.genAttrs [
11+ "x86_64-linux"
12+ "aarch64-linux"
13+ "x86_64-darwin"
14+ "aarch64-darwin"
15+ ];
16+ pkgsFor = system: nixpkgs.legacyPackages.${system};
17+ in
18+ {
19+ packages = forAllSystems (
20+ system:
21+ let
22+ pkgs = pkgsFor system;
23+ roundabout = pkgs.callPackage ./nix/package.nix { };
24+ in
25+ {
26+ inherit roundabout;
27+ default = roundabout;
28+ plugin = pkgs.callPackage ./nix/plugin.nix { inherit roundabout; };
29+ }
30+ );
31+
32+ devShells = forAllSystems (
33+ system:
34+ let
35+ pkgs = pkgsFor system;
36+ in
37+ {
38+ default = pkgs.mkShell {
39+ packages = [
40+ pkgs.cargo
41+ pkgs.rustc
42+ pkgs.clippy
43+ pkgs.rustfmt
44+ pkgs.rust-analyzer
45+ ];
46+ env.RUST_SRC_PATH = "${pkgs.rustPlatform.rustLibSrc}";
47+ };
48+ }
49+ );
50+
51+ checks = forAllSystems (
52+ system:
53+ let
54+ pkgs = pkgsFor system;
55+ roundabout = self.packages.${system}.roundabout;
56+ in
57+ {
58+ inherit roundabout;
59+ plugin = self.packages.${system}.plugin;
60+ clippy = roundabout.overrideAttrs (old: {
61+ pname = "roundabout-clippy";
62+ nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.clippy ];
63+ buildPhase = ''
64+ runHook preBuild
65+ cargo clippy --offline --all-targets -- -D warnings
66+ runHook postBuild
67+ '';
68+ doCheck = false;
69+ installPhase = "touch $out";
70+ });
71+ fmt =
72+ pkgs.runCommand "roundabout-fmt"
73+ {
74+ nativeBuildInputs = [
75+ pkgs.cargo
76+ pkgs.rustfmt
77+ ];
78+ }
79+ ''
80+ cd ${self}
81+ cargo fmt --check
82+ touch $out
83+ '';
84+ }
85+ );
86+ };
87+}
Added file: nix/package.nix+24 additions
@@ -0,0 +1,24 @@
1+{ lib, rustPlatform }:
2+
3+rustPlatform.buildRustPackage {
4+ pname = "roundabout";
5+ version = (lib.importTOML ../Cargo.toml).package.version;
6+
7+ src = lib.fileset.toSource {
8+ root = ../.;
9+ fileset = lib.fileset.unions [
10+ ../Cargo.toml
11+ ../Cargo.lock
12+ ../src
13+ ];
14+ };
15+
16+ cargoLock.lockFile = ../Cargo.lock;
17+
18+ meta = {
19+ description = "build admission for agents that can't share";
20+ mainProgram = "rabt";
21+ license = lib.licenses.eupl12;
22+ platforms = lib.platforms.unix;
23+ };
24+}