-
Notifications
You must be signed in to change notification settings - Fork 3
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
Pin version of nixpkgs for static Haskell building #4
Comments
Hi Niklas! It was great to meet you at ZuriHac 😃.
I agree, and it is silly that this isn't pinned when I also have another blog post about the importance of pinning
The first line of the blog post (in italics) is
but your wording is better. I will think about how to update the post so that it's more apparent that the good stuff is at the end.
You're right, it's not, but the approach is useful enough that it's worth talking about anyway.
I just ran into the same problem when trying to reproduce my results! I forgot to put Does this answer your questions? |
Aaah, OK, then I just misunderstood it! Makes sense, thanks for the explanation!
It will still quite certainly break when nixpkgs, cabal, ghc and so on change in the future. If you don't want to pin it in your repository, I recommend to at least write in the blog post something like
That'll make sure that the first try always works for your readers, and they can leave |
Good idea, I've updated the blog post. Thanks for the suggestions! |
Hi! I saw you at ZuriHac, but didn't get a chance to chat more.
I'm trying https://vaibhavsagar.com/blog/2018/01/03/static-haskell-nix/ but have some issues with it:
Pinning nixpkgs
With the nixpkgs version on my system, simply running
nix-build
doesn't work. I get:But if I use a different version of nixpkgs, then it works:
succeeds and creates a nice statically linked executable. That is the latest
release-17.09
nixpkgs commit. It doesn't work with the latestrelease-18.03
nixpkgs commit, so I think pinning is quite important for reproducibility.Mention in the post what the latest approach to build is
In the blog post you first describe the approach with
$ $(nix-build static.nix)/bin/fhs
and so on.Only much later, in
do you create
default.nix
. But you don't say what do do with it, so a Haskeller not familiar with nix may not guess that they can just runnix-build
at this stage.It would be nice if you could update the post, mentioning directly something like "the following below is my old approach, right now you can just clone my repo and run
nix-build
, it will pick up thedefault.nix
I made in Edit 1".Dependency on non-nix stuff in the old approach and build failure
In your old approach you do
That doesn't look very nixy -- e.g.
/usr/include
doesn't exist in nix's concept, and I'm quite sure that can't work on NixOS. What does that do?Also, on my Ubuntu the next step
failed with
Where is
scotty
supposed to come from in that approach?Thanks for the post, it is very helpful!
The text was updated successfully, but these errors were encountered: