use finalAttrs on Go packages I maintain (#397910)
This commit is contained in:
@@ -6,14 +6,14 @@
|
||||
athens,
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "athens";
|
||||
version = "0.15.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gomods";
|
||||
repo = "athens";
|
||||
rev = "v${version}";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-6NBdif8rQ1aj4nTYXhrWyErzRv0q8WpIheRnb2FCnkU=";
|
||||
};
|
||||
|
||||
@@ -22,7 +22,7 @@ buildGoModule rec {
|
||||
env.CGO_ENABLED = "0";
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-X github.com/gomods/athens/pkg/build.version=${version}"
|
||||
"-X github.com/gomods/athens/pkg/build.version=${finalAttrs.version}"
|
||||
];
|
||||
|
||||
subPackages = [ "cmd/proxy" ];
|
||||
@@ -47,4 +47,4 @@ buildGoModule rec {
|
||||
];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "bluetuith";
|
||||
version = "0.2.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "darkhz";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
repo = "bluetuith";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-yXH/koNT4ec/SOZhSU01iPNAfD1MdMjM2+wNmjXWsrk=";
|
||||
};
|
||||
|
||||
@@ -23,7 +23,7 @@ buildGoModule rec {
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
"-X github.com/darkhz/bluetuith/cmd.Version=${version}@nixpkgs"
|
||||
"-X github.com/darkhz/bluetuith/cmd.Version=${finalAttrs.version}@nixpkgs"
|
||||
];
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
@@ -47,4 +47,4 @@ buildGoModule rec {
|
||||
katexochen
|
||||
];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "capslock";
|
||||
version = "0.2.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "google";
|
||||
repo = "capslock";
|
||||
rev = "v${version}";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-kRuEcrx9LBzCpXFWlc9bSsgZt84T8R8VFdbAWAseSPQ=";
|
||||
};
|
||||
|
||||
@@ -33,4 +33,4 @@ buildGoModule rec {
|
||||
mainProgram = "capslock";
|
||||
maintainers = with lib.maintainers; [ katexochen ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
distribution,
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "distribution";
|
||||
version = "3.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "distribution";
|
||||
repo = "distribution";
|
||||
tag = "v${version}";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-myezQTEdH7kkpCoAeZMf5OBxT4Bz8Qx6vCnwim230RY=";
|
||||
};
|
||||
|
||||
@@ -30,7 +30,7 @@ buildGoModule rec {
|
||||
passthru = {
|
||||
tests.version = testers.testVersion {
|
||||
package = distribution;
|
||||
version = "v${version}";
|
||||
version = "v${finalAttrs.version}";
|
||||
};
|
||||
updateScript = nix-update-script { };
|
||||
};
|
||||
@@ -50,4 +50,4 @@ buildGoModule rec {
|
||||
mainProgram = "registry";
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
go-critic,
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "go-critic";
|
||||
version = "0.13.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "go-critic";
|
||||
repo = "go-critic";
|
||||
rev = "v${version}";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-0AOhq7OhSHub4I6XXL018hg6i2ERkIbZCrO9osNjvHw=";
|
||||
};
|
||||
|
||||
@@ -27,7 +27,7 @@ buildGoModule rec {
|
||||
allowGoReference = true;
|
||||
|
||||
ldflags = [
|
||||
"-X main.Version=${version}"
|
||||
"-X main.Version=${finalAttrs.version}"
|
||||
];
|
||||
|
||||
passthru = {
|
||||
@@ -41,9 +41,9 @@ buildGoModule rec {
|
||||
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/${src.rev}";
|
||||
changelog = "https://github.com/go-critic/go-critic/releases/tag/${finalAttrs.src.rev}";
|
||||
license = lib.licenses.mit;
|
||||
mainProgram = "gocritic";
|
||||
maintainers = with lib.maintainers; [ katexochen ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
fetchFromGitHub,
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "gobusybox";
|
||||
version = "0.2.0-unstable-2024-03-05";
|
||||
|
||||
@@ -15,7 +15,7 @@ buildGoModule rec {
|
||||
hash = "sha256-hS6YwN6eekyDjp7E6sisW+8HO5WHTEC68XyKZFPihK4=";
|
||||
};
|
||||
|
||||
sourceRoot = "${src.name}/src";
|
||||
sourceRoot = "${finalAttrs.src.name}/src";
|
||||
|
||||
subPackages = [
|
||||
"cmd/gencmddeps"
|
||||
@@ -39,4 +39,4 @@ buildGoModule rec {
|
||||
maintainers = with lib.maintainers; [ katexochen ];
|
||||
mainProgram = "makebb";
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "grmon";
|
||||
version = "0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bcicen";
|
||||
repo = "grmon";
|
||||
rev = "v${version}";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-0J7f4DMADUut3Da0F1eTDsT1Hlk0rfInwzbcVcQNzg8=";
|
||||
};
|
||||
|
||||
@@ -35,4 +35,4 @@ buildGoModule rec {
|
||||
mainProgram = "grmon";
|
||||
maintainers = with maintainers; [ katexochen ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
runCommand,
|
||||
jj,
|
||||
}:
|
||||
buildGoModule rec {
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "jj";
|
||||
version = "1.9.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tidwall";
|
||||
repo = "jj";
|
||||
rev = "v${version}";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-Yijap5ZghTBe1ahkQgjjxuo++SriJWXgRqrNXIVQ0os=";
|
||||
};
|
||||
|
||||
@@ -28,7 +28,7 @@ buildGoModule rec {
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
"-X main.version=${version}"
|
||||
"-X main.version=${finalAttrs.version}"
|
||||
];
|
||||
|
||||
passthru = {
|
||||
@@ -71,4 +71,4 @@ buildGoModule rec {
|
||||
mainProgram = "jj";
|
||||
maintainers = with maintainers; [ katexochen ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
versionCheckHook,
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "keep-sorted";
|
||||
version = "0.6.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "google";
|
||||
repo = "keep-sorted";
|
||||
tag = "v${version}";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-N/fJ0qj7/kQ9Q7ULpQpyhWAWFlnLkTjyNNKg8VhLvi0=";
|
||||
};
|
||||
|
||||
@@ -22,7 +22,7 @@ buildGoModule rec {
|
||||
# Inject version string instead of reading version from buildinfo.
|
||||
postPatch = ''
|
||||
substituteInPlace main.go \
|
||||
--replace-fail 'readVersion())' '"v${version}")'
|
||||
--replace-fail 'readVersion())' '"v${finalAttrs.version}")'
|
||||
'';
|
||||
|
||||
env.CGO_ENABLED = "0";
|
||||
@@ -41,11 +41,11 @@ buildGoModule rec {
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
meta = {
|
||||
changelog = "https://github.com/google/keep-sorted/releases/tag/v${version}";
|
||||
changelog = "https://github.com/google/keep-sorted/releases/tag/v${finalAttrs.version}";
|
||||
description = "Language-agnostic formatter that sorts lines between two markers in a larger file";
|
||||
homepage = "https://github.com/google/keep-sorted";
|
||||
license = lib.licenses.asl20;
|
||||
mainProgram = "keep-sorted";
|
||||
maintainers = with lib.maintainers; [ katexochen ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
linux_latest,
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "u-root";
|
||||
version = "0.14.0-unstable-2024-09-26";
|
||||
|
||||
@@ -63,10 +63,10 @@ buildGoModule rec {
|
||||
'';
|
||||
homepage = "https://u-root.org/";
|
||||
downloadPage = "https://github.com/u-root/u-root";
|
||||
changelog = "https://github.com/u-root/u-root/blob/${src.rev}/RELEASES";
|
||||
changelog = "https://github.com/u-root/u-root/blob/${finalAttrs.src.rev}/RELEASES";
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = with lib.maintainers; [ katexochen ];
|
||||
mainProgram = "u-root";
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "uplosi";
|
||||
version = "0.4.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "edgelesssys";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
repo = "uplosi";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-5I916T70sH4UAq5EGRjR7lnRBbPqMJIxaXwUCJQ4DcM=";
|
||||
};
|
||||
|
||||
@@ -22,7 +22,7 @@ buildGoModule rec {
|
||||
env.CGO_ENABLED = "0";
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-X main.version=${version}"
|
||||
"-X main.version=${finalAttrs.version}"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
@@ -39,7 +39,7 @@ buildGoModule rec {
|
||||
meta = {
|
||||
description = "Upload OS images to cloud provider";
|
||||
homepage = "https://github.com/edgelesssys/uplosi";
|
||||
changelog = "https://github.com/edgelesssys/uplosi/releases/tag/v${version}";
|
||||
changelog = "https://github.com/edgelesssys/uplosi/releases/tag/v${finalAttrs.version}";
|
||||
license = lib.licenses.asl20;
|
||||
mainProgram = "uplosi";
|
||||
maintainers = with lib.maintainers; [
|
||||
@@ -48,4 +48,4 @@ buildGoModule rec {
|
||||
];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user