diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml index 8f64bbc8..2095b3ef 100644 --- a/.github/workflows/nix.yml +++ b/.github/workflows/nix.yml @@ -2,10 +2,10 @@ name: 📦 Nix Build on: push: - branches: [ main ] + branches: [main] pull_request: - branches: [ '**' ] + branches: ["**"] concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -55,3 +55,4 @@ jobs: run: | nix develop --show-trace -c irust --version nix develop --show-trace -c rustc --version + nix build . && ./result/bin/homestar --version diff --git a/.gitignore b/.gitignore index 3972eb8f..0b74cf8d 100644 --- a/.gitignore +++ b/.gitignore @@ -51,3 +51,6 @@ examples/**/tmp/* !examples/**/**/.env.example !examples/**/tmp/.gitkeep + +# nix build results +/result diff --git a/examples/websocket-relay/README.md b/examples/websocket-relay/README.md index bc5c4597..a89cafaa 100644 --- a/examples/websocket-relay/README.md +++ b/examples/websocket-relay/README.md @@ -6,7 +6,7 @@ An example application that connects to a `homestar-runtime` node over a websocket connection in order to run static Wasm-based, image processing workflows that chain inputs and outputs using [inlined promises][pipelines]. - + This application demonstrates: * websocket notifications of [UCAN Invocation Receipts][spec-receipts] sent diff --git a/flake.nix b/flake.nix index 1b4fe582..bbd189f4 100644 --- a/flake.nix +++ b/flake.nix @@ -234,8 +234,7 @@ wasmTest wasmAdd ]; - in rec - { + in { devShells.default = pkgs.mkShell { name = "homestar"; nativeBuildInputs = with pkgs; @@ -297,6 +296,25 @@ cargoSha256 = "sha256-FmsD3ajMqpPrTkXCX2anC+cmm0a2xuP+3FHqzj56Ma4="; }; + packages.default = + pkgs.rustPlatform.buildRustPackage + { + name = "homestar"; + src = ./.; + cargoLock = { + lockFile = ./Cargo.lock; + }; + buildInputs = with pkgs; + [rust-toolchain] + ++ lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.Security + darwin.apple_sdk.frameworks.CoreFoundation + darwin.apple_sdk.frameworks.Foundation + ]; + + doCheck = false; + }; + formatter = pkgs.alejandra; } );