Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

use finalAttrs on Go packages I maintain (#397910)

authored by Paul Meyer and committed by GitHub 3ecf126c 530c64ab

+45 -45
+4 -4
pkgs/by-name/at/athens/package.nix
··· 6 6 athens, 7 7 }: 8 8 9 - buildGoModule rec { 9 + buildGoModule (finalAttrs: { 10 10 pname = "athens"; 11 11 version = "0.15.4"; 12 12 13 13 src = fetchFromGitHub { 14 14 owner = "gomods"; 15 15 repo = "athens"; 16 - rev = "v${version}"; 16 + tag = "v${finalAttrs.version}"; 17 17 hash = "sha256-6NBdif8rQ1aj4nTYXhrWyErzRv0q8WpIheRnb2FCnkU="; 18 18 }; 19 19 ··· 22 22 env.CGO_ENABLED = "0"; 23 23 ldflags = [ 24 24 "-s" 25 - "-X github.com/gomods/athens/pkg/build.version=${version}" 25 + "-X github.com/gomods/athens/pkg/build.version=${finalAttrs.version}" 26 26 ]; 27 27 28 28 subPackages = [ "cmd/proxy" ]; ··· 47 47 ]; 48 48 platforms = platforms.unix; 49 49 }; 50 - } 50 + })
+5 -5
pkgs/by-name/bl/bluetuith/package.nix
··· 5 5 nix-update-script, 6 6 }: 7 7 8 - buildGoModule rec { 8 + buildGoModule (finalAttrs: { 9 9 pname = "bluetuith"; 10 10 version = "0.2.3"; 11 11 12 12 src = fetchFromGitHub { 13 13 owner = "darkhz"; 14 - repo = pname; 15 - rev = "v${version}"; 14 + repo = "bluetuith"; 15 + tag = "v${finalAttrs.version}"; 16 16 hash = "sha256-yXH/koNT4ec/SOZhSU01iPNAfD1MdMjM2+wNmjXWsrk="; 17 17 }; 18 18 ··· 23 23 ldflags = [ 24 24 "-s" 25 25 "-w" 26 - "-X github.com/darkhz/bluetuith/cmd.Version=${version}@nixpkgs" 26 + "-X github.com/darkhz/bluetuith/cmd.Version=${finalAttrs.version}@nixpkgs" 27 27 ]; 28 28 29 29 passthru.updateScript = nix-update-script { }; ··· 47 47 katexochen 48 48 ]; 49 49 }; 50 - } 50 + })
+3 -3
pkgs/by-name/ca/capslock/package.nix
··· 5 5 nix-update-script, 6 6 }: 7 7 8 - buildGoModule rec { 8 + buildGoModule (finalAttrs: { 9 9 pname = "capslock"; 10 10 version = "0.2.7"; 11 11 12 12 src = fetchFromGitHub { 13 13 owner = "google"; 14 14 repo = "capslock"; 15 - rev = "v${version}"; 15 + rev = "v${finalAttrs.version}"; 16 16 hash = "sha256-kRuEcrx9LBzCpXFWlc9bSsgZt84T8R8VFdbAWAseSPQ="; 17 17 }; 18 18 ··· 33 33 mainProgram = "capslock"; 34 34 maintainers = with lib.maintainers; [ katexochen ]; 35 35 }; 36 - } 36 + })
+4 -4
pkgs/by-name/di/distribution/package.nix
··· 7 7 distribution, 8 8 }: 9 9 10 - buildGoModule rec { 10 + buildGoModule (finalAttrs: { 11 11 pname = "distribution"; 12 12 version = "3.0.0"; 13 13 14 14 src = fetchFromGitHub { 15 15 owner = "distribution"; 16 16 repo = "distribution"; 17 - tag = "v${version}"; 17 + tag = "v${finalAttrs.version}"; 18 18 hash = "sha256-myezQTEdH7kkpCoAeZMf5OBxT4Bz8Qx6vCnwim230RY="; 19 19 }; 20 20 ··· 30 30 passthru = { 31 31 tests.version = testers.testVersion { 32 32 package = distribution; 33 - version = "v${version}"; 33 + version = "v${finalAttrs.version}"; 34 34 }; 35 35 updateScript = nix-update-script { }; 36 36 }; ··· 50 50 mainProgram = "registry"; 51 51 platforms = platforms.unix; 52 52 }; 53 - } 53 + })
+5 -5
pkgs/by-name/go/go-critic/package.nix
··· 7 7 go-critic, 8 8 }: 9 9 10 - buildGoModule rec { 10 + buildGoModule (finalAttrs: { 11 11 pname = "go-critic"; 12 12 version = "0.13.0"; 13 13 14 14 src = fetchFromGitHub { 15 15 owner = "go-critic"; 16 16 repo = "go-critic"; 17 - rev = "v${version}"; 17 + rev = "v${finalAttrs.version}"; 18 18 hash = "sha256-0AOhq7OhSHub4I6XXL018hg6i2ERkIbZCrO9osNjvHw="; 19 19 }; 20 20 ··· 27 27 allowGoReference = true; 28 28 29 29 ldflags = [ 30 - "-X main.Version=${version}" 30 + "-X main.Version=${finalAttrs.version}" 31 31 ]; 32 32 33 33 passthru = { ··· 41 41 meta = { 42 42 description = "Most opinionated Go source code linter for code audit"; 43 43 homepage = "https://go-critic.com/"; 44 - changelog = "https://github.com/go-critic/go-critic/releases/tag/${src.rev}"; 44 + changelog = "https://github.com/go-critic/go-critic/releases/tag/${finalAttrs.src.rev}"; 45 45 license = lib.licenses.mit; 46 46 mainProgram = "gocritic"; 47 47 maintainers = with lib.maintainers; [ katexochen ]; 48 48 }; 49 - } 49 + })
+3 -3
pkgs/by-name/go/gobusybox/package.nix
··· 4 4 fetchFromGitHub, 5 5 }: 6 6 7 - buildGoModule rec { 7 + buildGoModule (finalAttrs: { 8 8 pname = "gobusybox"; 9 9 version = "0.2.0-unstable-2024-03-05"; 10 10 ··· 15 15 hash = "sha256-hS6YwN6eekyDjp7E6sisW+8HO5WHTEC68XyKZFPihK4="; 16 16 }; 17 17 18 - sourceRoot = "${src.name}/src"; 18 + sourceRoot = "${finalAttrs.src.name}/src"; 19 19 20 20 subPackages = [ 21 21 "cmd/gencmddeps" ··· 39 39 maintainers = with lib.maintainers; [ katexochen ]; 40 40 mainProgram = "makebb"; 41 41 }; 42 - } 42 + })
+3 -3
pkgs/by-name/gr/grmon/package.nix
··· 5 5 nix-update-script, 6 6 }: 7 7 8 - buildGoModule rec { 8 + buildGoModule (finalAttrs: { 9 9 pname = "grmon"; 10 10 version = "0.1"; 11 11 12 12 src = fetchFromGitHub { 13 13 owner = "bcicen"; 14 14 repo = "grmon"; 15 - rev = "v${version}"; 15 + rev = "v${finalAttrs.version}"; 16 16 hash = "sha256-0J7f4DMADUut3Da0F1eTDsT1Hlk0rfInwzbcVcQNzg8="; 17 17 }; 18 18 ··· 35 35 mainProgram = "grmon"; 36 36 maintainers = with maintainers; [ katexochen ]; 37 37 }; 38 - } 38 + })
+4 -4
pkgs/by-name/jj/jj/package.nix
··· 8 8 runCommand, 9 9 jj, 10 10 }: 11 - buildGoModule rec { 11 + buildGoModule (finalAttrs: { 12 12 pname = "jj"; 13 13 version = "1.9.2"; 14 14 15 15 src = fetchFromGitHub { 16 16 owner = "tidwall"; 17 17 repo = "jj"; 18 - rev = "v${version}"; 18 + rev = "v${finalAttrs.version}"; 19 19 hash = "sha256-Yijap5ZghTBe1ahkQgjjxuo++SriJWXgRqrNXIVQ0os="; 20 20 }; 21 21 ··· 28 28 ldflags = [ 29 29 "-s" 30 30 "-w" 31 - "-X main.version=${version}" 31 + "-X main.version=${finalAttrs.version}" 32 32 ]; 33 33 34 34 passthru = { ··· 71 71 mainProgram = "jj"; 72 72 maintainers = with maintainers; [ katexochen ]; 73 73 }; 74 - } 74 + })
+5 -5
pkgs/by-name/ke/keep-sorted/package.nix
··· 6 6 versionCheckHook, 7 7 }: 8 8 9 - buildGoModule rec { 9 + buildGoModule (finalAttrs: { 10 10 pname = "keep-sorted"; 11 11 version = "0.6.1"; 12 12 13 13 src = fetchFromGitHub { 14 14 owner = "google"; 15 15 repo = "keep-sorted"; 16 - tag = "v${version}"; 16 + tag = "v${finalAttrs.version}"; 17 17 hash = "sha256-N/fJ0qj7/kQ9Q7ULpQpyhWAWFlnLkTjyNNKg8VhLvi0="; 18 18 }; 19 19 ··· 22 22 # Inject version string instead of reading version from buildinfo. 23 23 postPatch = '' 24 24 substituteInPlace main.go \ 25 - --replace-fail 'readVersion())' '"v${version}")' 25 + --replace-fail 'readVersion())' '"v${finalAttrs.version}")' 26 26 ''; 27 27 28 28 env.CGO_ENABLED = "0"; ··· 41 41 passthru.updateScript = nix-update-script { }; 42 42 43 43 meta = { 44 - changelog = "https://github.com/google/keep-sorted/releases/tag/v${version}"; 44 + changelog = "https://github.com/google/keep-sorted/releases/tag/v${finalAttrs.version}"; 45 45 description = "Language-agnostic formatter that sorts lines between two markers in a larger file"; 46 46 homepage = "https://github.com/google/keep-sorted"; 47 47 license = lib.licenses.asl20; 48 48 mainProgram = "keep-sorted"; 49 49 maintainers = with lib.maintainers; [ katexochen ]; 50 50 }; 51 - } 51 + })
+3 -3
pkgs/by-name/u-/u-root/package.nix
··· 10 10 linux_latest, 11 11 }: 12 12 13 - buildGoModule rec { 13 + buildGoModule (finalAttrs: { 14 14 pname = "u-root"; 15 15 version = "0.14.0-unstable-2024-09-26"; 16 16 ··· 63 63 ''; 64 64 homepage = "https://u-root.org/"; 65 65 downloadPage = "https://github.com/u-root/u-root"; 66 - changelog = "https://github.com/u-root/u-root/blob/${src.rev}/RELEASES"; 66 + changelog = "https://github.com/u-root/u-root/blob/${finalAttrs.src.rev}/RELEASES"; 67 67 license = lib.licenses.bsd3; 68 68 maintainers = with lib.maintainers; [ katexochen ]; 69 69 mainProgram = "u-root"; 70 70 platforms = lib.platforms.linux; 71 71 }; 72 - } 72 + })
+6 -6
pkgs/by-name/up/uplosi/package.nix
··· 6 6 nix-update-script, 7 7 }: 8 8 9 - buildGoModule rec { 9 + buildGoModule (finalAttrs: { 10 10 pname = "uplosi"; 11 11 version = "0.4.0"; 12 12 13 13 src = fetchFromGitHub { 14 14 owner = "edgelesssys"; 15 - repo = pname; 16 - rev = "v${version}"; 15 + repo = "uplosi"; 16 + tag = "v${finalAttrs.version}"; 17 17 hash = "sha256-5I916T70sH4UAq5EGRjR7lnRBbPqMJIxaXwUCJQ4DcM="; 18 18 }; 19 19 ··· 22 22 env.CGO_ENABLED = "0"; 23 23 ldflags = [ 24 24 "-s" 25 - "-X main.version=${version}" 25 + "-X main.version=${finalAttrs.version}" 26 26 ]; 27 27 28 28 nativeBuildInputs = [ installShellFiles ]; ··· 39 39 meta = { 40 40 description = "Upload OS images to cloud provider"; 41 41 homepage = "https://github.com/edgelesssys/uplosi"; 42 - changelog = "https://github.com/edgelesssys/uplosi/releases/tag/v${version}"; 42 + changelog = "https://github.com/edgelesssys/uplosi/releases/tag/v${finalAttrs.version}"; 43 43 license = lib.licenses.asl20; 44 44 mainProgram = "uplosi"; 45 45 maintainers = with lib.maintainers; [ ··· 48 48 ]; 49 49 platforms = lib.platforms.unix; 50 50 }; 51 - } 51 + })