add claude-gate

This commit is contained in:
Rongsong Shen 2026-04-04 17:10:38 +08:00
parent d14037ffd6
commit 82f1a75c98
2 changed files with 47 additions and 0 deletions

View file

@ -0,0 +1,43 @@
# claude-gate
{
lib,
stdenv,
fetchFromGitHub,
pkgs,
...
}:
stdenv.mkDerivation {
pname = "claude-gate";
version = "1.0.0";
src = fetchFromGitHub {
owner = "shen390s";
repo = "claude-gate";
rev = "master";
sha256 = "sha256-StvSYsWLbGQCXpzlOaXjd7VRn/8l+u3CVIiK1nyVGqU=";
};
nativeBuildInputs = [
pkgs.go
pkgs.gcc
pkgs.gnumake
];
env = {
GOPROXY = "https://goproxy.cn";
};
buildPhase = ''
HOME=$TMPDIR
GOCACHE=$TMPDIR/gocache
GOPATH=$TMPDIR/go
export HOME GOCACHE GOPATH
make build
'';
installPhase = ''
mkdir -p $out/bin
cp claude-gate $out/bin
'';
}