{gama-tui,gocovsh,golds,pkgsite,tcount}: init (#358316)
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
{
|
||||
lib,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "gama-tui";
|
||||
version = "1.1.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "termkit";
|
||||
repo = "gama";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-laE3lW2MX3vYxsF5iHl0sLKCAPRAIZGQs72+vdbX4t0=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-rx18df0iiYqQToydXcA6Kqsn3lePIL1RNMSvD+a4WrI=";
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-X main.Version=v${version}"
|
||||
];
|
||||
|
||||
# requires network access
|
||||
doCheck = false;
|
||||
|
||||
meta = {
|
||||
description = "Manage your GitHub Actions from Terminal with great UI";
|
||||
homepage = "https://github.com/termkit/gama";
|
||||
changelog = "https://github.com/termkit/gama/releases";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
maintainers = with lib.maintainers; [ phanirithvij ];
|
||||
mainProgram = "gama";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
lib,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
testers,
|
||||
gocovsh, # self
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "gocovsh";
|
||||
version = "0.6.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "orlangure";
|
||||
repo = "gocovsh";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-VZNu1uecFVVDgF4xDLTgkCahUWbM+1XASV02PEUfmr0=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-Fb7BIWojOSUIlBdjIt57CSvF1a+x33sB45Z0a86JMUg=";
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-X main.version=${version}"
|
||||
"-X main.commit=v${version}"
|
||||
"-X main.date=19700101T000000Z"
|
||||
];
|
||||
|
||||
passthru.tests.version = testers.testVersion { package = gocovsh; };
|
||||
|
||||
meta = {
|
||||
description = "Go Coverage in your terminal: a tool for exploring Go Coverage reports from the command line";
|
||||
homepage = "https://github.com/orlangure/gocovsh";
|
||||
changelog = "https://github.com/orlangure/gocovsh/releases";
|
||||
# https://github.com/orlangure/gocovsh/blob/8880bc63283c13a1d630ce3817c7165a6c210d46/.goreleaser.yaml#L33
|
||||
license = lib.licenses.gpl3Only;
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = with lib.maintainers; [ phanirithvij ];
|
||||
mainProgram = "gocovsh";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
diff --git a/internal/server/info_module.go b/internal/server/info_module.go
|
||||
index d2513bd..ad2921e 100644
|
||||
--- a/internal/server/info_module.go
|
||||
+++ b/internal/server/info_module.go
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
+ "os/exec"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"strings"
|
||||
@@ -756,7 +757,11 @@ func findGoToolchainVersionFromGoRoot(goroot string) (string, error) {
|
||||
versionData, err = ioutil.ReadFile(filepath.Join(goroot, "VERSION.cache"))
|
||||
}
|
||||
if err != nil {
|
||||
- return "", fmt.Errorf("failed to get Go toolchain version in GOROOT (%s)", goroot)
|
||||
+ cmd := exec.Command("go", "env", "GOVERSION")
|
||||
+ versionData, err = cmd.Output()
|
||||
+ if err != nil {
|
||||
+ return "", fmt.Errorf("failed to get Go toolchain version in GOROOT (%s)", goroot)
|
||||
+ }
|
||||
}
|
||||
matches := findGoVersionRegexp.FindSubmatch(versionData)
|
||||
if len(matches) >= 1 {
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
lib,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
testers,
|
||||
golds, # self
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "golds";
|
||||
version = "0.7.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "go101";
|
||||
repo = "golds";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-6YkyKJtSAFFYidMlZXSjNpjyIIaTlibg/QMMin/NbU0=";
|
||||
};
|
||||
|
||||
# nixpkgs is not using the go distpack archive and missing a VERSION file in the source
|
||||
# but we can use go env to get the same information
|
||||
# https://github.com/NixOS/nixpkgs/pull/358316#discussion_r1855322027
|
||||
patches = [ ./info_module-gover.patch ];
|
||||
|
||||
vendorHash = "sha256-omjHRZB/4VzPhc6RrFY11s6BRD69+Y4RRZ2XdeKbZf0=";
|
||||
|
||||
ldflags = [ "-s" ];
|
||||
|
||||
passthru.tests.version = testers.testVersion {
|
||||
package = golds;
|
||||
version = "v${version}";
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Experimental Go local docs server/generator and code reader implemented with some fresh ideas";
|
||||
homepage = "https://github.com/go101/golds";
|
||||
license = lib.licenses.mit;
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = with lib.maintainers; [ phanirithvij ];
|
||||
mainProgram = "golds";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
lib,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "pkgsite";
|
||||
version = "0-unstable-2024-12-06";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "golang";
|
||||
repo = "pkgsite";
|
||||
rev = "37884bfc1a9e2aa46989ac56e671bcbd240bb4f7";
|
||||
hash = "sha256-RZTRfB1mEM13x/vLrxu7877C7Zh/kJxpYMP9xR2OOXw=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-Ijcj1Nq4WjXcUqmoDkpO9I4rl/4/TMXFMQVAlEK11R8=";
|
||||
|
||||
subPackages = [ "cmd/pkgsite" ];
|
||||
|
||||
ldflags = [ "-s" ];
|
||||
|
||||
passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };
|
||||
|
||||
meta = {
|
||||
description = "Official tool to extract and generate documentation for Go projects like pkg.go.dev";
|
||||
homepage = "https://github.com/golang/pkgsite";
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = with lib.maintainers; [ phanirithvij ];
|
||||
mainProgram = "pkgsite";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
lib,
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "tcount";
|
||||
version = "0-unstable-2023-04-20";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rrethy";
|
||||
repo = "tcount";
|
||||
rev = "341d9aa29512257bf7dfd7e843d02fdcfd583387";
|
||||
hash = "sha256-M4EvaX9qDBYeapeegp6Ki7FJLFosVR1B42QRAh5Eugo=";
|
||||
};
|
||||
|
||||
useFetchCargoVendor = true;
|
||||
|
||||
cargoHash = "sha256-Sn7hu+2jQFd2u8tpfTxnEO+syrO96gfgz6ouHxJnpLg=";
|
||||
|
||||
passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };
|
||||
|
||||
meta = {
|
||||
description = "Count your code by tokens and patterns in the syntax tree. A tokei/scc/cloc alternative";
|
||||
homepage = "https://github.com/rrethy/tcount";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ phanirithvij ];
|
||||
mainProgram = "tcount";
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user