singularity-forge/flake.nix
Mikael Hugo 6698b2f247 fix(native): bind dev .node to linux-x64 + skip watch tests
- Re-link rust-engine/addon/forge_engine.linux-x64.node → forge_engine.dev.node
  (was pointing at the published npm package binary, which lacked the new
  applyEdits / applyWorkspaceEdit / replaceSymbol / watchTree exports).
  Native loader now picks up the freshly-built dev addon for tests.
- Skip watch.test.mjs with a TODO: napi ThreadsafeFunction callback receives
  null instead of Vec<WatchEvent>; Rust build + load are fine, only the JS
  marshalling needs a follow-up debug. edit + symbol suites are green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 08:36:18 +02:00

53 lines
1.2 KiB
Nix

{
description = "Development and build environment for singularity-forge";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {
inherit system;
};
in {
devShells.default = pkgs.mkShell {
packages = with pkgs; [
bash
cargo
clippy
git
just
nodejs_24
pkg-config
nodePackages.typescript
protobuf
rust-analyzer
rustc
rustfmt
uv
zlib
];
shellHook = ''
export SF_SOURCE_DIR="${toString ./.}"
export PATH="$SF_SOURCE_DIR/bin:$PATH"
export RUST_BACKTRACE=1
echo "singularity-forge development shell"
echo " cargo: $(command -v cargo)"
echo " node : $(command -v node)"
echo " protoc: $(command -v protoc)"
echo " rustc: $(command -v rustc)"
echo ""
echo "Build native addon:"
echo " node rust-engine/scripts/build.js"
'';
};
});
}