{gama-tui,gocovsh,golds,pkgsite,tcount}: init (#358316)

authored by Sandro and committed by GitHub 8b047c00 5d946517

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