-
Notifications
You must be signed in to change notification settings - Fork 248
Building time with musl fails / boot packages in plan.nix
?
#86
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
Comments
What also doesn’t work: Removing |
Maybe https://ghc.haskell.org/trac/ghc/ticket/14889, which has a patch against |
I am experimenting with
under the somewhat random assumption that |
This looks good. With this change, and the following hack(?) in the output of
(to simulate |
Success! After
I can build a static version of the program:
and my
I’ll leave this open for you to assess the fix that applied to |
this is one way to fix input-output-hk#86 it seems.
requires a patched `haskell.nix` due to input-output-hk/haskell.nix#86 and disabled `terminfo` support in `haskelline` due to nh2/static-haskell-nix#14 But it seems to work!
@nomeata you can put all those customizations into your just add the following module: {
packages.haskeline.flags.terminfo = false;
packages.tttool.configureFlags = pkgs.lib.optionals (pkgs.hostPlatform.isMusl) [
"--ghc-option=-static"
"--ghc-option=-optl=-static"
"--extra-lib-dirs=${pkgs.gmp6.override { withStatic = true; }}/lib"
"--extra-lib-dirs=${pkgs.zlib.static}/lib"
];
} regarding the |
* migration to Cabal 3.2 * Use shellFor { tools = ...; } * Fix compilation with Cabal-3.2 * Update cabal.project * Update default.nix generated by plan-to-nix plan-to-nix generated `default.nix` that was incompatible with newer interface of `haskell.nix` repo. * Update compiler to ghc883 Co-authored-by: Hamish Mackenzie <[email protected]> Co-authored-by: Maxim Koltsov <[email protected]>
* migration to Cabal 3.2 * Use shellFor { tools = ...; } * Fix compilation with Cabal-3.2 * Update cabal.project * Update default.nix generated by plan-to-nix plan-to-nix generated `default.nix` that was incompatible with newer interface of `haskell.nix` repo. * Update compiler to ghc883 Co-authored-by: Hamish Mackenzie <[email protected]> Co-authored-by: Maxim Koltsov <[email protected]>
After my success of cross-building for Windows with this setup, I enthusiastically tackled the next task: Building with
musl
in order to get a fully static Linux executable out.My current attempt simply passes
crossSystem = localLib.systems.examples.musl64
(entropia/tip-toi-reveng@aff912d) and it actually builds a cross-compiling GHC, and some packages (e.g.transformers
) build.But then it tries to build is
time
, and that fails:Not sure what the error message means. But I also wonder why it builds
time
at all, as this is already contained in theghc
package:I tried to compare it with building Haskell via
nixpkgs
, so see if this really is an issue withhaskell.nix
(compared tonixpkgs
), but over there notime
package is exposed:(the
time
field is present, butnull
).So maybe the problem is that
time
shouldn’t actually be built here?The text was updated successfully, but these errors were encountered: