# Worker CLI Nix Package # # This package installs the worker CLI binary from a release tarball. # See docs/releasing-worker.md for how to create releases. # # To use: # 1. Copy this to dotfiles/pkgs/worker/default.nix # 2. Update the URL to point to your release location # 3. Update the sha256 hash (use nix-prefetch-url --unpack ) # 4. Add to your system/home configuration { lib , stdenvNoCC , fetchzip , fetchurl , autoPatchelfHook , stdenv }: stdenvNoCC.mkDerivation (finalAttrs: { pname = "worker"; version = "0.1.0"; # Option 1: Fetch from GitHub releases (when available) # src = fetchzip { # url = "https://github.com/OWNER/skills/releases/download/worker-v${finalAttrs.version}/worker_${finalAttrs.version}_linux_amd64.tar.gz"; # sha256 = lib.fakeHash; # Replace after first build attempt # stripRoot = false; # }; # Option 2: Fetch from local/private git forge # src = fetchzip { # url = "https://git.example.com/releases/worker_${finalAttrs.version}_linux_amd64.tar.gz"; # sha256 = lib.fakeHash; # stripRoot = false; # }; # Option 3: Local file (for testing) src = fetchurl { url = "file:///home/dan/proj/skills/releases/worker_${finalAttrs.version}_linux_amd64.tar.gz"; sha256 = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="; # Will fail, get real hash from error }; sourceRoot = "."; nativeBuildInputs = [ autoPatchelfHook ]; buildInputs = [ stdenv.cc.cc.lib # libstdc++ ]; dontConfigure = true; dontBuild = true; dontStrip = true; installPhase = '' runHook preInstall install -Dm755 worker $out/bin/worker runHook postInstall ''; meta = with lib; { description = "Multi-agent worker coordination CLI for HQ orchestration"; homepage = "https://github.com/OWNER/skills"; license = licenses.mit; maintainers = [ ]; platforms = [ "x86_64-linux" ]; mainProgram = "worker"; sourceProvenance = with sourceTypes; [ binaryNativeCode ]; }; })