yq-go: use finalAttrs

This commit is contained in:
Sizhe Zhao
2025-05-12 10:51:57 +08:00
parent 264919c7ec
commit ebccba5d54
+5 -5
View File
@@ -8,14 +8,14 @@
yq-go,
}:
buildGoModule rec {
buildGoModule (finalAttrs: {
pname = "yq-go";
version = "4.45.3";
src = fetchFromGitHub {
owner = "mikefarah";
repo = "yq";
rev = "v${version}";
rev = "v${finalAttrs.version}";
hash = "sha256-xa0kIdb/Y+1zqGulmQ3qR62E9q4s5CCooYvsUDsZN9E=";
};
@@ -31,7 +31,7 @@ buildGoModule rec {
'';
passthru.tests = {
simple = runCommand "${pname}-test" { } ''
simple = runCommand "${finalAttrs.pname}-test" { } ''
echo "test: 1" | ${yq-go}/bin/yq eval -j > $out
[ "$(cat $out | tr -d $'\n ')" = '{"test":1}' ]
'';
@@ -40,7 +40,7 @@ buildGoModule rec {
meta = with lib; {
description = "Portable command-line YAML processor";
homepage = "https://mikefarah.gitbook.io/yq/";
changelog = "https://github.com/mikefarah/yq/raw/v${version}/release_notes.txt";
changelog = "https://github.com/mikefarah/yq/raw/v${finalAttrs.version}/release_notes.txt";
mainProgram = "yq";
license = [ licenses.mit ];
maintainers = with maintainers; [
@@ -48,4 +48,4 @@ buildGoModule rec {
SuperSandro2000
];
};
}
})