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
symfony-cli: add missing compilation flags #206149
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -12,12 +12,20 @@ buildGoModule rec { | |||||||
sha256 = "sha256-GAsyI8I+tHFMV/LqwPx2ph+w3zaqKSn9vieVQcuO+y0="; | ||||||||
}; | ||||||||
|
||||||||
ldflags = [ | ||||||||
"-s" | ||||||||
"-w" | ||||||||
"-X main.version=${version}" | ||||||||
]; | ||||||||
|
||||||||
postInstall = '' | ||||||||
mv $out/bin/symfony-cli $out/bin/symfony | ||||||||
''; | ||||||||
|
||||||||
# Tests requires network access | ||||||||
doCheck = false; | ||||||||
checkPhase = '' | ||||||||
$GOPATH/bin/symfony-cli | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When overriding Though, in this case, it might be better to use nixpkgs/pkgs/tools/misc/osm2pgsql/default.nix Lines 49 to 51 in 8bc6f34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jtojnar I can provide an updated PR but I would need more info on this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What info do you mean? |
||||||||
''; | ||||||||
|
||||||||
meta = with lib; { | ||||||||
description = "Symfony CLI"; | ||||||||
|
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.
Are not these two different flags?
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.
I don’t really know if it should be considered as two different flags. If we wanted to add something like
main.channel
it would result in :instead of :
I really don’t know what is the best for NixOS
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.
The question is whether it works if you run it in shell.
The
stdenv.mkDerivation
does not really support lists by default so currently, it will end up being run likego install "-ldflags=-s -w -X main.version=x.y.z -X main.channel=foo"
:nixpkgs/pkgs/build-support/go/module.nix
Line 211 in fbcb61b
But in the future, when we switch to structured attributes, it would be good if arguments would be properly split.