mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-21 04:49:01 +02:00
argo: build staticfiles with buildGoModule
This commit is contained in:
parent
9813adc7f7
commit
31e1952952
|
@ -12,16 +12,25 @@ let
|
|||
# We build the CLI without the static server for simplicity, but the tool is still required for
|
||||
# compilation to succeed.
|
||||
# See: https://github.com/argoproj/argo/blob/d7690e32faf2ac5842468831daf1443283703c25/Makefile#L117
|
||||
staticfiles = pkgsBuildBuild.buildGoPackage rec {
|
||||
staticfiles = pkgsBuildBuild.buildGoModule rec {
|
||||
name = "staticfiles";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bouk";
|
||||
repo = "staticfiles";
|
||||
rev = "827d7f6389cd410d0aa3f3d472a4838557bf53dd";
|
||||
sha256 = "0xarhmsqypl8036w96ssdzjv3k098p2d4mkmw5f6hkp1m3j67j61";
|
||||
hash = "sha256-wchj5KjhTmhc4XVW0sRFCcyx5W9am8TNAIhej3WFWXU=";
|
||||
};
|
||||
|
||||
goPackagePath = "bou.ke/staticfiles";
|
||||
vendorHash = "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo=";
|
||||
|
||||
excludedPackages = [ "./example" ];
|
||||
|
||||
preBuild = ''
|
||||
cp ${./staticfiles.go.mod} go.mod
|
||||
'';
|
||||
|
||||
ldflags = [ "-s" "-w" ];
|
||||
};
|
||||
in
|
||||
buildGoModule rec {
|
||||
|
@ -55,7 +64,8 @@ buildGoModule rec {
|
|||
'';
|
||||
|
||||
ldflags = [
|
||||
"-s" "-w"
|
||||
"-s"
|
||||
"-w"
|
||||
"-X github.com/argoproj/argo-workflows/v3.buildDate=unknown"
|
||||
"-X github.com/argoproj/argo-workflows/v3.gitCommit=${src.rev}"
|
||||
"-X github.com/argoproj/argo-workflows/v3.gitTag=${src.rev}"
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
module bou.ke/staticfiles
|
||||
|
||||
go 1.18
|
Loading…
Reference in a new issue