Merge pull request #307847 from isabelroses/gotoml-update
go-toml: add build flags
This commit is contained in:
commit
18d042ccdc
@ -3,13 +3,16 @@
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
}:
|
||||
buildGoModule rec {
|
||||
pname = "go-toml";
|
||||
let
|
||||
version = "2.2.1";
|
||||
in
|
||||
buildGoModule {
|
||||
pname = "go-toml";
|
||||
inherit version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pelletier";
|
||||
repo = pname;
|
||||
repo = "go-toml";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-DAtp9ovl6cny0rom80aK+bGe9U/p6zmTQo1Z3MscCjg=";
|
||||
};
|
||||
@ -22,16 +25,21 @@ buildGoModule rec {
|
||||
"cmd/tomltestgen"
|
||||
];
|
||||
|
||||
# allowGoReference adds the flag `-trimpath` which is also denoted by, go-toml's goreleaser config
|
||||
# <https://github.com/pelletier/go-toml/blob/a3d5a0bb530b5206c728eed9cb57323061922bcb/.goreleaser.yaml#L13>
|
||||
allowGoReference = true;
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
"-X main.version=${version}"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Go library for the TOML language";
|
||||
homepage = "https://github.com/pelletier/go-toml";
|
||||
changelog = "https://github.com/pelletier/go-toml/releases/tag/v${version}";
|
||||
maintainers = [ maintainers.isabelroses ];
|
||||
license = licenses.mit;
|
||||
maintainers = [ lib.maintainers.isabelroses ];
|
||||
license = lib.licenses.mit;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user