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

Fully static linking #6

Closed
nh2 opened this issue Jun 13, 2018 · 4 comments
Closed

Fully static linking #6

nh2 opened this issue Jun 13, 2018 · 4 comments

Comments

@nh2
Copy link

nh2 commented Jun 13, 2018

OK you totally sniped me with this, but here we go:

I've managed to esentially fully solve #5, doing fully static linking, by not using glibc, but a fully musl based tool chain.

Here: https://github.com/nh2/static-haskell-nix

At the time of writing, it's at this commit.

This is based on work of @dtzWill (such as NixOS/nixpkgs#34645 and especially this NixOS/nixpkgs#37598 (comment)).

CC @angerman @bgamari, some of your work is paying off big time here.

@vaibhavsagar
Copy link
Owner

I'm trying this now and I'm unable to reproduce your results. ghc841 isn't present (I replaced it with ghc842) and libiconv doesn't have an override attribute (not sure how to fix this). Is there something I'm doing wrong? I used the same command as your README. I'd love to include this in the blog post but I'd like to be able to reproduce your results first 😃.

@nh2
Copy link
Author

nh2 commented Jun 13, 2018

I made a mistake, using a branch name to refer to the nixpkgs commit:

NIX_PATH=nixpkgs=https://github.com/dtzWill/nixpkgs/archive/feature/ghc-cross-musl.tar.gz

I thought feature/ghc-cross-musl.tar.gz was a tag and thus stable, but it was a branch, and it looks like it was just pushed from the previous commit 7048fc71e325c69ddfa62309c0b661b430774eac to 6cc5483b5e94dfdcb17f46dd839fedf1f63122c3.

I should have used:

NIX_PATH=nixpkgs=https://github.com/dtzWill/nixpkgs/archive/7048fc71e325c69ddfa62309c0b661b430774eac.tar.gz

I have now force-pushed my repo (usually foce-pushing master isn't nice but I wrote down wrote these things down in the commit messages for reproducibility, so that's more important to me to get right).

Could you try again?

@nh2
Copy link
Author

nh2 commented Jun 13, 2018

The push in question is this one: NixOS/nixpkgs#37522 (reference)

@vaibhavsagar
Copy link
Owner

It worked! I've updated my blog post accordingly.

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

No branches or pull requests

2 participants