[Nix-dev] Nix for internal projects and monorepos

Profpatsch mail at profpatsch.de
Wed Mar 29 13:45:31 CEST 2017


On 17-03-26 09:02am, Luke Clifton wrote:
> On 26 Mar. 2017 3:17 am, "Tikhon Jelvis" <tikhon at jelv.is> wrote:
> Building statically linked Haskell binaries with Nix has been on my todo
> list for a while now. Any hints?

It’s not that hard, just look at generic-builder.nix
and overwrite everything to use static linking.
There’s even a tutorial in the docs.

The only thing you have make sure is that the glibc
on the target machine is not too old. In the worst
case have another pass that changes the RPATH to
a folder-local one. Might be a bit of work though.

-- 
Proudly written in Mutt with Vim on NixOS.
Q: Why is this email five sentences or less?
A: http://five.sentenc.es
May take up to five days to read your message. If it’s urgent, call me.


More information about the nix-dev mailing list