Building static executables with Nix

Video thumbnail (Frame 0) Video thumbnail (Frame 869) Video thumbnail (Frame 1269) Video thumbnail (Frame 2279) Video thumbnail (Frame 2426) Video thumbnail (Frame 2789) Video thumbnail (Frame 3509)
Video in TIB AV-Portal: Building static executables with Nix

Formal Metadata

Title
Building static executables with Nix
Title of Series
Author
License
CC Attribution 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
2018
Language
English

Content Metadata

Subject Area
Laptop Fluid statics Building Algebraic closure Projective plane Electronic visual display Mereology Metropolitan area network
Point (geometry) Fluid statics Run time (program lifecycle phase) Observational study Different (Kate Ryan album) Cuboid Lipschitz-Stetigkeit Stack (abstract data type)
Overlay-Netz Building Repository (publishing) Projective plane Bit
Overlay-Netz Revision control Chain
so I'm not sure if the display part adaptor actually works but I can to make it very short or to just talk about it you all have your laptop's with you or the man next to you or can do it for you so I wanted to shortly introduce this little side project that we have here which is bidding which is all about bidding static executables using Nix the first motivation for that was to build static Haskell executables because well there are lots of packages that use in Haskell usually and you might have easily 300 foreign dependencies making from very large Nix closure sizes
essentially another thing is that we want to have in the Haskell world Static executables in general because we want to deploy stuff very easily we are very envious of go being able to provide static executables out of the box and of course we want to have something like
that as well so we found at some point that this is very difficult because gilepsy does not which is a dependency of the Haskell runtime for example does not make study linking very easy in fact it's actually discouraged and that means that if you want to have a good experience with static linking you use need to use different lip see for example master so getting master available before there was a feature in stack Haskell's one of her skills build tools which was that you could build in an alpine linux docker container which provides that unfortunately that one lost support for GHC sometime ago and really wanted to have static builds back so instead I built this thing that does
that using Nix
so if you go to Nix packages issue 4 3 7
9 5 alternatively you can go to my project repository github calm /nh 2 slash static has connects with minuses in between then you can see that effort
in general the summary so far is we've managed to write a little bit of an overlay style thing that supports building like 97% of the Haskell executables that Arne's tak??cs statically so you can ask for any random package in a static fashion so for example it's a stack or or HS lock or whatever you can have them all as static executables and then easily put them anywhere we depend heavily on that muscle based
tool chain that some other contributors and Nick's packages have been working on a lot in 2018 we saw that in the other talk before this is extremely useful without this this would not be possible and what this now eventually turned into is that on Nick's packages issue for the 8800 3 there is an effort to make a an overlay or actually make an overlay in Nick's packages itself that provides a whole bunch of executables in Nick's OS a static version so you will just be able to say give me whatever executable available usually on mixed packages but give me the static version of that so we want to make static linking very very easy not only for Haskell but for everything else and yeah if you want to deploy something very easily this might be a thing for you and so wherever you can please help us get this done and lead to the return of static linking on Linux that's it [Applause]
Feedback