New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gomplate: init at 3.5.0 #67615
gomplate: init at 3.5.0 #67615
Conversation
c81339d
to
8ef39e5
Compare
8ef39e5
to
c96d203
Compare
c96d203
to
b3d8ba1
Compare
I updated the PR to use |
@@ -0,0 +1,37 @@ | |||
{ stdenv, buildGoPackage, fetchFromGitHub }: | |||
|
|||
buildGoPackage rec { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should be able to switch to buildGoModule
as that's the recommended approach for projects that support it.
|
||
buildGoPackage rec { | ||
pname = "gomplate"; | ||
version = "3.5.0"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3.6.0 is available https://github.com/hairyhenderson/gomplate/releases
-X ${goPackagePath}/version.GitCommit=${rev}") | ||
''; | ||
|
||
goPackagePath = "github.com/hairyhenderson/gomplate"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With buildGoModule
that's not needed.
|
||
meta = with stdenv.lib; { | ||
description = "A flexible commandline tool for template rendering. Supports lots of local and remote datasources"; | ||
homepage = https://gomplate.ca/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
homepage = https://gomplate.ca/; | |
homepage = "https://gomplate.ca/"; |
"-ldflags= | ||
-w -s | ||
-X ${goPackagePath}/version.Version=${version} | ||
-X ${goPackagePath}/version.GitCommit=${rev}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you really want the executable to have the git commit defined in it, wouldn't it be almost as good to use:
-X ${goPackagePath}/version.GitCommit=${rev}") | |
-X ${goPackagePath}/version.GitCommit=${version}") |
?
Thanks for your review @doronbehar . I created a new derivation for 3.6 version, but never created a PR for it, doing it now. I'm closing this, we can continue on #85157 |
Motivation for this change
Add gomplate
I was able to build it locally. I also did some tests and the binary seems to work fine, but I don't have much experience with go packages, feedback about the nix expression would be appreciated.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)