-
Notifications
You must be signed in to change notification settings - Fork 268
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
Haskell provider #87
Haskell provider #87
Conversation
_app: &crate::nixpacks::app::App, | ||
_env: &crate::nixpacks::environment::Environment, | ||
) -> anyhow::Result<Option<crate::nixpacks::phase::InstallPhase>> { | ||
Ok(Some(InstallPhase::new("sudo apt-get update && sudo apt-get install -y libgmp-dev gcc binutils make && stack setup".to_string()))) |
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.
Can these packages be installed with Nix instead? gcc
and make
should be able to. What are libgmp-dev
and binutils
for?
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.
Nix doesn’t package any development libraries/headers. libgmp-dev
is a floating-point math library needed by the Haskell compiler. binutils
has things like ar
that are needed to build libraries. make
could probably be installed through Nix, but gcc
needs to be installed using the same package manager as any libraries you’re trying to use, so that it can find them. Since apt
is the only way to get development libraries, gcc
needs to be installed through it too.
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.
Ah I see. I thinkkk this is okay. I'm hesitant to start having providers download external dependencies outside of Nix since we lose the ability to pin to a specific version of the Nix store. I think this is fine for now but we should be cautious about encouraging this moving forward.
If more than one provider can be matched at a time (future plans) then it would be nicer if the Haskell provider could depend on the AptProvider and specify the packages that way. Then at least the behaviour is consistent and more controller than just installing w/e packages in the install phase.
Can you please fix the conflicts. I can merge once complete |
Oh gosh, rebasing broke everything again, didn't it... |
fbcec32
to
900265d
Compare
Fixes #81