-
Notifications
You must be signed in to change notification settings - Fork 253
Add prebuilt-depends for proprietary dependencies. #2444
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
base: master
Are you sure you want to change the base?
Conversation
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.
Hey @shlevy this looks like an interesting addition, I'm still missing a bit of the whole picture. Can you outline how one would use pre-built dependendencies in a practical setting?
builder/make-config-files.nix
Outdated
'' + '' | ||
for p in "''${pkgsHostTarget[@]}"; do | ||
if [ -e $p/envDep ]; then | ||
cat $p/envDep >> $configFiles/ghc-environment | ||
fi | ||
${ lib.optionalString component.doExactConfig '' | ||
if [ -d $p/exactDep ]; then | ||
cat $p/exactDep/configure-flags >> $configFiles/configure-flags | ||
cat $p/exactDep/cabal.config >> $configFiles/cabal.config | ||
fi | ||
''} | ||
done |
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.
Why did we move this down? Is this due to a quirk how we handle stuff and now with the pre-builts this would need to come later?
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.
Added a comment.
, useLLVM ? ghc.useLLVM or false | ||
, smallAddressSpace ? false | ||
|
||
, prebuilt-depends ? [] |
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.
We should add a comment here. As I'm a bit fuzzy on what exactly prebuilt-depends are, I'm not sure I can come up with a good comment yet.
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.
added a new Note [prebuilt dependencies]
, does that help?
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.
This is great! 🫰
Add commentary
@angerman added a new |
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.
This is an interesting change. I like it!
I wonder if we somehow can encode the hash of the compiler/rts combination (plus some metadata for error messages) in the produced package to ensure we only ever load proper packages, and can provide some sensible error message?
# | ||
# For your build to succeed, your prebuilt-dependencies must meet the following: | ||
# | ||
# 1. They are built with the same compiler version and RTS way. |
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.
# 1. They are built with the same compiler version and RTS way. | |
# 1. ⚠️ They are built with the same compiler version and RTS way. ❗ |
This is of the utmost importance, as anything else will fail. I think adding some extra visual notion here is probably a good idea?
No description provided.