push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "2fa";
version = "1.2.0";
src = fetchFromGitHub {
owner = "rsc";
repo = "2fa";
rev = "v${version}";
sha256 = "sha256-cB5iADZwvJQwwK1GockE2uicFlqFMEAY6xyeXF5lnUY=";
};
deleteVendor = true;
vendorHash = "sha256-4h/+ZNxlJPYY0Kyu2vDE1pDXxC/kGE5JdnagWVOGzAE=";
ldflags = [
"-s"
"-w"
];
meta = with lib; {
homepage = "https://rsc.io/2fa";
description = "Two-factor authentication on the command line";
mainProgram = "2fa";
license = licenses.bsd3;
maintainers = with maintainers; [ rvolosatovs ];
};
}

View File

@@ -0,0 +1,31 @@
{
buildGoModule,
fetchFromGitHub,
lib,
}:
buildGoModule rec {
pname = "go-audit";
version = "1.2.0";
src = fetchFromGitHub {
owner = "slackhq";
repo = "go-audit";
rev = "v${version}";
sha256 = "sha256-Li/bMgl/wj9bHpXW5gwWvb7BvyBPzeLCP979J2kyRCM=";
};
vendorHash = "sha256-JHimXGsUMAQqCutREsmtgDIf6Vda+it0IL3AfS86omU=";
# Tests need network access
doCheck = false;
meta = with lib; {
description = "Alternative to the auditd daemon";
homepage = "https://github.com/slackhq/go-audit";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
platforms = platforms.linux;
mainProgram = "go-audit";
};
}

View File

@@ -0,0 +1,31 @@
{
buildGoModule,
fetchFromGitHub,
lib,
}:
buildGoModule {
pname = "go-autoconfig";
version = "unstable-2022-08-03";
src = fetchFromGitHub {
owner = "L11R";
repo = "go-autoconfig";
rev = "b1b182202da82cc881dccd715564853395d4f76a";
sha256 = "sha256-Rbg6Ghp5NdcLSLSIhwwFFMKmZPWsboDyHCG6ePqSSZA=";
};
vendorHash = "sha256-pI2iucrt7XLLZNOz364kOEulXxPdvJp92OewqnkQEO4=";
postInstall = ''
cp -r templates $out/
'';
meta = with lib; {
description = "IMAP/SMTP autodiscover feature for Thunderbird, Apple Mail and Microsoft Outlook";
homepage = "https://github.com/L11R/go-autoconfig";
license = licenses.mit;
maintainers = with maintainers; [ onny ];
mainProgram = "go-autoconfig";
};
}

View File

@@ -0,0 +1,76 @@
{
lib,
buildGoModule,
fetchFromGitea,
# asset compression
brotli,
zopfli,
# wasm compilation
clang,
tinygo,
}:
buildGoModule (finalAttrs: {
pname = "go-away";
version = "0.7.0";
src = fetchFromGitea {
domain = "git.gammaspectra.live";
owner = "git";
repo = "go-away";
tag = "v${finalAttrs.version}";
hash = "sha256-5rcuR3ke+BSgYJQbJhqQmDgjrtj6jt1Q18eLkRpp8wE=";
};
vendorHash = "sha256-DOAJrQlh+5gfxKIBbf5rEYt+hZ0luNkX4MxtwNoLiKo=";
nativeBuildInputs = [
# build-compress.sh
brotli
zopfli
# build-wasm.sh
clang
tinygo
];
postPatch = ''
patchShebangs *.sh
'';
preBuild = ''
./build-compress.sh
# build-wasm.sh
export HOME=$(mktemp -d)
go generate -v ./...
'';
subPackages = [
"cmd/go-away"
];
postInstall = ''
mkdir -p $out/lib/go-away
cp -rv examples/snippets $out/lib/go-away/
'';
meta = {
changelog = "https://git.gammaspectra.live/git/go-away/releases/tag/${finalAttrs.src.tag}";
description = "Self-hosted abuse detection and rule enforcement against low-effort mass AI scraping and bots";
longDescription = ''
go-away sits in between your site and the Internet / upstream proxy.
Incoming requests can be selected by rules to be actioned or challenged to filter suspicious requests.
The tool is designed highly flexible so the operator can minimize impact to legit users, while surgically targeting heavy endpoints or scrapers.
Challenges can be transparent (not shown to user, depends on backend or other logic), non-JavaScript (challenges common browser properties), or custom JavaScript (from Proof of Work to fingerprinting or Captcha is supported)
'';
homepage = "https://git.gammaspectra.live/git/go-away";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ hexa ];
};
})

View File

@@ -0,0 +1,29 @@
{
buildGoModule,
fetchFromSourcehut,
lib,
}:
buildGoModule {
pname = "go-bare";
version = "0-unstable-2021-04-06";
src = fetchFromSourcehut {
owner = "~sircmpwn";
repo = "go-bare";
rev = "ab86bc2846d997bc8760fdb0d06d4a55e746b1db";
hash = "sha256-SKTYDKidB1Ia3Jg4EBg5rPAtqlXAa19RY5qieS82A34=";
};
vendorHash = "sha256-OhJb/q1XJ/U/AvCcCXw2Ll86UKlkHGuURHS5J6aXNTs=";
subPackages = [ "cmd/gen" ];
meta = with lib; {
description = "Implementation of the BARE message format for Go";
mainProgram = "gen";
homepage = "https://git.sr.ht/~sircmpwn/go-bare";
license = licenses.asl20;
maintainers = with maintainers; [ poptart ];
};
}

View File

@@ -0,0 +1,31 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule {
pname = "go-bindata-assetfs";
version = "unstable-2022-04-12";
src = fetchFromGitHub {
owner = "elazarl";
repo = "go-bindata-assetfs";
rev = "de3be3ce9537d87338bf26ac211d02d4fa568bb8";
hash = "sha256-yQgIaTl06nmIu8BfmQzrvEnlPQ2GQ/2nnvTmYXCL1oI=";
};
vendorHash = null;
ldflags = [
"-s"
"-w"
];
meta = with lib; {
description = "Serve embedded files from jteeuwen/go-bindata";
mainProgram = "go-bindata-assetfs";
license = licenses.bsd2;
maintainers = with maintainers; [ avnik ];
};
}

View File

@@ -0,0 +1,35 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "go-bindata";
version = "4.0.2";
src = fetchFromGitHub {
owner = "kevinburke";
repo = "go-bindata";
rev = "v${version}";
hash = "sha256-3/1RqJrv1fsPKsZpurp2dHsMg8FJBcFlI/pwwCf5H6E=";
};
vendorHash = null;
subPackages = [ "go-bindata" ];
ldflags = [
"-s"
"-w"
];
meta = {
homepage = "https://github.com/kevinburke/go-bindata";
changelog = "https://github.com/kevinburke/go-bindata/blob/v${version}/CHANGELOG.md";
description = "Small utility which generates Go code from any file, useful for embedding binary data in a Go program";
mainProgram = "go-bindata";
maintainers = [ ];
license = lib.licenses.cc0;
};
}

View File

@@ -0,0 +1,48 @@
{
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
versionCheckHook,
stdenv,
}:
buildGoModule rec {
pname = "go-blueprint";
version = "0.10.11";
src = fetchFromGitHub {
owner = "Melkeydev";
repo = "go-blueprint";
rev = "v${version}";
hash = "sha256-ahvSCu4bqzPmscHSQmaxhbUtlEL7T0T/13RY2sIGWjA=";
};
ldflags = [
"-s -w -X github.com/melkeydev/go-blueprint/cmd.GoBlueprintVersion=v${version}"
];
vendorHash = "sha256-WBzToupC1/O70OYHbKk7S73OEe7XRLAAbY5NoLL7xvw=";
nativeBuildInputs = [ installShellFiles ];
nativeInstallCheckInputs = [
versionCheckHook
];
doInstallCheck = true;
versionCheckProgramArg = "version";
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd go-blueprint \
--bash <($out/bin/go-blueprint completion bash) \
--fish <($out/bin/go-blueprint completion fish) \
--zsh <($out/bin/go-blueprint completion zsh)
'';
meta = {
description = "Initialize Go projects using popular frameworks";
homepage = "https://github.com/Melkeydev/go-blueprint";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ tobifroe ];
mainProgram = "go-blueprint";
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "go-callvis";
version = "0.7.1";
src = fetchFromGitHub {
owner = "ofabry";
repo = "go-callvis";
rev = "v${version}";
hash = "sha256-gCQjxJH03QAg6MZx5NJUJR6tKP02ThIa5BGN6A/0ejM=";
};
vendorHash = "sha256-IS8lkDBy7Y/qAaDxmWRfrVQEF9OFo7VofqSNgNTEQQw=";
ldflags = [
"-s"
"-w"
];
# Build errors in github.com/goccy/go-graphviz/internal/ccall when format hardening is enabled:
# cc1: error: '-Wformat-security' ignored without '-Wformat' [-Werror=format-security]
hardeningDisable = [ "format" ];
meta = with lib; {
description = "Visualize call graph of a Go program using Graphviz";
mainProgram = "go-callvis";
homepage = "https://github.com/ofabry/go-callvis";
license = licenses.mit;
maintainers = with maintainers; [ meain ];
};
}

View File

@@ -0,0 +1,59 @@
{
lib,
buildGo125Module,
fetchFromGitHub,
installShellFiles,
nixosTests,
scdoc,
}:
buildGo125Module rec {
pname = "go-camo";
version = "2.7.0";
src = fetchFromGitHub {
owner = "cactus";
repo = "go-camo";
tag = "v${version}";
hash = "sha256-CuEnJcbLcehmAj+TCx3VbRLWhYhbzYaXfV6qweuoooA=";
};
vendorHash = "sha256-3Yl0x02KcYG5+FVuON54NlO+ehvgvywep4Hu9sQ6nN4=";
nativeBuildInputs = [
installShellFiles
scdoc
];
ldflags = [
"-s"
"-w"
"-X=main.ServerVersion=${version}"
];
postBuild = ''
make man
'';
postInstall = ''
installManPage build/man/*
'';
preCheck = ''
# requires network access
rm pkg/camo/proxy_{,filter_}test.go
'';
passthru.tests = {
inherit (nixosTests) go-camo;
};
meta = {
description = "Camo server is a special type of image proxy that proxies non-secure images over SSL/TLS";
homepage = "https://github.com/cactus/go-camo";
changelog = "https://github.com/cactus/go-camo/releases/tag/v${version}";
license = lib.licenses.mit;
mainProgram = "go-camo";
maintainers = with lib.maintainers; [ viraptor ];
};
}

View File

@@ -0,0 +1,27 @@
{
lib,
buildGoModule,
fetchFromGitLab,
}:
buildGoModule rec {
pname = "check";
version = "unstable-2018-12-24";
rev = "ccaba434e62accd51209476ad093810bd27ec150";
src = fetchFromGitLab {
owner = "opennota";
repo = "check";
inherit rev;
hash = "sha256-u8U/62LZEn1ffwdGsUCGam4HAk7b2LetomCLZzHuuas=";
};
vendorHash = "sha256-DyysiVYFpncmyCzlHIOEtWlCMpm90AC3gdItI9WinSo=";
meta = with lib; {
description = "Set of utilities for checking Go sources";
homepage = "https://gitlab.com/opennota/check";
license = licenses.gpl3;
maintainers = with maintainers; [ kalbasit ];
};
}

View File

@@ -0,0 +1,57 @@
{
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
stdenvNoCC,
versionCheckHook,
}:
buildGoModule rec {
pname = "go-chromecast";
version = "0.3.4";
src = fetchFromGitHub {
owner = "vishen";
repo = "go-chromecast";
tag = "v${version}";
hash = "sha256-FFe87Z0aiNP5aGAiJ2WJkKRAMCQGWEBB0gLDGBpE3fk=";
};
vendorHash = "sha256-MOC9Yqo5p02eZLFJYBE8CxHxZv3RcpqV2sEPZOWiDeE=";
env.CGO_ENABLED = 0;
ldflags = [
"-s"
"-w"
"-X=main.version=${version}"
"-X=main.commit=${src.rev}"
"-X=main.date=unknown"
];
doInstallCheck = true;
nativeBuildInputs = [ installShellFiles ];
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = "--version";
postInstall = lib.optionalString (stdenvNoCC.buildPlatform.canExecute stdenvNoCC.hostPlatform) ''
installShellCompletion --cmd go-chromecast \
--bash <($out/bin/go-chromecast completion bash) \
--fish <($out/bin/go-chromecast completion fish) \
--zsh <($out/bin/go-chromecast completion zsh)
'';
meta = {
homepage = "https://github.com/vishen/go-chromecast";
description = "CLI for Google Chromecast, Home devices and Cast Groups";
license = lib.licenses.asl20;
maintainers = [ lib.maintainers.zi3m5f ];
mainProgram = "go-chromecast";
};
}

View File

@@ -0,0 +1,78 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
}:
let
bins = [
"crane"
"gcrane"
];
in
buildGoModule rec {
pname = "go-containerregistry";
version = "0.20.6";
src = fetchFromGitHub {
owner = "google";
repo = "go-containerregistry";
rev = "v${version}";
sha256 = "sha256-fmn2SPmYecyKY7HMPjPKvovRS/Ez+SwDe+1maccq4Hc=";
};
vendorHash = null;
nativeBuildInputs = [ installShellFiles ];
subPackages = [
"cmd/crane"
"cmd/gcrane"
];
outputs = [ "out" ] ++ bins;
ldflags =
let
t = "github.com/google/go-containerregistry";
in
[
"-s"
"-w"
"-X ${t}/cmd/crane/cmd.Version=v${version}"
"-X ${t}/pkg/v1/remote/transport.Version=${version}"
];
postInstall =
lib.concatStringsSep "\n" (
map (bin: ''
mkdir -p ''$${bin}/bin &&
mv $out/bin/${bin} ''$${bin}/bin/ &&
ln -s ''$${bin}/bin/${bin} $out/bin/
'') bins
)
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
for cmd in crane gcrane; do
installShellCompletion --cmd "$cmd" \
--bash <($GOPATH/bin/$cmd completion bash) \
--fish <($GOPATH/bin/$cmd completion fish) \
--zsh <($GOPATH/bin/$cmd completion zsh)
done
'';
# NOTE: no tests
doCheck = false;
meta = with lib; {
description = "Tools for interacting with remote images and registries including crane and gcrane";
homepage = "https://github.com/google/go-containerregistry";
license = licenses.asl20;
mainProgram = "crane";
maintainers = with maintainers; [
yurrriq
ryan4yin
];
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "go-cover-treemap";
version = "1.4.2";
src = fetchFromGitHub {
owner = "nikolaydubina";
repo = "go-cover-treemap";
rev = "v${version}";
hash = "sha256-MSkPot8uYcr8pxsIkJh2FThVK9xpzkN9Y69KeiQnQlA=";
};
vendorHash = "sha256-k/k+EGkuBnZFHrcWxnzLG8efWgb2i35Agf/sWbgTc4g=";
ldflags = [
"-s"
"-w"
];
meta = with lib; {
description = "Go code coverage to SVG treemap";
homepage = "https://github.com/nikolaydubina/go-cover-treemap";
license = licenses.mit;
maintainers = with maintainers; [ doronbehar ];
mainProgram = "go-cover-treemap";
};
}

View File

@@ -0,0 +1,26 @@
{
buildGoModule,
fetchFromGitHub,
lib,
}:
buildGoModule rec {
pname = "go-cqhttp";
version = "1.2.0";
src = fetchFromGitHub {
owner = "Mrs4s";
repo = "go-cqhttp";
rev = "v${version}";
hash = "sha256-mKenmsGdVg60zjVMTfbEtqtPcJdJo60Nz6IUQ9RB7j0=";
};
vendorHash = "sha256-YNARh25xrcPGvhhXzYmg3CsWwzvXq44uWt0S1PjRVdM=";
meta = with lib; {
description = "Golang implementation of OneBot based on Mirai and MiraiGo";
homepage = "https://github.com/Mrs4s/go-cqhttp";
license = licenses.agpl3Only;
maintainers = with maintainers; [ Anillc ];
};
}

View File

@@ -0,0 +1,49 @@
{
lib,
buildGoModule,
fetchFromGitHub,
testers,
nix-update-script,
go-critic,
}:
buildGoModule (finalAttrs: {
pname = "go-critic";
version = "0.13.0";
src = fetchFromGitHub {
owner = "go-critic";
repo = "go-critic";
rev = "v${finalAttrs.version}";
hash = "sha256-0AOhq7OhSHub4I6XXL018hg6i2ERkIbZCrO9osNjvHw=";
};
vendorHash = "sha256-yTm5Hhqbk1aJ4ZAR+ie2NnDOAGpjijUKQxZW3Tp9bs8=";
subPackages = [
"cmd/gocritic"
];
allowGoReference = true;
ldflags = [
"-X main.Version=${finalAttrs.version}"
];
passthru = {
tests.version = testers.testVersion {
package = go-critic;
command = "gocritic version";
};
updateScript = nix-update-script { };
};
meta = {
description = "Most opinionated Go source code linter for code audit";
homepage = "https://go-critic.com/";
changelog = "https://github.com/go-critic/go-critic/releases/tag/${finalAttrs.src.rev}";
license = lib.licenses.mit;
mainProgram = "gocritic";
maintainers = with lib.maintainers; [ katexochen ];
};
})

View File

@@ -0,0 +1,58 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
versionCheckHook,
nix-update-script,
}:
buildGoModule (finalAttrs: {
pname = "go-crx3";
version = "1.6.0";
src = fetchFromGitHub {
owner = "mmadfox";
repo = "go-crx3";
tag = "v${finalAttrs.version}";
hash = "sha256-XNUOnm898GtCIojWR4tCHZNDHhh+DfJvvBvTDBI8Wzg=";
};
vendorHash = "sha256-LEIB/VZA3rqTeH9SesZ/jrfVddl6xtmoRWHP+RwGmCk=";
ldflags = [
"-s"
"-w"
];
checkFlags = [
# requires network access
"-skip=^TestDownloadFromWebStore(|Negative)$"
];
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd crx3 \
--bash <($out/bin/crx3 completion bash) \
--fish <($out/bin/crx3 completion fish) \
--zsh <($out/bin/crx3 completion zsh)
'';
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgram = "${placeholder "out"}/bin/crx3";
versionCheckProgramArg = "version";
doInstallCheck = true;
passthru.updateScript = nix-update-script { };
meta = {
description = "Chrome browser extension tools";
homepage = "https://github.com/mmadfox/go-crx3";
changelog = "https://github.com/mmadfox/go-crx3/releases/tag/v${finalAttrs.version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ defelo ];
mainProgram = "crx3";
};
})

View File

@@ -0,0 +1,35 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "go-cve-search";
version = "0.1.4";
src = fetchFromGitHub {
owner = "s-index";
repo = "go-cve-search";
tag = "v${version}";
hash = "sha256-ofa6lfA3XKj70YM6AVNKRgGI53teK7OB09luAom8HpQ=";
};
vendorHash = "sha256-QXYjLPrfIPcZE8UTcE1kR9QQIusR/rAJG+e/IQ4P0PU=";
# Tests requires network access
doCheck = false;
meta = {
description = "Lightweight CVE search tool";
mainProgram = "go-cve-search";
longDescription = ''
go-cve-search is a lightweight tool to search CVE (Common Vulnerabilities
and Exposures).
'';
homepage = "https://github.com/s-index/go-cve-search";
changelog = "https://github.com/s-index/go-cve-search/releases/tag/v${version}";
license = with lib.licenses; [ mit ];
maintainers = with lib.maintainers; [ fab ];
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "go-dnscollector";
version = "1.11.0";
src = fetchFromGitHub {
owner = "dmachard";
repo = "go-dnscollector";
rev = "v${version}";
sha256 = "sha256-2NHJs2KdSDw36ePG8s/YSU4wlWG+14NQ6oWJYqMv2Wk=";
};
vendorHash = "sha256-N0gaDyOlRvFR1Buj/SKoOjwkVMRxd8Uj7iT/cDBfM9A=";
subPackages = [ "." ];
meta = with lib; {
description = "Ingesting, pipelining, and enhancing your DNS logs with usage indicators, security analysis, and additional metadata";
homepage = "https://github.com/dmachard/go-dnscollector";
license = licenses.mit;
maintainers = with maintainers; [ shift ];
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "go-dork";
version = "1.0.3";
src = fetchFromGitHub {
owner = "dwisiswant0";
repo = "go-dork";
tag = "v${version}";
hash = "sha256-Q7ECwXH9q6qWba2URh3LjMx8g6vPF1DWfKnmXej7ht4=";
};
vendorHash = "sha256-6V58RRRPamBMDAf0gg4sQMQkoD5dWauCFtPrwf5EasI=";
meta = {
description = "Dork scanner";
homepage = "https://github.com/dwisiswant0/go-dork";
changelog = "https://github.com/dwisiswant0/go-dork/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
mainProgram = "go-dork";
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
buildGoModule,
fetchFromGitHub,
nix-update-script,
}:
buildGoModule (finalAttrs: {
pname = "go-ecoflow-exporter";
version = "1.4.0";
src = fetchFromGitHub {
owner = "tess1o";
repo = "go-ecoflow-exporter";
tag = finalAttrs.version;
hash = "sha256-VCzMItYgnuDXDYdrk/ojzqUE2Fjr7KWGNnLhoQ+ZPYs=";
};
vendorHash = "sha256-UbV6V06zxXMTd0v+rDPGoMFn9X5mMCiX41g49IGnoT8=";
ldflags = [
"-s"
"-w"
];
passthru.updateScript = nix-update-script { };
meta = {
changelog = "https://github.com/tess1o/go-ecoflow-exporter/releases/tag/${finalAttrs.version}";
homepage = "https://github.com/tess1o/go-ecoflow-exporter";
description = "Ecoflow solar battery mqtt timescale, redis, prometheus metrics exporter";
license = lib.licenses.mit;
mainProgram = "go-ecoflow-exporter";
maintainers = with lib.maintainers; [ paepcke ];
};
})

View File

@@ -0,0 +1,38 @@
{
lib,
buildGoModule,
fetchFromGitHub,
nix-update-script,
}:
buildGoModule rec {
pname = "go-errorlint";
version = "1.8.0";
src = fetchFromGitHub {
owner = "polyfloyd";
repo = "go-errorlint";
rev = "v${version}";
hash = "sha256-jczsgZAC90f2Kkrwpb9oeoK1HtlFDLOjqlexn9v5ojk=";
};
vendorHash = "sha256-smOu92BigepCH02qm2Im3T65nUoR/IYhWTjhnjRPppA=";
ldflags = [
"-s"
"-w"
];
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "Source code linter that can be used to find code that will cause problems with Go's error wrapping scheme";
homepage = "https://github.com/polyfloyd/go-errorlint";
changelog = "https://github.com/polyfloyd/go-errorlint/blob/${src.rev}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [
meain
polyfloyd
];
mainProgram = "go-errorlint";
};
}

View File

@@ -0,0 +1,74 @@
{
lib,
buildGoModule,
fetchFromGitHub,
nixosTests,
}:
let
# A list of binaries to put into separate outputs
bins = [
"geth"
"clef"
];
in
buildGoModule rec {
pname = "go-ethereum";
version = "1.16.3";
src = fetchFromGitHub {
owner = "ethereum";
repo = "go-ethereum";
rev = "v${version}";
hash = "sha256-9g+RlOnV3DMLkak+RbSm8RgFB14Yuap8CT1w6kuZRv0=";
};
proxyVendor = true;
vendorHash = "sha256-GEPSkuEdrYvPGXEGhAT3U765rjY6w6kwOVYOMCgOaCo=";
doCheck = false;
outputs = [ "out" ] ++ bins;
# Move binaries to separate outputs and symlink them back to $out
postInstall = lib.concatStringsSep "\n" (
map (
bin:
"mkdir -p \$${bin}/bin && mv $out/bin/${bin} \$${bin}/bin/ && ln -s \$${bin}/bin/${bin} $out/bin/"
) bins
);
subPackages = [
"cmd/abidump"
"cmd/abigen"
"cmd/blsync"
"cmd/clef"
"cmd/devp2p"
"cmd/era"
"cmd/ethkey"
"cmd/evm"
"cmd/geth"
"cmd/rlpdump"
"cmd/utils"
];
# Following upstream: https://github.com/ethereum/go-ethereum/blob/v1.11.6/build/ci.go#L218
tags = [ "urfave_cli_no_docs" ];
passthru.tests = { inherit (nixosTests) geth; };
meta = with lib; {
homepage = "https://geth.ethereum.org/";
description = "Official golang implementation of the Ethereum protocol";
license = with licenses; [
lgpl3Only
gpl3Only
];
maintainers = with maintainers; [
asymmetric
RaghavSood
];
mainProgram = "geth";
};
}

View File

@@ -0,0 +1,34 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "go-exploitdb";
version = "0.6.2";
src = fetchFromGitHub {
owner = "vulsio";
repo = "go-exploitdb";
tag = "v${version}";
hash = "sha256-kfPM1p7ihfCRsxYjqfKbcwaM2DLdOAqQ2ywxzEQV8A4=";
};
vendorHash = "sha256-0RYc0ssdyV1b0DsMD5+0FA6oGStextvajX7SgHVQueU=";
ldflags = [
"-s"
"-w"
"-X=github.com/vulsio/go-exploitdb/config.Version=${version}"
];
meta = {
description = "Tool for searching Exploits from Exploit Databases, etc";
mainProgram = "go-exploitdb";
homepage = "https://github.com/vulsio/go-exploitdb";
changelog = "https://github.com/vulsio/go-exploitdb/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
stdenvNoCC,
fetchzip,
}:
stdenvNoCC.mkDerivation {
pname = "go-font";
version = "2.010";
src = fetchzip {
url = "https://go.googlesource.com/image/+archive/41969df76e82aeec85fa3821b1e24955ea993001/font/gofont/ttfs.tar.gz";
stripRoot = false;
hash = "sha256-rdzt51wY4b7HEr7W/0Ar/FB0zMyf+nKLsOT+CRSEP3o=";
};
installPhase = ''
runHook preInstall
mkdir -p $out/share/fonts/truetype
mkdir -p $out/share/doc/go-font
mv *.ttf $out/share/fonts/truetype
mv README $out/share/doc/go-font/LICENSE
runHook postInstall
'';
meta = with lib; {
homepage = "https://blog.golang.org/go-fonts";
description = "Go font family";
changelog = "https://go.googlesource.com/image/+log/refs/heads/master/font/gofont";
license = licenses.bsd3;
maintainers = with maintainers; [ sternenseemann ];
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,50 @@
{
lib,
fetchFromGitHub,
buildGoModule,
installShellFiles,
}:
buildGoModule rec {
pname = "go-graft";
version = "0.2.19";
src = fetchFromGitHub {
owner = "mzz2017";
repo = "gg";
rev = "v${version}";
hash = "sha256-DXW0NtFYvcCX4CgMs5/5HPaO9f9eFtw401wmJdCbHPU=";
};
env.CGO_ENABLED = 0;
ldflags = [
"-X github.com/mzz2017/gg/cmd.Version=${version}"
"-s"
"-w"
];
vendorHash = "sha256-fnM4ycqDyruCdCA1Cr4Ki48xeQiTG4l5dLVuAafEm14=";
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installShellCompletion --cmd gg \
--bash completion/bash/gg \
--fish completion/fish/gg.fish \
--zsh completion/zsh/_gg
'';
meta = with lib; {
description = "Command-line tool for one-click proxy in your research and development without installing v2ray or anything else";
changelog = "https://github.com/mzz2017/gg/releases/tag/${src.rev}";
homepage = "https://github.com/mzz2017/gg";
license = licenses.agpl3Only;
maintainers = with maintainers; [
xyenon
oluceps
];
mainProgram = "gg";
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,29 @@
{
buildGoModule,
fetchFromGitHub,
lib,
gitUpdater,
}:
buildGoModule rec {
pname = "go-grip";
version = "0.5.6";
src = fetchFromGitHub {
owner = "chrishrb";
repo = "go-grip";
tag = "v${version}";
hash = "sha256-c3tl5nALPqIAMSqjbbQDi6mN6M1mKJvzxxDHcj/QyuY=";
};
vendorHash = "sha256-aU6vo/uqJzctD7Q8HPFzHXVVJwMmlzQXhAA6LSkRAow=";
passthru.updateScript = gitUpdater { rev-prefix = "v"; };
meta = {
description = "Preview Markdown files locally before committing them";
homepage = "https://github.com/chrishrb/go-grip";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ heisfer ];
mainProgram = "go-grip";
};
}

View File

@@ -0,0 +1,52 @@
{
lib,
buildGoModule,
fetchFromGitHub,
nixosTests,
nix-update-script,
}:
buildGoModule (finalAttrs: {
pname = "go-httpbin";
version = "2.18.3";
src = fetchFromGitHub {
owner = "mccutchen";
repo = "go-httpbin";
tag = "v${finalAttrs.version}";
hash = "sha256-ixEbmppQ+4Udc5ytV4YPOpOT/iEbhjQIYGoOGL0dIw8=";
};
vendorHash = null;
env.CGO_ENABLED = 0;
ldflags = [
"-s"
"-w"
];
# tests are flaky
doCheck = false;
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
$out/bin/go-httpbin --help &> /dev/null
runHook postInstallCheck
'';
passthru = {
tests = { inherit (nixosTests) go-httpbin; };
updateScript = nix-update-script { };
};
meta = {
description = "Reasonably complete and well-tested golang port of httpbin, with zero dependencies outside the go stdlib";
homepage = "https://github.com/mccutchen/go-httpbin";
changelog = "https://github.com/mccutchen/go-httpbin/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ defelo ];
mainProgram = "go-httpbin";
};
})

View File

@@ -0,0 +1,39 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule (finalAttrs: {
pname = "go-i18n";
version = "2.6.0";
src = fetchFromGitHub {
owner = "nicksnyder";
repo = "go-i18n";
tag = "v${finalAttrs.version}";
hash = "sha256-UrSECFbpCIg5avJ+f3LkJy/ncZFHa4q8sDqDIQ3YZJM=";
};
vendorHash = "sha256-4Kbdj2D6eJTjZtdsFMNES3AEZ0PEi01HS73uFNZsFMA=";
subPackages = [
"goi18n"
];
env.CGO_ENABLED = 0;
doCheck = true;
meta = {
changelog = "https://github.com/nicksnyder/go-i18n/releases/tag/${finalAttrs.src.tag}";
description = "Translate your Go program into multiple languages";
longDescription = ''
goi18n is a tool that lets you extract messages from all your Go source files,
generates new language files.
'';
homepage = "https://github.com/nicksnyder/go-i18n";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ videl ];
mainProgram = "goi18n";
};
})

View File

@@ -0,0 +1,29 @@
{
lib,
buildGoModule,
fetchFromGitHub,
nix-update-script,
}:
buildGoModule (finalAttrs: {
pname = "go-import-lint";
version = "1.2.0";
src = fetchFromGitHub {
owner = "hedhyw";
repo = "go-import-lint";
tag = "v${finalAttrs.version}";
hash = "sha256-YaIKtbdjqtmHGZgk3AlHrSJrWGMGJTIv1t/LYoB4vmw=";
};
vendorHash = null;
passthru.updateScript = nix-update-script { };
meta = {
description = "Golang source code analyzer that checks imports order";
homepage = "https://github.com/hedhyw/go-import-lint";
changelog = "https://github.com/hedhyw/go-import-lint/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ xiaoxiangmoe ];
mainProgram = "go-import-lint";
};
})

View File

@@ -0,0 +1,72 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
nix-update-script,
pkg-config,
libusb1,
iproute2,
net-tools,
}:
buildGoModule rec {
pname = "go-ios";
version = "1.0.182";
src = fetchFromGitHub {
owner = "danielpaulus";
repo = "go-ios";
rev = "v${version}";
sha256 = "sha256-GUCZiuW6IDVxVsFZN7QMRt5EFovxjUopC4jQD+/lZv8=";
};
proxyVendor = true;
vendorHash = "sha256-/aVaTC9lfoXQvhDVQm31HmXBnDYYOv6RH69Nm3I/K7s=";
excludedPackages = [
"restapi"
];
postPatch = lib.optionalString stdenv.hostPlatform.isLinux ''
substituteInPlace ncm/linux_commands.go \
--replace-fail "ip " "${lib.getExe' iproute2 "ip"} "
substituteInPlace ios/tunnel/tunnel.go \
--replace-fail "ifconfig" "${lib.getExe' net-tools "ifconfig"}"
'';
nativeBuildInputs = [
pkg-config
];
buildInputs = [
libusb1
];
postInstall = ''
# aligns the binary with what is expected from go-ios
mv $out/bin/go-ios $out/bin/ios
'';
# skips all the integration tests (requires iOS device) (`-tags=fast`)
# as well as tests that requires networking
checkFlags =
let
skippedTests = [
"TestWorksWithoutProxy"
"TestUsesProxy"
];
in
[ "-tags=fast" ] ++ [ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "Operating system independent implementation of iOS device features";
homepage = "https://github.com/danielpaulus/go-ios";
license = licenses.mit;
maintainers = with maintainers; [ eyjhb ];
mainProgram = "ios";
};
}

View File

@@ -0,0 +1,57 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "go-jet";
version = "2.13.0";
src = fetchFromGitHub {
owner = pname;
repo = "jet";
rev = "v${version}";
sha256 = "sha256-abk/mcukxIgAD9Oxh3H4+xrSoY30aW7EXZxEXXlriHA=";
};
vendorHash = "sha256-KheXtpbmW8GoD7nHE7vg8qOsg5sRXfrFuBJbDEXOTBs=";
subPackages = [ "cmd/jet" ];
tags = [
"mysql"
"golang"
"postgres"
"sql"
"database"
"code-generator"
"sqlite"
"postgresql"
"mariadb"
"sql-query"
"codegenerator"
"typesafe"
"sql-builder"
"datamapper"
"code-completion"
"sql-queries"
"cockroachdb"
"sql-query-builder"
"sqlbuilder"
"typesafety"
];
postPatch = ''
# removing the tests which depend on external data
rm -rf tests/{sqlite,postgres,mysql}
'';
meta = with lib; {
homepage = "https://github.com/go-jet/jet";
description = "Type safe SQL builder with code generation and automatic query result data mapping";
maintainers = with maintainers; [ mrityunjaygr8 ];
license = licenses.asl20;
mainProgram = "jet";
};
}

View File

@@ -0,0 +1,31 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "go-jira";
version = "1.0.28";
src = fetchFromGitHub {
rev = "v${version}";
owner = "go-jira";
repo = "jira";
sha256 = "sha256-h/x77xGqdOxPBxdchElZU9GFgjnNo89o9gx4fYM5dME=";
};
vendorHash = "sha256-r69aFl3GwgZ1Zr4cEy4oWlqsrjNCrqjwW9BU9+d8xDQ=";
doCheck = false;
meta = with lib; {
description = "Simple command line client for Atlassian's Jira service written in Go";
homepage = "https://github.com/go-jira/jira";
license = licenses.asl20;
maintainers = with maintainers; [
carlosdagos
timstott
];
};
}

View File

@@ -0,0 +1,42 @@
{
lib,
buildGoModule,
fetchFromGitHub,
testers,
}:
buildGoModule (finalAttrs: {
pname = "go-jsonnet";
version = "0.21.0";
src = fetchFromGitHub {
owner = "google";
repo = "go-jsonnet";
tag = "v${finalAttrs.version}";
hash = "sha256-J92xNDpCidbiSsN6NveS6BX6Tx+qDQqkgm6pjk1wBTQ=";
};
vendorHash = "sha256-Uh2rAXdye9QmmZuEqx1qeokE9Z9domyHsSFlU7YZsZw=";
subPackages = [ "cmd/jsonnet*" ];
ldflags = [
"-s"
"-w"
];
passthru.tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
version = "v${finalAttrs.version}";
};
meta = {
description = "Implementation of Jsonnet in pure Go";
homepage = "https://github.com/google/go-jsonnet";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
nshalman
];
mainProgram = "jsonnet";
};
})

View File

@@ -0,0 +1,45 @@
{
lib,
buildGoModule,
fetchFromGitHub,
nix-update-script,
}:
buildGoModule (finalAttrs: {
pname = "go-jsonschema";
version = "0.20.0";
src = fetchFromGitHub {
owner = "omissis";
repo = "go-jsonschema";
tag = "v${finalAttrs.version}";
hash = "sha256-e1eL5Blf9l4cSR7Tg740eTFza3ViJEiwLaoUsUZzQu4=";
};
vendorHash = "sha256-vHtigJ2YNFFWGxv6/pGwmmGE0Fn+2S7NguyrhVME7ak=";
ldflags = [
"-X main.version=v${finalAttrs.version}"
"-s"
"-w"
];
env.GOWORK = "off";
# Tests are in a nested Go module which makes things difficult.
preBuild = ''
rm -rf tests
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Tool to generate Go data types from JSON Schema definitions";
homepage = "https://github.com/omissis/go-jsonschema";
changelog = "https://github.com/omissis/go-jsonschema/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
shellhazard
];
mainProgram = "go-jsonschema";
};
})

View File

@@ -0,0 +1,40 @@
{
buildGoModule,
fetchFromGitHub,
lib,
}:
buildGoModule rec {
pname = "go-judge";
version = "1.9.8";
src = fetchFromGitHub {
owner = "criyle";
repo = "go-judge";
rev = "v${version}";
hash = "sha256-hBOH5FDqzUGiCXucbTPBPXdEnHPq7fL0SYlY5b3OMHY=";
};
vendorHash = "sha256-dUJpNGJvvmIJuA6GSWhL4weQEwn5iM9k+y8clHdxhvY=";
tags = [
"nomsgpack"
"grpcnotrace"
];
subPackages = [ "cmd/go-judge" ];
preBuild = ''
echo v${version} > ./cmd/go-judge/version/version.txt
'';
env.CGO_ENABLED = 0;
meta = with lib; {
description = "High performance sandbox service based on container technologies";
homepage = "https://docs.goj.ac";
license = licenses.mit;
mainProgram = "go-judge";
maintainers = with maintainers; [ criyle ];
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "go-junit-report";
version = "2.1.0";
src = fetchFromGitHub {
owner = "jstemmer";
repo = "go-junit-report";
rev = "v${version}";
sha256 = "sha256-s4XVjACmpd10C5k+P3vtcS/aWxI6UkSUPyxzLhD2vRI=";
};
vendorHash = "sha256-+KmC7m6xdkWTT/8MkGaW9gqkzeZ6LWL0DXbt+12iTHY=";
ldflags = [
"-s"
"-w"
];
meta = with lib; {
description = "Convert go test output to junit xml";
mainProgram = "go-junit-report";
homepage = "https://github.com/jstemmer/go-junit-report";
license = licenses.mit;
maintainers = with maintainers; [ cryptix ];
};
}

View File

@@ -0,0 +1,31 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule {
pname = "go-landlock";
version = "0-unstable-2024-02-16";
src = fetchFromGitHub {
owner = "landlock-lsm";
repo = "go-landlock";
rev = "efb66220540a9ef86aa0160d15e55f429d5b94d9";
hash = "sha256-U0+364NIw3kVcfS8/RTcpSMrv4v2ATCcC1v+5IsxeXQ=";
};
vendorHash = "sha256-IOaFToz/66Z1DP5O6gLqTyEiiYyrwZ5At93qPLa7hg8=";
subPackages = [
"cmd/landlock-restrict-net"
"cmd/landlock-restrict"
];
meta = {
description = "Go library for the Linux Landlock sandboxing feature";
homepage = "https://github.com/landlock-lsm/go-landlock";
license = lib.licenses.mit;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "go-libp2p-daemon";
version = "0.9.1";
src = fetchFromGitHub {
owner = "libp2p";
repo = "go-libp2p-daemon";
rev = "v${version}";
hash = "sha256-N/5V03HQTr7dIvMpIVRlIhEaV2f+aDF36esWMjT96HA=";
};
vendorHash = "sha256-WOk06En90ys0pe5OZwhXCJJwry77t13eWg131fnQvpw=";
doCheck = false;
meta = with lib; {
description = "Libp2p-backed daemon wrapping the functionalities of go-libp2p for use in other languages";
homepage = "https://github.com/libp2p/go-libp2p-daemon";
license = licenses.mit;
maintainers = with maintainers; [ fare ];
};
}

View File

@@ -0,0 +1,26 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "go-licence-detector";
version = "0.9.1";
src = fetchFromGitHub {
owner = "elastic";
repo = "go-licence-detector";
rev = "v${version}";
hash = "sha256-Mo4eBBP9UueLEMVnxndatizDaxVyZuHACvFoV38dRVI=";
};
vendorHash = "sha256-quFa2gBPsyRMOBde+KsIF8NCHYSF+X9skvIWnpm2Nss=";
meta = with lib; {
description = "Detect licences in Go projects and generate documentation";
homepage = "https://github.com/elastic/go-licence-detector";
license = licenses.asl20;
maintainers = with maintainers; [ SuperSandro2000 ];
};
}

View File

@@ -0,0 +1,30 @@
{
lib,
buildGoModule,
fetchFromGitHub,
git,
}:
buildGoModule rec {
pname = "go-license-detector";
version = "4.3.1";
src = fetchFromGitHub {
owner = "go-enry";
repo = "go-license-detector";
rev = "v${version}";
hash = "sha256-S9LKXjn5dL5FETOOAk+bs7bIVdu2x7MIhfjpZuXzuLo=";
};
vendorHash = "sha256-MtQsUsFd9zQGbP7NGZ4zcSoa6O2WSWvGig0GUwCc6uM=";
nativeCheckInputs = [ git ];
meta = with lib; {
description = "Reliable project licenses detector";
homepage = "https://github.com/go-enry/go-license-detector";
license = licenses.asl20;
maintainers = [ ];
mainProgram = "license-detector";
};
}

View File

@@ -0,0 +1,65 @@
diff --git a/go.mod b/go.mod
index 7e3d596..d90b393 100644
--- a/go.mod
+++ b/go.mod
@@ -1,27 +1,50 @@
module github.com/google/go-licenses
-go 1.16
+go 1.17
require (
- cloud.google.com/go/iam v0.4.0 // indirect
- github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/google/go-cmp v0.5.8
github.com/google/go-replayers/httpreplay v1.1.1
github.com/google/licenseclassifier v0.0.0-20210722185704-3043a050f148
- github.com/kr/text v0.2.0 // indirect
- github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/otiai10/copy v1.6.0
- github.com/pkg/errors v0.9.1 // indirect
- github.com/sergi/go-diff v1.2.0 // indirect
github.com/spf13/cobra v1.6.0
- github.com/stretchr/testify v1.8.0 // indirect
go.opencensus.io v0.23.0
- golang.org/x/crypto v0.1.0 // indirect
golang.org/x/mod v0.7.0
golang.org/x/net v0.5.0
golang.org/x/text v0.6.0
golang.org/x/tools v0.5.0
- gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
gopkg.in/src-d/go-git.v4 v4.13.1
k8s.io/klog/v2 v2.80.1
)
+
+require (
+ cloud.google.com/go v0.102.1 // indirect
+ cloud.google.com/go/iam v0.4.0 // indirect
+ cloud.google.com/go/storage v1.22.1 // indirect
+ github.com/emirpasic/gods v1.12.0 // indirect
+ github.com/go-logr/logr v1.2.0 // indirect
+ github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
+ github.com/google/martian/v3 v3.3.2 // indirect
+ github.com/inconshreveable/mousetrap v1.0.1 // indirect
+ github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
+ github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd // indirect
+ github.com/kr/text v0.2.0 // indirect
+ github.com/mitchellh/go-homedir v1.1.0 // indirect
+ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
+ github.com/pkg/errors v0.9.1 // indirect
+ github.com/sergi/go-diff v1.2.0 // indirect
+ github.com/spf13/pflag v1.0.5 // indirect
+ github.com/src-d/gcfg v1.4.0 // indirect
+ github.com/stretchr/testify v1.8.0 // indirect
+ github.com/xanzy/ssh-agent v0.2.1 // indirect
+ golang.org/x/crypto v0.1.0 // indirect
+ golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2 // indirect
+ golang.org/x/sys v0.4.0 // indirect
+ google.golang.org/api v0.93.0 // indirect
+ google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959 // indirect
+ google.golang.org/grpc v1.48.0 // indirect
+ google.golang.org/protobuf v1.28.1 // indirect
+ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
+ gopkg.in/src-d/go-billy.v4 v4.3.2 // indirect
+ gopkg.in/warnings.v0 v0.1.2 // indirect
+)

View File

@@ -0,0 +1,63 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
go,
installShellFiles,
makeWrapper,
}:
buildGoModule rec {
pname = "go-licenses";
version = "1.6.0";
src = fetchFromGitHub {
owner = "google";
repo = "go-licenses";
tag = "v${version}";
hash = "sha256-GAlwTVoVA+n9+EfhybmpKm16FoY9kFzrxy1ZQxS6A8E=";
};
vendorHash = "sha256-ToRn2wj7Yi+UDJwvAhV0ACEhqlcQjt4bRpz7abNRt9A=";
patches = [
# Without this, we get error messages like:
# vendor/golang.org/x/sys/unix/syscall.go:83:16: unsafe.Slice requires go1.17 or later (-lang was set to go1.16; check go.mod)
# The patch was generated by changing "go 1.16" to "go 1.17" and executing `go mod tidy`.
./fix-go-version-error.patch
];
nativeBuildInputs = [
installShellFiles
makeWrapper
];
subPackages = [ "." ];
allowGoReference = true;
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd go-licenses \
--bash <("$out/bin/go-licenses" completion bash) \
--fish <("$out/bin/go-licenses" completion fish) \
--zsh <("$out/bin/go-licenses" completion zsh)
# workaround empty output when GOROOT differs from built environment
# see https://github.com/google/go-licenses/issues/149
wrapProgram "$out/bin/go-licenses" \
--set GOROOT '${go}/share/go'
'';
# Tests require internet connection
doCheck = false;
meta = {
changelog = "https://github.com/google/go-licenses/releases/tag/v${version}";
description = "Reports on the licenses used by a Go package and its dependencies";
mainProgram = "go-licenses";
homepage = "https://github.com/google/go-licenses";
license = with lib.licenses; [ asl20 ];
maintainers = with lib.maintainers; [ Luflosi ];
};
}

View File

@@ -0,0 +1,27 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "go-md2man";
version = "2.0.7";
vendorHash = "sha256-aMLL/tmRLyGze3RSB9dKnoTv5ZK1eRtgV8fkajWEbU0=";
src = fetchFromGitHub {
rev = "v${version}";
owner = "cpuguy83";
repo = "go-md2man";
sha256 = "sha256-DKqGvdidl6J4lPhIk3okhU4k6MvtSr+hJ9huU/JTai0=";
};
meta = with lib; {
description = "Go tool to convert markdown to man pages";
mainProgram = "go-md2man";
license = licenses.mit;
homepage = "https://github.com/cpuguy83/go-md2man";
maintainers = with maintainers; [ offline ];
};
}

View File

@@ -0,0 +1,56 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "go-migrate";
version = "4.19.0";
src = fetchFromGitHub {
owner = "golang-migrate";
repo = "migrate";
rev = "v${version}";
sha256 = "sha256-u8lP1mQLZ3WtX8NV8mnlNut5bLqkWk2blaoYJPOQoCk=";
};
proxyVendor = true; # darwin/linux hash mismatch
vendorHash = "sha256-aAtPYD8gZReUJu+oOkuZ1afUKnGvP5shXCo7FgigBDI=";
subPackages = [ "cmd/migrate" ];
tags = [
"cassandra"
"clickhouse"
"cockroachdb"
"crate"
"firebird"
"mongodb"
"multistmt"
"mysql"
"neo4j"
"pgx"
"pgx5"
"postgres"
"ql"
"redshift"
"rqlite"
"shell"
"snowflake"
"spanner"
"sqlite3"
"sqlserver"
"stub"
"testing"
"yugabytedb"
];
meta = with lib; {
homepage = "https://github.com/golang-migrate/migrate";
description = "Database migrations. CLI and Golang library";
maintainers = with maintainers; [ offline ];
license = licenses.mit;
mainProgram = "migrate";
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "go-minimock";
version = "3.4.7";
src = fetchFromGitHub {
owner = "gojuno";
repo = "minimock";
rev = "v${version}";
hash = "sha256-Dx4m17r7GOdiaV8DzqOXAr32dNCXJyi7gID6GHohKXk=";
};
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
];
vendorHash = "sha256-74bmsixBO5VwLZYRXN9Fx3Mu9BbL4bSF6o0h9QaET1Y=";
doCheck = true;
subPackages = [
"cmd/minimock"
"."
];
meta = with lib; {
homepage = "https://github.com/gojuno/minimock";
description = "Golang mock generator from interfaces";
license = licenses.mit;
maintainers = with maintainers; [ svrana ];
mainProgram = "minimock";
};
}

View File

@@ -0,0 +1,81 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
versionCheckHook,
go-task,
gotestsum,
}:
buildGoModule (finalAttrs: {
pname = "go-mockery";
version = "3.5.5";
src = fetchFromGitHub {
owner = "vektra";
repo = "mockery";
tag = "v${finalAttrs.version}";
hash = "sha256-paoI7KkpLbpQyEwS/oW8Ck9KiJRTUxzFzihsnFyhrCw=";
};
proxyVendor = true;
vendorHash = "sha256-YOhlytIMgMHwj2BM/6vOeheyQd4nUuDWpkwLdCqru8c=";
ldflags = [
"-s"
"-w"
"-X github.com/vektra/mockery/v${lib.versions.major finalAttrs.version}/internal/logging.SemVer=v${finalAttrs.version}"
];
env.CGO_ENABLED = false;
subPackages = [ "." ];
nativeCheckInputs = [
versionCheckHook
go-task
gotestsum
];
prePatch = ''
# remove test.ci's dependency on lint since we don't need it and
# it tries to use remote golangci-lint
substituteInPlace Taskfile.yml \
--replace-fail "deps: [lint]" "" \
--replace-fail "go run gotest.tools/gotestsum" "gotestsum"
# patch scripts used in e2e testing
patchShebangs e2e
'';
checkPhase = ''
runHook preCheck
${
# TestRemoteTemplates/schema_validation_OK fails only on x86_64-darwin
(lib.optionalString (
stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86
) "rm -rf e2e/test_remote_templates/")
}
# run unit tests and e2e tests plus pre-gen necessary mocks
task test.ci
runHook postCheck
'';
doInstallCheck = true;
versionCheckProgram = "${placeholder "out"}/bin/mockery";
versionCheckProgramArg = "version";
meta = {
homepage = "https://github.com/vektra/mockery";
description = "Mock code autogenerator for Golang";
maintainers = with lib.maintainers; [
fbrs
jk
];
mainProgram = "mockery";
license = lib.licenses.bsd3;
};
})

View File

@@ -0,0 +1,51 @@
{
lib,
buildGoModule,
fetchFromGitHub,
versionCheckHook,
go-task,
gotestsum,
getent,
}:
buildGoModule (finalAttrs: {
pname = "go-mockery_2";
# supported upstream until 2029-12-31
# https://vektra.github.io/mockery/latest/v3/#v2-support-lifecycle
version = "2.53.5";
src = fetchFromGitHub {
owner = "vektra";
repo = "mockery";
tag = "v${finalAttrs.version}";
hash = "sha256-Q+EiUg606JsTe9XsIVk/mktKF0+tXGNeOuvYk9iB+uY=";
};
proxyVendor = true;
vendorHash = "sha256-5pMcAuWxKqWzSB+d28hFOP++P0JpqukSO3Z+1Hrwzk4=";
ldflags = [
"-s"
"-w"
"-X github.com/vektra/mockery/v${lib.versions.major finalAttrs.version}/pkg/logging.SemVer=v${finalAttrs.version}"
];
env.CGO_ENABLED = false;
subPackages = [ "." ];
nativeCheckInputs = [
versionCheckHook
];
meta = {
homepage = "https://github.com/vektra/mockery";
description = "Mock code autogenerator for Golang - v2";
maintainers = with lib.maintainers; [
fbrs
jk
];
mainProgram = "mockery";
license = lib.licenses.bsd3;
};
})

View File

@@ -0,0 +1,30 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "go-mod-graph-chart";
version = "0.5.3";
src = fetchFromGitHub {
owner = "PaulXu-cn";
repo = "go-mod-graph-chart";
rev = "v${version}";
hash = "sha256-vitUZXQyAj72ed9Gukr/sAT/iWWMhwsxjZhf2a9CM7I=";
};
vendorHash = null;
# check requires opening webpage
doCheck = false;
meta = with lib; {
description = "Tool build chart by go mod graph output with zero dependencies";
homepage = "https://github.com/PaulXu-cn/go-mod-graph-chart";
mainProgram = "gmchart";
license = licenses.mit;
maintainers = with maintainers; [ aleksana ];
};
}

View File

@@ -0,0 +1,38 @@
{
stdenv,
lib,
fetchFromGitHub,
buildGoModule,
nix-update-script,
versionCheckHook,
}:
buildGoModule rec {
pname = "go-mod-upgrade";
version = "0.12.0";
src = fetchFromGitHub {
owner = "oligot";
repo = "go-mod-upgrade";
tag = "v${version}";
hash = "sha256-eBes8PDx3E8hAcSXiRmEJTelsm7EWtI3Ffsl5RIAVJ8=";
};
vendorHash = "sha256-92lKUBkSx5Rvm1FfZLAd3LZS+TPAasRYOMFLTt/QzXc=";
ldflags = [
"-X main.version=${version}"
];
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
passthru.updateScript = nix-update-script { };
meta = {
description = "Update outdated Go dependencies interactively";
changelog = "https://github.com/oligot/go-mod-upgrade/releases/tag/v${version}/CHANGELOG.md";
homepage = "https://github.com/oligot/go-mod-upgrade";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ polyfloyd ];
};
}

View File

@@ -0,0 +1,42 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "motion";
version = "1.2.0";
src = fetchFromGitHub {
owner = "fatih";
repo = "motion";
rev = "v${version}";
sha256 = "sha256-7vkMhjO4JUAf0sUcKiMjqJ5GzLb//QoHd7Cagerx4/s=";
};
vendorHash = null;
ldflags = [
"-s"
"-w"
];
meta = with lib; {
description = "Navigation and insight in Go";
mainProgram = "motion";
longDescription = ''
Motion is a tool that was designed to work with editors. It is providing
contextual information for a given offset(option) from a file or
directory of files. Editors can use these informations to implement
navigation, text editing, etc... that are specific to a Go source code.
It's optimized and created to work with vim-go, but it's designed to work
with any editor. It's currently work in progress and open to change.
'';
homepage = "https://github.com/fatih/motion";
license = licenses.bsd3;
maintainers = with maintainers; [ kalbasit ];
platforms = platforms.linux ++ platforms.darwin;
};
}

View File

@@ -0,0 +1,45 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
pkg-config,
libusb1,
}:
buildGoModule rec {
pname = "go-mtpfs";
version = "1.0.0";
src = fetchFromGitHub {
owner = "hanwen";
repo = "go-mtpfs";
rev = "v${version}";
hash = "sha256-HVfB8/MImgZZLx4tcrlYOfQjpAdHMHshEaSsd+n758w=";
};
vendorHash = "sha256-OrAEvD2rF0Y0bvCD9TUv/E429lASsvC3uK3qNvbg734=";
ldflags = [
"-s"
"-w"
];
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libusb1 ];
checkFlags = [
# Only run tests under mtp/encoding_test.go
# Other tests require an Android deviced attached over USB.
"-run=Test(Encode|Decode|Variant)"
];
meta = with lib; {
description = "Simple FUSE filesystem for mounting Android devices as a MTP device";
homepage = "https://github.com/hanwen/go-mtpfs";
license = licenses.bsd3;
maintainers = [ ];
broken = stdenv.hostPlatform.isDarwin;
mainProgram = "go-mtpfs";
};
}

View File

@@ -0,0 +1,59 @@
{
lib,
buildGoModule,
fetchFromGitHub,
pkg-config,
flac,
stdenv,
alsa-lib,
nix-update-script,
}:
buildGoModule rec {
pname = "go-musicfox";
version = "4.7.1";
src = fetchFromGitHub {
owner = "go-musicfox";
repo = "go-musicfox";
rev = "v${version}";
hash = "sha256-jrrxG26OKOUiUzv12Td8Vy12gnj9+mHog/vZSaTwqmw=";
};
deleteVendor = true;
vendorHash = "sha256-TjPJBP1p2j9K10I87RB7KnwKfO3h2K6WFMZqveMUMkw=";
subPackages = [ "cmd/musicfox.go" ];
ldflags = [
"-s"
"-w"
"-X github.com/go-musicfox/go-musicfox/internal/types.AppVersion=${version}"
];
nativeBuildInputs = [
pkg-config
];
buildInputs = [
flac
]
++ lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib
];
passthru.updateScript = nix-update-script { };
meta = {
description = "Terminal netease cloud music client written in Go";
homepage = "https://github.com/anhoder/go-musicfox";
license = lib.licenses.mit;
mainProgram = "musicfox";
maintainers = with lib.maintainers; [
zendo
Ruixi-rebirth
aleksana
];
};
}

View File

@@ -0,0 +1,41 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
nixosTests,
olm,
}:
buildGoModule {
pname = "go-neb";
version = "unstable-2021-07-21";
src = fetchFromGitHub {
owner = "matrix-org";
repo = "go-neb";
rev = "8916c80f8ce1732f64b50f9251242ca189082e76";
sha256 = "sha256-kuH4vbvS4G1bczxUdY4bd4oL4pIZzuueUxdEp4xuzJM=";
};
subPackages = [ "." ];
buildInputs = [ olm ];
vendorHash = "sha256-5Vg7aUkqiFIQuxmsDOJjvXoeA5NjMoBoD0XBhC+o4GA=";
doCheck = false;
passthru.tests.go-neb = nixosTests.go-neb;
meta = with lib; {
broken = stdenv.hostPlatform.isDarwin;
description = "Extensible matrix bot written in Go";
mainProgram = "go-neb";
homepage = "https://github.com/matrix-org/go-neb";
license = licenses.asl20;
maintainers = with maintainers; [
hexa
maralorn
];
};
}

View File

@@ -0,0 +1,31 @@
{
lib,
fetchFromGitHub,
buildGoModule,
}:
buildGoModule rec {
pname = "go-org";
version = "1.7.0";
src = fetchFromGitHub {
owner = "niklasfasching";
repo = "go-org";
rev = "v${version}";
hash = "sha256-BPCQxl0aJ9PrEC5o5dc5uBbX8eYAxqB+qMLXo1LwCoA=";
};
vendorHash = "sha256-HbNYHO+tqFEs9VXdxyA+r/7mM/p+NBn8PomT8JAyKR8=";
postInstallCheck = ''
$out/bin/go-org > /dev/null
'';
meta = with lib; {
description = "Org-mode parser and static site generator in go";
homepage = "https://niklasfasching.github.io/go-org";
license = licenses.mit;
maintainers = with maintainers; [ bhankas ];
mainProgram = "go-org";
};
}

View File

@@ -0,0 +1,27 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule {
pname = "go-outline";
version = "unstable-2021-06-08";
src = fetchFromGitHub {
owner = "ramya-rao-a";
repo = "go-outline";
rev = "9736a4bde949f321d201e5eaa5ae2bcde011bf00";
sha256 = "sha256-5ns6n1UO9kRSw8iio4dmJDncsyvFeN01bjxHxQ9Fae4=";
};
vendorHash = "sha256-jYYtSXdJd2eUc80UfwRRMPcX6tFiXE3LbxV3NAdKVKE=";
meta = with lib; {
description = "Utility to extract JSON representation of declarations from a Go source file";
mainProgram = "go-outline";
homepage = "https://github.com/ramya-rao-a/go-outline";
maintainers = with maintainers; [ vdemeester ];
license = licenses.mit;
};
}

View File

@@ -0,0 +1,58 @@
{
buildGoModule,
fetchFromGitHub,
installShellFiles,
lib,
stdenv,
}:
buildGoModule rec {
pname = "go-passbolt-cli";
version = "0.3.2";
src = fetchFromGitHub {
owner = "passbolt";
repo = "go-passbolt-cli";
rev = "v${version}";
hash = "sha256-BtMPOmp9dbi/HoNigEeGWIYXRh1/gorV8ycrtWw9I8s=";
};
vendorHash = "sha256-wGSrhW7OsSjHlSKLkOf2AYIxU1m2lM1WGUsy16qxBwA=";
ldflags = [
"-X=main.version=${version}"
"-X=main.commit=${src.rev}"
"-X=main.date=1970-01-01T00:00:00Z"
];
subPackages = [ "." ];
nativeBuildInputs = [
installShellFiles
];
installPhase = ''
runHook preInstall
install -D $GOPATH/bin/go-passbolt-cli $out/bin/passbolt
runHook postInstall
'';
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd passbolt \
--bash <($out/bin/passbolt completion bash) \
--fish <($out/bin/passbolt completion fish) \
--zsh <($out/bin/passbolt completion zsh)
export tmpDir=$(mktemp -d)
cd $tmpDir && mkdir man && $out/bin/passbolt gendoc --type man && installManPage man/*
'';
meta = with lib; {
description = "CLI tool to interact with Passbolt, an open source password manager for teams";
homepage = "https://github.com/passbolt/go-passbolt-cli";
license = licenses.mit;
maintainers = with maintainers; [ pbek ];
mainProgram = "passbolt";
platforms = platforms.linux ++ platforms.darwin;
};
}

View File

@@ -0,0 +1,26 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "go-protobuf";
version = "1.5.4";
src = fetchFromGitHub {
owner = "golang";
repo = "protobuf";
rev = "v${version}";
sha256 = "sha256-AfyZ6xlqmrsVqtoKV1XMEo/Vba9Kpu1EgwfF6pPSZ64=";
};
vendorHash = "sha256-jGAWUgW0DA7EwmlzVxnBmtbf2dp+P4Qwcb8mTAEhUi4=";
meta = with lib; {
homepage = "https://github.com/golang/protobuf";
description = "Go bindings for protocol buffer";
maintainers = with maintainers; [ lewo ];
license = licenses.bsd3;
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "go-rice";
version = "1.0.3";
src = fetchFromGitHub {
owner = "GeertJohan";
repo = "go.rice";
rev = "v${version}";
sha256 = "sha256-nJt2t6iTZn8B990SZwEC23pivZke1OKVwTI2GDN6m0o=";
};
vendorHash = "sha256-KTT5Ld0Uyyfkhk29KuQuZoGG8UTz1E5Q7fUoSy7iKxM=";
subPackages = [
"."
"rice"
];
meta = with lib; {
description = "Go package that makes working with resources such as html, js, css, images, templates very easy";
homepage = "https://github.com/GeertJohan/go.rice";
license = licenses.bsd2;
maintainers = [ ];
mainProgram = "rice";
};
}

View File

@@ -0,0 +1,46 @@
{
lib,
buildGoModule,
fetchFromGitHub,
xorg,
wayland,
}:
buildGoModule {
pname = "go-sct";
version = "unstable-2022-01-32";
src = fetchFromGitHub {
owner = "d4l3k";
repo = "go-sct";
rev = "4ae88a6bf50e0b917541ddbcec1ff10ab77a0b15";
hash = "sha256-/0ilM1g3CNaseqV9i+cKWyzxvWnj+TFqazt+aYDtNVs=";
};
postPatch = ''
# Disable tests require network access
rm -f geoip/geoip_test.go
'';
vendorHash = "sha256-Rx5/oORink2QtRcD+JqbyFroWYhuYmuYDzZ391R4Jsw=";
buildInputs = [
xorg.libX11
xorg.libXrandr
wayland.dev
];
ldflags = [
"-s"
"-w"
];
meta = with lib; {
description = "Color temperature setting library and CLI that operates in a similar way to f.lux and Redshift";
homepage = "https://github.com/d4l3k/go-sct";
license = licenses.mit;
maintainers = [ ];
platforms = platforms.linux;
mainProgram = "sct";
};
}

View File

@@ -0,0 +1,34 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "go-secdump";
version = "0.5.0";
src = fetchFromGitHub {
owner = "jfjallid";
repo = "go-secdump";
tag = version;
hash = "sha256-v/IqOjohlGs6MQX2BevboysqW6Lzz0NupDH6sb1TG7Q=";
};
vendorHash = "sha256-H9oFvnyigjwEs24XGGH5mtDMMCo846y0nFIlsrbvLMk=";
ldflags = [
"-s"
"-w"
];
meta = {
description = "Tool to remotely dump secrets from the Windows registry";
homepage = "https://github.com/jfjallid/go-secdump";
changelog = "https://github.com/jfjallid/go-secdump/releases/tag/${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
mainProgram = "go-secdump";
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,39 @@
{
buildGoModule,
fetchFromGitLab,
lib,
nix-update-script,
testers,
}:
buildGoModule (finalAttrs: {
pname = "go-sendxmpp";
version = "0.15.0";
src = fetchFromGitLab {
domain = "salsa.debian.org";
owner = "mdosch";
repo = "go-sendxmpp";
tag = "v${finalAttrs.version}";
hash = "sha256-S4KoCMlW+uUJcQTYkEtlRT4IAALfRFSj2UDZk4A5e5g=";
};
vendorHash = "sha256-Qe95u+M9X45cVO9MNLPxoyMyoWOAYYQ2n/GorD/PMIA=";
passthru = {
tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
};
updateScript = nix-update-script { };
};
meta = {
description = "Tool to send messages or files to an XMPP contact or MUC";
homepage = "https://salsa.debian.org/mdosch/go-sendxmpp";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [
jpds
];
mainProgram = "go-sendxmpp";
};
})

View File

@@ -0,0 +1,27 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "go-shadowsocks2";
version = "0.1.5";
src = fetchFromGitHub {
owner = "shadowsocks";
repo = "go-shadowsocks2";
rev = "v${version}";
sha256 = "sha256-z2+5q8XlxMN7x86IOMJ0qbrW4Wrm1gp8GWew51yBRFg=";
};
vendorHash = "sha256-RrHksWET5kicbdQ5HRDWhNxx4rTi2zaVeaPoLdg4uQw=";
meta = with lib; {
description = "Fresh implementation of Shadowsocks in Go";
homepage = "https://github.com/shadowsocks/go-shadowsocks2/";
license = licenses.asl20;
maintainers = with maintainers; [ oxzi ];
mainProgram = "go-shadowsocks2";
};
}

View File

@@ -0,0 +1,29 @@
{
buildGoModule,
fetchFromGitHub,
lib,
}:
buildGoModule rec {
pname = "go-swag";
version = "1.16.6";
src = fetchFromGitHub {
owner = "swaggo";
repo = "swag";
rev = "v${version}";
sha256 = "sha256-ixeHj+bqskQJOCxnJaU0IG9Qoe4SQk+McNY0Sy1tUwI=";
};
vendorHash = "sha256-P3WH4SrGL4Ejn4U34EEJA21Fne/UlOWg8jiI94Bp7Ms=";
subPackages = [ "cmd/swag" ];
meta = with lib; {
description = "Automatically generate RESTful API documentation with Swagger 2.0 for Go";
homepage = "https://github.com/swaggo/swag";
license = licenses.mit;
maintainers = with maintainers; [ stephenwithph ];
mainProgram = "swag";
};
}

View File

@@ -0,0 +1,39 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "go-swagger";
version = "0.32.3";
src = fetchFromGitHub {
owner = "go-swagger";
repo = "go-swagger";
tag = "v${version}";
hash = "sha256-L6EfHNwykqGtA1CZd/Py6QqeCz10VGjX/lEVHs6VB6g=";
};
vendorHash = "sha256-UQbPVrLehl2jwGXdJPrRo6JsAd/2A+NKEQwkRr3reOY=";
doCheck = false;
subPackages = [ "cmd/swagger" ];
ldflags = [
"-s"
"-w"
"-X github.com/go-swagger/go-swagger/cmd/swagger/commands.Version=${version}"
"-X github.com/go-swagger/go-swagger/cmd/swagger/commands.Commit=${src.rev}"
];
meta = {
description = "Golang implementation of Swagger 2.0, representation of your RESTful API";
homepage = "https://github.com/go-swagger/go-swagger";
changelog = "https://github.com/go-swagger/go-swagger/releases/tag/v${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ kalbasit ];
mainProgram = "swagger";
};
}

View File

@@ -0,0 +1,39 @@
{
lib,
buildGoModule,
fetchFromGitHub,
fetchpatch,
}:
buildGoModule rec {
pname = "go-symbols";
version = "0.1.1";
vendorHash = "sha256-8unWnxTQzPY8tKBtss9qQG+ksWyheKxKRlg65F0vWWU=";
src = fetchFromGitHub {
owner = "acroca";
repo = "go-symbols";
rev = "v${version}";
hash = "sha256-P2N4Hqrazu02CWOfAu7/KGlpjzjN65hkyWI1S5nh33s=";
};
patches = [
# Migrate to Go modules
(fetchpatch {
url = "https://github.com/acroca/go-symbols/commit/414c2283696b50fc5009055e5bc2590ce45f4400.patch";
hash = "sha256-9lndJhyN8eaovjQlfSRGP8lC4F+pAXUoR2AvYvhSx2U=";
})
];
meta = {
description = "Utility for extracting a JSON representation of the package symbols from a go source tree";
mainProgram = "go-symbols";
homepage = "https://github.com/acroca/go-symbols";
maintainers = with lib.maintainers; [
luftmensch-luftmensch
vdemeester
];
license = lib.licenses.mit;
};
}

View File

@@ -0,0 +1,62 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
nix-update-script,
versionCheckHook,
}:
buildGoModule (finalAttrs: {
pname = "go-task";
version = "3.45.4";
src = fetchFromGitHub {
owner = "go-task";
repo = "task";
tag = "v${finalAttrs.version}";
hash = "sha256-LRarr739kFDSxtmAqw8BnxpBVjfI8xgejxgxjeB2oQU=";
};
vendorHash = "sha256-/hnrVJzTqyTKlV/mK4074NE0VT4JSj7BvN3PWu6e4kI=";
nativeBuildInputs = [ installShellFiles ];
subPackages = [ "cmd/task" ];
ldflags = [
"-s"
"-w"
"-X=github.com/go-task/task/v3/internal/version.version=${finalAttrs.version}"
];
env.CGO_ENABLED = 0;
postInstall = ''
ln -s $out/bin/task $out/bin/go-task
''
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd task \
--bash <($out/bin/task --completion bash) \
--fish <($out/bin/task --completion fish) \
--zsh <($out/bin/task --completion zsh)
'';
nativeInstallCheckInputs = [
versionCheckHook
];
doInstallCheck = true;
versionCheckProgram = "${placeholder "out"}/bin/task";
versionCheckProgramArg = "--version";
passthru.updateScript = nix-update-script { };
meta = with lib; {
homepage = "https://taskfile.dev/";
description = "Task runner / simpler Make alternative written in Go";
changelog = "https://github.com/go-task/task/blob/v${finalAttrs.version}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ parasrah ];
};
})

View File

@@ -0,0 +1,45 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
let
version = "2.2.4";
in
buildGoModule {
pname = "go-toml";
inherit version;
src = fetchFromGitHub {
owner = "pelletier";
repo = "go-toml";
rev = "v${version}";
sha256 = "sha256-VKUrpSaGzkewNSyE0sB6PWVIQiraY7UxE5Wve+76UFk=";
};
vendorHash = null;
excludedPackages = [
"cmd/gotoml-test-decoder"
"cmd/gotoml-test-encoder"
"cmd/tomltestgen"
];
# allowGoReference adds the flag `-trimpath` which is also denoted by, go-toml's goreleaser config
# <https://github.com/pelletier/go-toml/blob/a3d5a0bb530b5206c728eed9cb57323061922bcb/.goreleaser.yaml#L13>
allowGoReference = true;
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
];
meta = {
description = "Go library for the TOML language";
homepage = "https://github.com/pelletier/go-toml";
changelog = "https://github.com/pelletier/go-toml/releases/tag/v${version}";
maintainers = [ lib.maintainers.isabelroses ];
license = lib.licenses.mit;
};
}

View File

@@ -0,0 +1,32 @@
{
buildGoModule,
lib,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "go-tools";
version = "2025.1.1";
src = fetchFromGitHub {
owner = "dominikh";
repo = "go-tools";
rev = version;
sha256 = "sha256-ekSOXaVSFdzM76tcj1hbtzhYw4fnFX3VkTnsGtJanXg=";
};
vendorHash = "sha256-HssfBnSKdVZVgf4f0mwsGTwhiszBlE2HmDy7cvyvJ60=";
excludedPackages = [ "website" ];
meta = with lib; {
description = "Collection of tools and libraries for working with Go code, including linters and static analysis";
homepage = "https://staticcheck.io";
license = licenses.mit;
maintainers = with maintainers; [
rvolosatovs
kalbasit
smasher164
];
};
}

View File

@@ -0,0 +1,50 @@
{
lib,
buildGoModule,
fetchFromGitHub,
nix-update-script,
}:
buildGoModule (finalAttrs: {
pname = "go-xmlstruct";
version = "1.11.2";
src = fetchFromGitHub {
owner = "twpayne";
repo = "go-xmlstruct";
tag = "v${finalAttrs.version}";
hash = "sha256-wkU8YIE3+kuC8g1/qNnW/nLxsDktS2NNTI88GWdwbLw=";
};
vendorHash = "sha256-myt5JjEDnLfkYkB+yb/oaH4dgIOB9qFcqcEb6KO5vBk=";
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
# The --help flag doesn't actually exist in goxmlstruct, causing it to return exit code 2,
# but this error condition is the only way to get the usage information.
output=$($out/bin/goxmlstruct --help 2>&1 || true)
if ! echo "$output" | grep -q "Usage of $out/bin/goxmlstruct:"; then
echo "Expected usage information not found in output"
echo "Got: $output"
exit 1
fi
runHook postInstallCheck
'';
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Generate Go structs from multiple XML documents";
mainProgram = "goxmlstruct";
homepage = "https://github.com/twpayne/go-xmlstruct";
changelog = "https://github.com/twpayne/go-xmlstruct/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ dvcorreia ];
};
})

View File

@@ -0,0 +1,37 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "go2rtc";
version = "1.9.10";
src = fetchFromGitHub {
owner = "AlexxIT";
repo = "go2rtc";
tag = "v${version}";
hash = "sha256-SWFVcfOfSCKuNJlahsZRY21n17vL1VjtDRiSZ5o3VGc=";
};
vendorHash = "sha256-k01+xngNA4SMCJa9Vhg+MxDgf973sUcrVXppwAz4MBs=";
env.CGO_ENABLED = 0;
ldflags = [
"-s"
"-w"
];
doCheck = false; # tests fail
meta = {
description = "Ultimate camera streaming application with support RTSP, RTMP, HTTP-FLV, WebRTC, MSE, HLS, MJPEG, HomeKit, FFmpeg, etc";
homepage = "https://github.com/AlexxIT/go2rtc";
changelog = "https://github.com/AlexxIT/go2rtc/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ hexa ];
mainProgram = "go2rtc";
};
}

View File

@@ -0,0 +1,56 @@
{
lib,
buildGoModule,
fetchFromGitHub,
xorg,
libglvnd,
pkg-config,
withGui ? true,
}:
buildGoModule rec {
pname = "go2tv" + lib.optionalString (!withGui) "-lite";
version = "1.18.1";
src = fetchFromGitHub {
owner = "alexballas";
repo = "go2tv";
tag = "v${version}";
hash = "sha256-Ic4Kcc5Vx1QXFt28o5ItGwcvsKCB2HdZvILPRoEKbgI=";
};
vendorHash = "sha256-xp/zdkNV4z3rQMV0b/7TD+ApiaDWxR/aqOKvakGKAcI=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [
xorg.libX11
xorg.libXcursor
xorg.libXrandr
xorg.libXinerama
xorg.libXi
xorg.libXext
xorg.libXxf86vm
libglvnd
];
ldflags = [
"-s"
"-w"
"-linkmode=external"
];
# conditionally build with GUI or not (go2tv or go2tv-lite sub-packages)
subPackages = [ "cmd/${pname}" ];
doCheck = false;
meta = {
description = "Cast media files to UPnP/DLNA Media Renderers and Smart TVs";
homepage = "https://github.com/alexballas/go2tv";
changelog = "https://github.com/alexballas/go2tv/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ gdamjan ];
mainProgram = pname;
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "go365";
version = "2.0";
src = fetchFromGitHub {
owner = "optiv";
repo = "Go365";
tag = "v${version}";
hash = "sha256-jmsbZrqc6XogUhuEWcU59v88id2uLqN/68URwylzWZI=";
};
vendorHash = "sha256-Io+69kIW4DV2EkA73pjaTcTRbDSYBf61R7F+141Jojs=";
postInstall = lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
mv $out/bin/Go365 $out/bin/$pname
'';
meta = {
description = "Office 365 enumeration tool";
homepage = "https://github.com/optiv/Go365";
changelog = "https://github.com/optiv/Go365/releases/tag/v${version}";
license = with lib.licenses; [ mit ];
maintainers = with lib.maintainers; [ fab ];
mainProgram = "Go365";
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "go9p";
version = "0.25.0";
src = fetchFromGitHub {
owner = "knusbaum";
repo = "go9p";
tag = "v${version}";
hash = "sha256-dqaj92LwHu5VRLLEvrUTFL9i61jG2qCARWBDMt9tGH8=";
};
vendorHash = "sha256-HupMxf8CXPhsnsQEnO1KsIJjY3l2jRJopQ2nVYhoYEE=";
meta = {
description = "Implementation of the 9p2000 protocol in Go";
homepage = "https://github.com/knusbaum/go9p";
license = lib.licenses.mit;
mainProgram = "mount9p";
maintainers = with lib.maintainers; [ aleksana ];
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "goa";
version = "3.21.5";
src = fetchFromGitHub {
owner = "goadesign";
repo = "goa";
rev = "v${version}";
hash = "sha256-3MRxiZK6rLc0Drn3Ha7YOZO3IGNkQNEpzppZwYcZLwg=";
};
vendorHash = "sha256-5XKAfUA3dh1Vgh72h1GeiheoL7E7jij3nAlncV5FjF8=";
subPackages = [ "cmd/goa" ];
meta = with lib; {
description = "Design-based APIs and microservices in Go";
mainProgram = "goa";
homepage = "https://goa.design";
license = licenses.mit;
maintainers = with maintainers; [ rushmorem ];
};
}

View File

@@ -0,0 +1,54 @@
{
lib,
stdenv,
autoreconfHook,
fetchFromGitHub,
gettext,
libmaxminddb,
ncurses,
openssl,
withGeolocation ? true,
}:
stdenv.mkDerivation rec {
pname = "goaccess";
version = "1.9.4";
src = fetchFromGitHub {
owner = "allinurl";
repo = "goaccess";
tag = "v${version}";
hash = "sha256-KevxuZuIrMybNlPZgVDLO0zQe4LfAKxfVBbHnyTUC/o=";
};
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [
ncurses
openssl
]
++ lib.optionals withGeolocation [ libmaxminddb ]
++ lib.optionals stdenv.hostPlatform.isDarwin [ gettext ];
configureFlags = [
"--enable-utf8"
"--with-openssl"
]
++ lib.optionals withGeolocation [ "--enable-geoip=mmdb" ];
env.NIX_CFLAGS_COMPILE = toString (
lib.optionals stdenv.hostPlatform.isDarwin [
"-DHOST_NAME_MAX=_POSIX_HOST_NAME_MAX"
]
);
meta = {
description = "Real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems";
homepage = "https://goaccess.io";
changelog = "https://github.com/allinurl/goaccess/raw/v${version}/ChangeLog";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ ederoyd46 ];
platforms = lib.platforms.linux ++ lib.platforms.darwin;
mainProgram = "goaccess";
};
}

View File

@@ -0,0 +1,37 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule {
pname = "goarista";
version = "0-unstable-2025-09-01";
src = fetchFromGitHub {
owner = "aristanetworks";
repo = "goarista";
rev = "4c0e3d6d22a8b50c5a7e107011bbd843ea3a1f76";
hash = "sha256-S1RKLcLhy8gPQlbJM4txOCqNWVHQOlJq2zY4Rdhfdls=";
};
vendorHash = "sha256-n+P3L3dT2kYuTyI2qX/nrLRgFIUsP3kkwNZmRQ8EFRs=";
checkFlags =
let
skippedTests = [
"TestDeepSizeof"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [ "TestDialTCPTimeoutWithTOS" ];
in
[ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
meta = {
description = "Collection of open-source tools for network management and monitoring mostly based around gNMI";
homepage = "https://github.com/aristanetworks/goarista";
license = lib.licenses.asl20;
maintainers = [ lib.maintainers.haylin ];
mainProgram = "gnmi";
};
}

View File

@@ -0,0 +1,12 @@
diff --git a/pkg/goatfile/unmarshal_test.go b/pkg/goatfile/unmarshal_test.go
index 089e89f..5b4191b 100644
--- a/pkg/goatfile/unmarshal_test.go
+++ b/pkg/goatfile/unmarshal_test.go
@@ -8,7 +8,6 @@ import (
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
- "github.com/studio-b12/goat/mocks"
"github.com/studio-b12/goat/pkg/set"
)

View File

@@ -0,0 +1,42 @@
{
lib,
fetchFromGitHub,
buildGoModule,
}:
buildGoModule rec {
pname = "goat-cli";
version = "1.4.0";
src = fetchFromGitHub {
repo = "goat";
owner = "studio-b12";
rev = "v${version}";
hash = "sha256-7inoRBVR7zmt0jUFAGYjoYT2cdda0qgzyXLL+GiBFMg=";
};
vendorHash = "sha256-b/v27pHA9LcFe4TC/EpelJVSkAg4sq7b8p2gk0bWsQc=";
ldflags = [
"-s"
"-w"
"-X github.com/studio-b12/goat/internal/version.Version=${version}"
"-X github.com/studio-b12/goat/internal/version.CommitHash=${src.rev}"
];
patches = [
./mock-fix.patch
];
# Checks currently fail because of an issue with github.com/studio-b12/goat/mocks
doCheck = false;
meta = {
description = "Integration testing tool for HTTP APIs using a simple script language";
homepage = "https://studio-b12.github.io/goat/";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ kashw2 ];
mainProgram = "goat";
};
}

View File

@@ -0,0 +1,31 @@
{
lib,
buildGoModule,
fetchFromGitHub,
nix-update-script,
}:
buildGoModule {
pname = "goat";
version = "0-unstable-2024-07-31"; # Upstream currently isn't doing tags/releases.
src = fetchFromGitHub {
owner = "blampe";
repo = "goat";
rev = "177de93b192b8ffae608e5d9ec421cc99bf68402";
hash = "sha256-/DR6RN7dCROp18P7dgm4DMppwdtYl0AOVNMEtXz8ldk=";
};
vendorHash = "sha256-24YllmSUzRcqWbJ8NLyhsJaoGG2+yE8/eXX6teJ1nV8=";
passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };
meta = {
description = "Go ASCII Tool. Render ASCII art as SVG diagrams";
homepage = "https://github.com/blampe/goat";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ katexochen ];
mainProgram = "goat";
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,59 @@
{
lib,
buildGoModule,
fetchFromGitHub,
testers,
goatcounter,
nixosTests,
}:
buildGoModule rec {
pname = "goatcounter";
version = "2.6.0";
src = fetchFromGitHub {
owner = "arp242";
repo = "goatcounter";
rev = "v${version}";
hash = "sha256-MF4ipSZfN5tAphe+gde7SPAypyi1uRyaDBv58u3lEQE=";
};
vendorHash = "sha256-cwR3wCRbvISKyhHCnIYDIGSZ+1DowfGT4RAkF/d6F5Q=";
subPackages = [ "cmd/goatcounter" ];
modRoot = ".";
# Derived from the upstream build scripts:
#
# `-trimpath` is used, which `allowGoReference` sets
allowGoReference = true;
# Flags set in the upstream build.
ldflags = [
"-s"
"-w"
"-X zgo.at/goatcounter/v2.Version=${src.rev}"
];
passthru.tests = {
moduleTest = nixosTests.goatcounter;
version = testers.testVersion {
package = goatcounter;
command = "goatcounter version";
version = "v${version}";
};
};
meta = {
description = "Easy web analytics. No tracking of personal data";
changelog = "https://github.com/arp242/goatcounter/releases/tag/${src.rev}";
longDescription = ''
GoatCounter is an open source web analytics platform available as a hosted
service (free for non-commercial use) or self-hosted app. It aims to offer easy
to use and meaningful privacy-friendly web analytics as an alternative to
Google Analytics or Matomo.
'';
homepage = "https://github.com/arp242/goatcounter";
license = lib.licenses.eupl12;
maintainers = with lib.maintainers; [ tylerjl ];
mainProgram = "goatcounter";
};
}

View File

@@ -0,0 +1,49 @@
{
buildGoModule,
fetchFromGitHub,
lib,
stdenv,
gawk,
}:
buildGoModule rec {
pname = "goawk";
version = "1.29.1";
src = fetchFromGitHub {
owner = "benhoyt";
repo = "goawk";
rev = "v${version}";
hash = "sha256-PQtayS2403ldNiE/xMQ/Oy+BsZB1ixDALuZcjhRyxLY=";
};
vendorHash = null;
nativeCheckInputs = [ gawk ];
postPatch = ''
substituteInPlace goawk_test.go \
--replace "TestCommandLine" "SkipCommandLine" \
--replace "TestDevStdout" "SkipDevStdout" \
--replace "TestFILENAME" "SkipFILENAME" \
--replace "TestWildcards" "SkipWildcards"
substituteInPlace interp/interp_test.go \
--replace "TestShellCommand" "SkipShellCommand"
'';
checkFlags = [
"-awk"
"${gawk}/bin/gawk"
];
doCheck = (stdenv.system != "aarch64-darwin");
meta = with lib; {
description = "POSIX-compliant AWK interpreter written in Go";
homepage = "https://benhoyt.com/writings/goawk/";
license = licenses.mit;
mainProgram = "goawk";
maintainers = with maintainers; [ abbe ];
};
}

View File

@@ -0,0 +1,43 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
glib,
bison,
flex,
gnome,
}:
stdenv.mkDerivation rec {
pname = "gob2";
version = "2.0.20";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "5fe5d7990fd65b0d4b617ba894408ebaa6df453f2781c15a1cfdf2956c0c5428";
};
# configure script looks for d-bus but it is only needed for tests
nativeBuildInputs = [ pkg-config ];
buildInputs = [
glib
bison
flex
];
passthru = {
updateScript = gnome.updateScript {
packageName = pname;
versionPolicy = "none";
};
};
meta = {
description = "Preprocessor for making GObjects with inline C code";
mainProgram = "gob2";
homepage = "https://www.jirka.org/gob.html";
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,30 @@
{
lib,
rustPlatform,
fetchFromGitHub,
}:
let
version = "0.1.0-alpha.5";
in
rustPlatform.buildRustPackage {
pname = "gobang";
inherit version;
src = fetchFromGitHub {
owner = "tako8ki";
repo = "gobang";
rev = "v${version}";
hash = "sha256-RinfQhG7iCp0Xcs9kLs3I2/wjkJEgCjFYe3mS+FY9Ak=";
};
cargoPatches = [ ./update-sqlx.patch ];
cargoHash = "sha256-K9oo0QrqcPNdV7WMlgSCVc+7AVfoyDkovvJLqKJPvTQ=";
meta = {
description = "Cross-platform TUI database management tool written in Rust";
homepage = "https://github.com/tako8ki/gobang";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ figsoda ];
};
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,30 @@
{
buildGoModule,
fetchFromGitHub,
lib,
}:
buildGoModule rec {
pname = "gobatmon";
version = "0.4.0";
src = fetchFromGitHub {
owner = "ulinja";
repo = "gobatmon";
tag = "v${version}";
hash = "sha256-morcsU9RhY17XlaDC6J0uDRYiSYjnXquFjuOh7AEKkA=";
};
vendorHash = "sha256-WUTGAYigUjuZLHO1YpVhFSWpvULDZfGMfOXZQqVYAfs=";
meta = {
description = "Simple battery level monitor for Linux written in Go";
homepage = "https://github.com/ulinja/gobatmon";
license = lib.licenses.wtfpl;
maintainers = with lib.maintainers; [ ulinja ];
mainProgram = "gobatmon";
downloadPage = "https://github.com/ulinja/gobatmon/releases/latest";
changelog = "https://github.com/ulinja/gobatmon/blob/v${version}/CHANGELOG.md";
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,42 @@
{
lib,
rustPlatform,
fetchFromGitHub,
xorg,
installShellFiles,
pandoc,
}:
rustPlatform.buildRustPackage rec {
pname = "gobble";
version = "1.3";
src = fetchFromGitHub {
owner = "EmperorPenguin18";
repo = "gobble";
rev = version;
hash = "sha256-g4154Axvjp9jbE0lvMeNGM+v2UxkAsZqt9kPv5bhVK8=";
};
cargoHash = "sha256-DnIZTeRyxhmVK2uB21ScPiEyL4k9kAWfVoLNIAM9P68=";
buildInputs = [ xorg.libxcb ];
nativeBuildInputs = [
pandoc
installShellFiles
];
postInstall = ''
pandoc gobble.1.md -s -t man -o gobble.1
installManPage gobble.1
'';
meta = {
description = "Rust rewrite of Devour";
homepage = "https://github.com/EmperorPenguin18/gobble";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ vuimuich ];
platforms = lib.platforms.linux;
mainProgram = "gobble";
};
}

View File

@@ -0,0 +1,64 @@
{
avahiSupport ? false, # build support for Avahi in libinfinity
lib,
stdenv,
fetchFromGitHub,
autoconf,
automake,
pkg-config,
wrapGAppsHook3,
yelp-tools,
gtkmm3,
gsasl,
gtksourceview3,
libxmlxx,
libinfinity,
intltool,
itstool,
}:
let
libinf = libinfinity.override {
gtkWidgets = true;
inherit avahiSupport;
};
in
stdenv.mkDerivation rec {
pname = "gobby";
version = "0.6.0";
src = fetchFromGitHub {
owner = "gobby";
repo = "gobby";
rev = "v${version}";
sha256 = "06cbc2y4xkw89jaa0ayhgh7fxr5p2nv3jjs8h2xcbbbgwaw08lk0";
};
nativeBuildInputs = [
autoconf
automake
pkg-config
intltool
itstool
yelp-tools
wrapGAppsHook3
];
buildInputs = [
gtkmm3
gsasl
gtksourceview3
libxmlxx
libinf
];
preConfigure = "./autogen.sh";
meta = with lib; {
homepage = "http://gobby.0x539.de/";
description = "GTK-based collaborative editor supporting multiple documents in one session and a multi-user chat";
mainProgram = "gobby-0.5";
license = lib.licenses.gpl2Plus;
maintainers = [ ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,52 @@
{
stdenv,
buildGoModule,
fetchFromGitHub,
lib,
enableStatic ? stdenv.hostPlatform.isStatic,
}:
buildGoModule (finalAttrs: {
pname = "gobetween";
version = "0.8.1";
src = fetchFromGitHub {
owner = "yyyar";
repo = "gobetween";
tag = finalAttrs.version;
hash = "sha256-xmyqDi2q7J909cWMec9z2u0DJVJjzv86vjYkSfw/3o8=";
};
vendorHash = "sha256-3jv0dSsJg90J64Ay7USkUOi8cF1Sj+A7v/snJEdJPFU=";
env = {
CGO_ENABLED = 0;
};
buildPhase = ''
runHook preBuild
make -e build${lib.optionalString enableStatic "-static"}
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp bin/gobetween $out/bin
cp -r share $out/share
cp -r config $out/share
runHook postInstall
'';
meta = {
description = "Modern & minimalistic load balancer for the Сloud era";
homepage = "https://gobetween.io";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ tomberek ];
mainProgram = "gobetween";
};
})

View File

@@ -0,0 +1,39 @@
{
buildGoModule,
fetchFromGitHub,
lib,
}:
buildGoModule rec {
pname = "gobgp";
version = "3.37.0";
src = fetchFromGitHub {
owner = "osrg";
repo = "gobgp";
rev = "v${version}";
sha256 = "sha256-Nh4JmyZHrT7uPi9+CbmS3h6ezKoicCvEByUJVULMac4=";
};
vendorHash = "sha256-HpATJztX31mNWkpeDqOE4rTzhCk3c7E1PtZnKW8Axyo=";
postConfigure = ''
export CGO_ENABLED=0
'';
ldflags = [
"-s"
"-w"
"-extldflags '-static'"
];
subPackages = [ "cmd/gobgp" ];
meta = with lib; {
description = "CLI tool for GoBGP";
homepage = "https://osrg.github.io/gobgp/";
license = licenses.asl20;
maintainers = with maintainers; [ higebu ];
mainProgram = "gobgp";
};
}

View File

@@ -0,0 +1,45 @@
{
lib,
buildGoModule,
fetchFromGitHub,
nixosTests,
}:
buildGoModule rec {
pname = "gobgpd";
version = "3.37.0";
src = fetchFromGitHub {
owner = "osrg";
repo = "gobgp";
tag = "v${version}";
hash = "sha256-Nh4JmyZHrT7uPi9+CbmS3h6ezKoicCvEByUJVULMac4=";
};
vendorHash = "sha256-HpATJztX31mNWkpeDqOE4rTzhCk3c7E1PtZnKW8Axyo=";
postConfigure = ''
export CGO_ENABLED=0
'';
ldflags = [
"-s"
"-w"
"-extldflags '-static'"
];
subPackages = [
"cmd/gobgpd"
];
passthru.tests = { inherit (nixosTests) gobgpd; };
meta = {
description = "BGP implemented in Go";
mainProgram = "gobgpd";
homepage = "https://osrg.github.io/gobgp/";
changelog = "https://github.com/osrg/gobgp/releases/tag/v${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ higebu ];
};
}

View File

@@ -0,0 +1,37 @@
{
lib,
stdenv,
fetchurl,
udevCheckHook,
}:
stdenv.mkDerivation rec {
pname = "gobi_loader";
version = "0.7";
src = fetchurl {
url = "https://www.codon.org.uk/~mjg59/gobi_loader/download/${pname}-${version}.tar.gz";
sha256 = "0jkmpqkiddpxrzl2s9s3kh64ha48m00nn53f82m1rphw8maw5gbq";
};
postPatch = ''
substituteInPlace 60-gobi.rules --replace "gobi_loader" "${placeholder "out"}/lib/udev/gobi_loader"
substituteInPlace 60-gobi.rules --replace "/lib/firmware" "/run/current-system/firmware"
'';
nativeBuildInputs = [
udevCheckHook
];
doInstallCheck = true;
makeFlags = [ "prefix=${placeholder "out"}" ];
meta = with lib; {
description = "Firmware loader for Qualcomm Gobi USB chipsets";
homepage = "https://www.codon.org.uk/~mjg59/gobi_loader/";
license = with licenses; [ gpl2Only ];
maintainers = with maintainers; [ _0x4A6F ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "goblob";
version = "1.2.2";
src = fetchFromGitHub {
owner = "Macmod";
repo = "goblob";
tag = "v${version}";
hash = "sha256-FnSlfLi40VwDyQY77PvhV7EbhUDs1uGx0VsgP8HgKTw=";
};
vendorHash = null;
ldflags = [
"-s"
"-w"
];
meta = {
description = "Enumeration tool for publicly exposed Azure Storage blobs";
mainProgram = "goblob";
homepage = "https://github.com/Macmod/goblob";
changelog = "https://github.com/Macmod/goblob/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
buildGo125Module,
fetchFromGitHub,
}:
buildGo125Module rec {
pname = "gobuster";
version = "3.8.2";
src = fetchFromGitHub {
owner = "OJ";
repo = "gobuster";
tag = "v${version}";
hash = "sha256-/woa0w/+aa1S2+Om5EK8I1XEI1mI47vNS1+GDnQHlTA=";
};
__darwinAllowLocalNetworking = true;
vendorHash = "sha256-rTN8omPTfSVfp/ythGWxVyq6rR7tJCN2znwMGixiw90=";
ldflags = [
"-s"
"-w"
];
meta = {
description = "Tool used to brute-force URIs, DNS subdomains, Virtual Host names on target web servers";
homepage = "https://github.com/OJ/gobuster";
changelog = "https://github.com/OJ/gobuster/releases/tag/${src.tag}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
fab
pamplemousse
];
mainProgram = "gobuster";
};
}

View File

@@ -0,0 +1,45 @@
{
lib,
# Build fails with Go 1.25, with the following error:
# 'vendor/golang.org/x/tools/internal/tokeninternal/tokeninternal.go:64:9: invalid array length -delta * delta (constant -256 of type int64)'
# Wait for upstream to update their vendored dependencies before unpinning.
buildGo124Module,
fetchFromGitHub,
}:
buildGo124Module (finalAttrs: {
pname = "gobusybox";
version = "0.2.0-unstable-2024-03-05";
src = fetchFromGitHub {
owner = "u-root";
repo = "gobusybox";
rev = "d8fbaca23e26beab648c86c8a67335ad65d0d15c";
hash = "sha256-hS6YwN6eekyDjp7E6sisW+8HO5WHTEC68XyKZFPihK4=";
};
sourceRoot = "${finalAttrs.src.name}/src";
subPackages = [
"cmd/gencmddeps"
"cmd/goanywhere"
"cmd/makebb"
"cmd/makebbmain"
"cmd/rewritepkg"
];
env.CGO_ENABLED = "0";
vendorHash = "sha256-s4bQLXNFhyAk+UNI1xJXQABjBXtPFXiWvmdttV/6Bm8=";
ldflags = [ "-s" ];
meta = {
description = "Tools for compiling many Go commands into one binary to save space";
longDescription = "Builds are supported for vendor-based Go and module-based Go";
homepage = "https://github.com/u-root/gobusybox";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ katexochen ];
mainProgram = "makebb";
};
})

View File

@@ -0,0 +1,53 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
versionCheckHook,
nix-update-script,
}:
buildGoModule rec {
pname = "gocatcli";
version = "1.1.2";
src = fetchFromGitHub {
owner = "deadc0de6";
repo = "gocatcli";
tag = "v${version}";
hash = "sha256-kNXuQlBLiDEbKwtSmdX4XPLyMZFyBvLKEmQdCDug4ao=";
};
vendorHash = "sha256-gi4/ekLGh5T5D3ifW/FF+ewHesWOyhY01ZZIG6+OENo=";
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd gocatcli \
--bash <($out/bin/gocatcli completion bash) \
--fish <($out/bin/gocatcli completion fish) \
--zsh <($out/bin/gocatcli completion zsh)
'';
nativeCheckInputs = [ versionCheckHook ];
doCheck = true;
passthru.updateScript = nix-update-script { };
meta = {
homepage = "https://github.com/deadc0de6/gocatcli";
changelog = "https://github.com/deadc0de6/gocatcli/releases/tag/v${version}";
description = "Command line catalog tool for your offline data";
longDescription = ''
gocatcli is a catalog tool for your offline data. It indexes external
media in a catalog file and allows to quickly find specific files or even
navigate in the catalog as if it was a mounted drive
'';
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [
nadir-ishiguro
];
mainProgram = "gocatcli";
};
}

View File

@@ -0,0 +1,42 @@
{
lib,
stdenv,
fetchurl,
unzip,
nixosTests,
}:
stdenv.mkDerivation rec {
pname = "gocd-agent";
version = "23.1.0";
rev = "16079";
src = fetchurl {
url = "https://download.go.cd/binaries/${version}-${rev}/generic/go-agent-${version}-${rev}.zip";
sha256 = "sha256-L2MOkbVHoQu99lKrbnsNkhuU0SZ8VANSK72GZrGLbiQ=";
};
passthru.tests = { inherit (nixosTests) gocd-agent; };
meta = with lib; {
description = "Continuous delivery server specializing in advanced workflow modeling and visualization";
homepage = "http://www.go.cd";
license = licenses.asl20;
platforms = platforms.all;
sourceProvenance = with sourceTypes; [
binaryBytecode
binaryNativeCode
];
maintainers = with maintainers; [
grahamc
swarren83
];
};
nativeBuildInputs = [ unzip ];
buildCommand = "
unzip $src -d $out
mv $out/go-agent-${version} $out/go-agent
";
}

View File

@@ -0,0 +1,45 @@
{
lib,
stdenv,
fetchurl,
unzip,
nixosTests,
}:
stdenv.mkDerivation rec {
pname = "gocd-server";
version = "23.1.0";
rev = "16079";
src = fetchurl {
url = "https://download.go.cd/binaries/${version}-${rev}/generic/go-server-${version}-${rev}.zip";
sha256 = "sha256-//d6izGm1odE25H/PI5pn51FfUL4/6GbLwKUKAqZ3Kw=";
};
meta = with lib; {
description = "Continuous delivery server specializing in advanced workflow modeling and visualization";
homepage = "http://www.go.cd";
license = licenses.asl20;
platforms = platforms.all;
sourceProvenance = with sourceTypes; [
binaryBytecode
binaryNativeCode
];
maintainers = with maintainers; [
grahamc
swarren83
];
};
nativeBuildInputs = [ unzip ];
passthru.tests = {
inherit (nixosTests) gocd-server;
};
buildCommand = "
unzip $src -d $out
mv $out/go-server-${version} $out/go-server
mkdir -p $out/go-server/conf
";
}

View File

@@ -0,0 +1,53 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "gocode-gomod";
version = "1.0.0";
# we must allow references to the original `go` package,
# because `gocode` needs to dig into $GOROOT to provide completions for the
# standard packages.
allowGoReference = true;
src = fetchFromGitHub {
owner = "stamblerre";
repo = "gocode";
rev = "v${version}";
sha256 = "YAOYrPPKgnjCErq8+iW0Le51clGBv0MJy2Nnn7UVo/s=";
};
vendorHash = null;
postInstall = ''
mv $out/bin/gocode $out/bin/gocode-gomod
'';
doCheck = false; # fails on go 1.17
meta = with lib; {
description = "Autocompletion daemon for the Go programming language";
mainProgram = "gocode-gomod";
longDescription = ''
Gocode is a helper tool which is intended to be integrated with your
source code editor, like vim, neovim and emacs. It provides several
advanced capabilities, which currently includes:
- Context-sensitive autocompletion
It is called daemon, because it uses client/server architecture for
caching purposes. In particular, it makes autocompletions very fast.
Typical autocompletion time with warm cache is 30ms, which is barely
noticeable.
'';
homepage = "https://github.com/stamblerre/gocode";
license = licenses.mit;
maintainers = with maintainers; [
kalbasit
rvolosatovs
];
};
}

View File

@@ -0,0 +1,35 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "goconst";
version = "1.8.2";
excludedPackages = [ "tests" ];
src = fetchFromGitHub {
owner = "jgautheron";
repo = "goconst";
rev = "v${version}";
sha256 = "sha256-srBUqWfiuMqpKH/O66gJEEKFOC/ifsu2xscEnp54cRY=";
};
vendorHash = null;
ldflags = [
"-s"
"-w"
];
meta = with lib; {
description = "Find in Go repeated strings that could be replaced by a constant";
mainProgram = "goconst";
homepage = "https://github.com/jgautheron/goconst";
license = licenses.mit;
maintainers = with maintainers; [ kalbasit ];
platforms = platforms.linux ++ platforms.darwin;
};
}

Some files were not shown because too many files have changed in this diff Show More