Skip to content
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

Closed
wants to merge 4 commits into from

Conversation

yihuang
Copy link
Contributor

@yihuang yihuang commented Sep 24, 2020

fix #98604

@yihuang
Copy link
Contributor Author

yihuang commented Sep 24, 2020

I think we can also symbolic link the dependencies in build phrase? should improve build time.

unpackFile "${main}"
'' + lib.flip lib.concatMapStrings otherMajorVersions (drv: ''
mkdir ./${drv.majorVersion}
pushd ./${drv.majorVersion}
Copy link
Member

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/* ./";
Copy link
Member

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?

@yihuang yihuang marked this pull request as draft September 26, 2020 01:05
@yihuang
Copy link
Contributor Author

yihuang commented Sep 27, 2020

successor: #98903

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

buildGoPackage don't support multiple major version of a package
3 participants