mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 19:55:41 +03:00
keep-sorted: use finalAttrs
Signed-off-by: Paul Meyer <katexochen0@gmail.com>
This commit is contained in:
parent
2d23979ef5
commit
cfe0dd5b45
1 changed files with 5 additions and 5 deletions
|
@ -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 ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue