go-symbols: migrate to buildGoModule

This commit is contained in:
luftmensch-luftmensch 2024-06-08 14:56:12 +02:00
parent 224c195208
commit 77cd3ce5b0
No known key found for this signature in database
4 changed files with 39 additions and 37 deletions

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}";
sha256 = "0yyzw6clndb2r5j9isyd727njs98zzp057v314vfvknsm8g7hqrz";
};
patches = [
# Migrate to Go modules
(fetchpatch {
url = "https://github.com/acroca/go-symbols/commit/414c2283696b50fc5009055e5bc2590ce45f4400.patch";
hash = "sha256-9lndJhyN8eaovjQlfSRGP8lC4F+pAXUoR2AvYvhSx2U=";
})
];
meta = {
description = "A 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

@ -1,24 +0,0 @@
{ lib, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
pname = "go-symbols";
version = "0.1.1";
goPackagePath = "github.com/acroca/go-symbols";
goDeps = ./deps.nix;
src = fetchFromGitHub {
owner = "acroca";
repo = "go-symbols";
rev = "v${version}";
sha256 = "0yyzw6clndb2r5j9isyd727njs98zzp057v314vfvknsm8g7hqrz";
};
meta = {
description = "A 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; [ vdemeester ];
license = lib.licenses.mit;
};
}

View File

@ -1,11 +0,0 @@
[
{
goPackagePath = "golang.org/x/tools";
fetch = {
type = "git";
url = "https://github.com/golang/tools";
rev = "96b5a5404f303f074e6117d832a9873c439508f0";
sha256 = "1h6r9xyp1v3w2x8d108vzghn65l6ia2h895irypmrwymfcp30y42";
};
}
]

View File

@ -27523,8 +27523,6 @@ with pkgs;
go-protobuf = callPackage ../development/tools/go-protobuf { };
go-symbols = callPackage ../development/tools/go-symbols { };
go-toml = callPackage ../development/tools/go-toml { };
go-outline = callPackage ../development/tools/go-outline { };