mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 03:23:29 +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,
|
stdenv,
|
||||||
installShellFiles,
|
installShellFiles,
|
||||||
testers,
|
testers,
|
||||||
cue,
|
|
||||||
callPackage,
|
callPackage,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule (finalAttrs: {
|
||||||
pname = "cue";
|
pname = "cue";
|
||||||
version = "0.13.0";
|
version = "0.13.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "cue-lang";
|
owner = "cue-lang";
|
||||||
repo = "cue";
|
repo = "cue";
|
||||||
tag = "v${version}";
|
tag = "v${finalAttrs.version}";
|
||||||
hash = "sha256-RvdjZ3wSc3IhQvYJL989x33qOtVZ4paoQTLFzWF9xj0=";
|
hash = "sha256-RvdjZ3wSc3IhQvYJL989x33qOtVZ4paoQTLFzWF9xj0=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -29,7 +28,7 @@ buildGoModule rec {
|
||||||
ldflags = [
|
ldflags = [
|
||||||
"-s"
|
"-s"
|
||||||
"-w"
|
"-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) ''
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||||
|
@ -44,9 +43,9 @@ buildGoModule rec {
|
||||||
tests = {
|
tests = {
|
||||||
test-001-all-good = callPackage ./tests/001-all-good.nix { };
|
test-001-all-good = callPackage ./tests/001-all-good.nix { };
|
||||||
version = testers.testVersion {
|
version = testers.testVersion {
|
||||||
package = cue;
|
package = finalAttrs.finalPackage;
|
||||||
command = "cue version";
|
command = "cue version";
|
||||||
version = "v${version}";
|
version = "v${finalAttrs.version}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -58,4 +57,4 @@ buildGoModule rec {
|
||||||
maintainers = with lib.maintainers; [ aaronjheng ];
|
maintainers = with lib.maintainers; [ aaronjheng ];
|
||||||
mainProgram = "cue";
|
mainProgram = "cue";
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue