mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
cue: use finalAttrs
This commit is contained in:
parent
f2256199df
commit
8d5b47e9b8
1 changed files with 6 additions and 7 deletions
|
@ -5,18 +5,17 @@
|
|||
stdenv,
|
||||
installShellFiles,
|
||||
testers,
|
||||
cue,
|
||||
callPackage,
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "cue";
|
||||
version = "0.13.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cue-lang";
|
||||
repo = "cue";
|
||||
tag = "v${version}";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-RvdjZ3wSc3IhQvYJL989x33qOtVZ4paoQTLFzWF9xj0=";
|
||||
};
|
||||
|
||||
|
@ -29,7 +28,7 @@ buildGoModule rec {
|
|||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
"-X cuelang.org/go/cmd/cue/cmd.version=v${version}"
|
||||
"-X cuelang.org/go/cmd/cue/cmd.version=v${finalAttrs.version}"
|
||||
];
|
||||
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
|
@ -44,9 +43,9 @@ buildGoModule rec {
|
|||
tests = {
|
||||
test-001-all-good = callPackage ./tests/001-all-good.nix { };
|
||||
version = testers.testVersion {
|
||||
package = cue;
|
||||
package = finalAttrs.finalPackage;
|
||||
command = "cue version";
|
||||
version = "v${version}";
|
||||
version = "v${finalAttrs.version}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -58,4 +57,4 @@ buildGoModule rec {
|
|||
maintainers = with lib.maintainers; [ aaronjheng ];
|
||||
mainProgram = "cue";
|
||||
};
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue