lf: use buildFlagsArray (#95219)

This commit is contained in:
zowoq 2020-08-13 18:49:07 +10:00 committed by GitHub
parent 3354811176
commit 261b6cb102
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,17 +17,7 @@ buildGoModule rec {
nativeBuildInputs = [ installShellFiles ];
# TODO: Setting buildFlags probably isn't working properly. I've tried a few
# variants, e.g.:
# - buildFlags = [ "-ldflags" "\"-s" "-w"" ""-X 'main.gVersion=${version}'\"" ];
# - buildFlags = [ "-ldflags" "\\\"-X" "${goPackagePath}/main.gVersion=${version}\\\"" ];
# Override the build phase (to set buildFlags):
buildPhase = ''
runHook preBuild
runHook renameImports
go install -ldflags="-s -w -X main.gVersion=r${version}"
runHook postBuild
'';
buildFlagsArray = [ "-ldflags=-s -w -X main.gVersion=r${version}" ];
postInstall = ''
install -D --mode=444 lf.desktop $out/share/applications/lf.desktop