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
support multiple major version of go package #98632
Conversation
I think we can also symbolic link the dependencies in build phrase? should improve build time. |
This seems semantically more correct
unpackFile "${main}" | ||
'' + lib.flip lib.concatMapStrings otherMajorVersions (drv: '' | ||
mkdir ./${drv.majorVersion} | ||
pushd ./${drv.majorVersion} |
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.
Sorry I just took the liberty to push my untested changes, since I don't have an example to test this and the time to find one. But this variant seems to be closer to your intention. If not, feel free to revert or adapt the last commit that I made.
my previous commit removed it, but I guess it is used after all
combined = stdenv.mkDerivation { | ||
inherit (main) name; | ||
|
||
unpackCmd = "cp -r $curSrc/* ./"; |
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.
Since you override the behavior of unpackFile here, would it not more readable to just inline the cp
command to make it easier to read?
successor: #98903 |
fix #98604