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
buildGoPackage: fix preFixup failing #24942
Conversation
The preFixup is always failed if the target package hasn't any binary output.
@snyh, thanks for your PR! By analyzing the history of the files in this pull request, we identified @wkennington, @ehmry and @kamilchm to be potential reviewers. |
@@ -184,7 +184,7 @@ go.stdenv.mkDerivation ( | |||
''; | |||
|
|||
preFixup = preFixup + '' | |||
find $bin/bin -type f -exec ${removeExpr removeReferences} '{}' + | |||
find $bin/bin -type f -exec ${removeExpr removeReferences} '{}' + || true |
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.
What was the error in this case?
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 would assume that find was unhappy not to find any files
only the main package would build a program to $out/bin. all other go package except main package type would cause this build phase failed.Is it the buildGoPackage designed only for a go main package?
|
An alternative solution is to use |
You could also use
What's you use case? |
@kamilchm I use buildGoPackage for library packages which hasn't any main . Because there has many go programs which can't just simply use Or is there has better way to build programs which can't simply use |
The preFixup is always failed if the target package hasn't any
binary output.
Motivation for this change
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)