Part of the docs-migration chore (issue #708). Remove GitHub issue numbers from inline comments, option descriptions, and rustdoc — these are contextless noise for anyone reading the code without access to the original discussions. Replace with prose that captures the same rationale directly. No functional change. Build still clean (cargo check passes).
35 lines
1.3 KiB
Nix
35 lines
1.3 KiB
Nix
{ pkgs, lib }:
|
|
# hive-forge — Forgejo CLI wrapper for hyperhive.
|
|
#
|
|
# Previously a ~600-line bash script. Rewritten as a proper Rust
|
|
# binary in `/hive-forge` so we get:
|
|
# - typed clap subcommands (`hive-forge <verb> --help` instead of
|
|
# reading the case statement),
|
|
# - one reqwest client with consistent error surfaces (no more
|
|
# `curl --fail-with-body` repeated per verb),
|
|
# - sane shell quoting (no more HEREDOC-eaten-by-positional traps),
|
|
# - and a single test surface.
|
|
#
|
|
# This Nix file is now a thin extractor: it pulls just the
|
|
# `hive-forge` binary out of the hyperhive workspace package so
|
|
# agents that already imported this file via
|
|
# `pkgs.callPackage ../packages/hive-forge-tools.nix { }` keep
|
|
# working, getting only the verb they need on PATH (not the full
|
|
# `hive-c0re` / `hive-ag3nt` / `hive-m1nd` surface).
|
|
#
|
|
# Requires the hyperhive overlay (see `flake.nix`'s `overlays.default`)
|
|
# so `pkgs.hyperhive` resolves.
|
|
let
|
|
_ = lib; # placeholder; kept so callers don't break when reading the args.
|
|
in
|
|
pkgs.runCommand "hive-forge"
|
|
{
|
|
meta = {
|
|
description = "Forgejo CLI wrapper for hyperhive (Rust)";
|
|
mainProgram = "hive-forge";
|
|
};
|
|
}
|
|
''
|
|
mkdir -p $out/bin
|
|
ln -s ${pkgs.hyperhive}/bin/hive-forge $out/bin/hive-forge
|
|
''
|