mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 04:35: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,
|
versionCheckHook,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule (finalAttrs: {
|
||||||
pname = "keep-sorted";
|
pname = "keep-sorted";
|
||||||
version = "0.6.1";
|
version = "0.6.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "google";
|
owner = "google";
|
||||||
repo = "keep-sorted";
|
repo = "keep-sorted";
|
||||||
tag = "v${version}";
|
tag = "v${finalAttrs.version}";
|
||||||
hash = "sha256-N/fJ0qj7/kQ9Q7ULpQpyhWAWFlnLkTjyNNKg8VhLvi0=";
|
hash = "sha256-N/fJ0qj7/kQ9Q7ULpQpyhWAWFlnLkTjyNNKg8VhLvi0=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ buildGoModule rec {
|
||||||
# Inject version string instead of reading version from buildinfo.
|
# Inject version string instead of reading version from buildinfo.
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace main.go \
|
substituteInPlace main.go \
|
||||||
--replace-fail 'readVersion())' '"v${version}")'
|
--replace-fail 'readVersion())' '"v${finalAttrs.version}")'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
env.CGO_ENABLED = "0";
|
env.CGO_ENABLED = "0";
|
||||||
|
@ -41,11 +41,11 @@ buildGoModule rec {
|
||||||
passthru.updateScript = nix-update-script { };
|
passthru.updateScript = nix-update-script { };
|
||||||
|
|
||||||
meta = {
|
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";
|
description = "Language-agnostic formatter that sorts lines between two markers in a larger file";
|
||||||
homepage = "https://github.com/google/keep-sorted";
|
homepage = "https://github.com/google/keep-sorted";
|
||||||
license = lib.licenses.asl20;
|
license = lib.licenses.asl20;
|
||||||
mainProgram = "keep-sorted";
|
mainProgram = "keep-sorted";
|
||||||
maintainers = with lib.maintainers; [ katexochen ];
|
maintainers = with lib.maintainers; [ katexochen ];
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue