diff --git a/flake.lock b/flake.lock deleted file mode 100644 index 14246070..00000000 --- a/flake.lock +++ /dev/null @@ -1,61 +0,0 @@ -{ - "nodes": { - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1782118813, - "narHash": "sha256-BnbXO5s5EhV89lLXMAGCzPdEN5a6vNqvMk71obeTEUw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "b3c092d3c36d91e2f61f3dfb39a159f180a56659", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/flake.nix b/flake.nix deleted file mode 100644 index dd26cc33..00000000 --- a/flake.nix +++ /dev/null @@ -1,154 +0,0 @@ -# SPDX-License-Identifier: MPL-2.0 -# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) -# -# Nix flake for Bundle of Joy Server -# -# NOTE: guix.scm is the PRIMARY development environment. This flake is provided -# as a FALLBACK for contributors who use Nix instead of Guix. The .envrc checks -# for Guix first, then falls back to Nix. -# -# Retained per standards#102 rule 3 (KEEP+DEP). guix.scm declares -# empty (native-inputs (list)) / (inputs (list)) and acknowledges -# "idris2 and zig packages may need custom channels". This flake's -# devShell is therefore the SOLE source of the language layer -# (idris2, zig, zls) and the RSR-template common dev tools (git, just, -# nickel, curl, bash, coreutils). Remove only once those packages are -# available via Guix. -# -# Usage: -# nix develop # Enter development shell -# nix build # Build the project -# nix flake check # Run checks - -{ - description = "Bundle of Joy Server — formally verified capability catalogue"; - - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - flake-utils.url = "github:numtide/flake-utils"; - }; - - outputs = { self, nixpkgs, flake-utils }: - flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" ] (system: - let - pkgs = import nixpkgs { inherit system; }; - - commonTools = with pkgs; [ - git - just - nickel - curl - bash - coreutils - ]; - - languageTools = with pkgs; [ - idris2 - zig - zls - ]; - - in - { - devShells.default = pkgs.mkShell { - name = "boj-server-dev"; - - buildInputs = commonTools ++ languageTools; - - env = { - PROJECT_NAME = "Bundle of Joy Server"; - RSR_TIER = "infrastructure"; - }; - - shellHook = '' - echo "" - echo " Bundle of Joy Server — development shell (Nix)" - echo " Idris2: $(idris2 --version 2>/dev/null | head -1 || echo 'not found')" - echo " Zig: $(zig version 2>/dev/null || echo 'not found')" - echo " Just: $(just --version 2>/dev/null || echo 'not found')" - echo "" - echo " Run 'just' to see available recipes." - echo "" - ''; - }; - - # MCP bridge package (Node.js, zero dependencies) - packages.default = pkgs.stdenv.mkDerivation { - pname = "boj-server"; - version = "0.3.1"; - src = self; - - nativeBuildInputs = with pkgs; [ nodejs makeWrapper ]; - - dontBuild = true; - - installPhase = '' - mkdir -p $out/lib/boj-server $out/bin $out/share/doc/boj-server - - # Install MCP bridge - cp -r mcp-bridge $out/lib/boj-server/ - cp gemini-extension.json $out/lib/boj-server/ 2>/dev/null || true - cp GEMINI.md $out/lib/boj-server/ 2>/dev/null || true - - # Wrapper script - makeWrapper ${pkgs.nodejs}/bin/node $out/bin/boj-server \ - --add-flags "$out/lib/boj-server/mcp-bridge/main.js" - - # Documentation - cp README.adoc $out/share/doc/boj-server/ 2>/dev/null || true - cp CHANGELOG.md $out/share/doc/boj-server/ 2>/dev/null || true - cp docs/quickstarts/BUILD-FROM-SOURCE.adoc $out/share/doc/boj-server/ 2>/dev/null || true - ''; - - meta = with pkgs.lib; { - description = "Bundle of Joy — cartridge-based MCP server with 53 formally verified domain cartridges"; - homepage = "https://github.com/hyperpolymath/boj-server"; - license = licenses.mpl20; # MPL-2.0 extends MPL-2.0 - mainProgram = "boj-server"; - maintainers = []; - platforms = [ "x86_64-linux" "aarch64-linux" ]; - }; - }; - - # Full build with Zig FFI (for contributors/developers) - packages.full = pkgs.stdenv.mkDerivation { - pname = "boj-server-full"; - version = "0.3.1"; - src = self; - - nativeBuildInputs = with pkgs; [ zig nodejs makeWrapper ]; - - buildPhase = '' - cd ffi/zig && zig build -Doptimize=ReleaseSafe - ''; - - installPhase = '' - mkdir -p $out/lib/boj-server $out/bin $out/share/doc/boj-server - - # Install MCP bridge - cp -r mcp-bridge $out/lib/boj-server/ - - # Install FFI shared libraries - mkdir -p $out/lib/boj-server/ffi - cp ffi/zig/zig-out/lib/*.so $out/lib/boj-server/ffi/ 2>/dev/null || true - - # Wrapper script - makeWrapper ${pkgs.nodejs}/bin/node $out/bin/boj-server \ - --add-flags "$out/lib/boj-server/mcp-bridge/main.js" \ - --set LD_LIBRARY_PATH "$out/lib/boj-server/ffi" - - cp README.adoc $out/share/doc/boj-server/ 2>/dev/null || true - ''; - - meta = with pkgs.lib; { - description = "Bundle of Joy — full build with Zig FFI shared libraries"; - homepage = "https://github.com/hyperpolymath/boj-server"; - license = licenses.mpl20; # MPL-2.0 extends MPL-2.0 - mainProgram = "boj-server"; - maintainers = []; - platforms = [ "x86_64-linux" "aarch64-linux" ]; - }; - }; - } - ); -}