Commit e50aca5650c2
tarball3 files changed+138-0
@@ -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": 727
+}@@ -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
+ let9
+ 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
+ in18
+ {19
+ packages = forAllSystems (20
+ system:21
+ let22
+ pkgs = pkgsFor system;23
+ roundabout = pkgs.callPackage ./nix/package.nix { };24
+ in25
+ {26
+ inherit roundabout;27
+ default = roundabout;28
+ plugin = pkgs.callPackage ./nix/plugin.nix { inherit roundabout; };29
+ }30
+ );31
+32
+ devShells = forAllSystems (33
+ system:34
+ let35
+ pkgs = pkgsFor system;36
+ in37
+ {38
+ default = pkgs.mkShell {39
+ packages = [40
+ pkgs.cargo41
+ pkgs.rustc42
+ pkgs.clippy43
+ pkgs.rustfmt44
+ pkgs.rust-analyzer45
+ ];46
+ env.RUST_SRC_PATH = "${pkgs.rustPlatform.rustLibSrc}";47
+ };48
+ }49
+ );50
+51
+ checks = forAllSystems (52
+ system:53
+ let54
+ pkgs = pkgsFor system;55
+ roundabout = self.packages.${system}.roundabout;56
+ in57
+ {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 preBuild65
+ cargo clippy --offline --all-targets -- -D warnings66
+ runHook postBuild67
+ '';68
+ doCheck = false;69
+ installPhase = "touch $out";70
+ });71
+ fmt =72
+ pkgs.runCommand "roundabout-fmt"73
+ {74
+ nativeBuildInputs = [75
+ pkgs.cargo76
+ pkgs.rustfmt77
+ ];78
+ }79
+ ''80
+ cd ${self}81
+ cargo fmt --check82
+ touch $out83
+ '';84
+ }85
+ );86
+ };87
+}@@ -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.toml11
+ ../Cargo.lock12
+ ../src13
+ ];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
+}