Quantcast
Channel: How to build Nix packages from source? - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Answer by Robert Hensing for How to build Nix packages from source?

$
0
0

It is no surprise that such a package definition is a bit overwhelming to anyone. When you understand what the effect of various attributes, your example package becomes quite straight-forward.

In my experience, you arrive at such a package definition as follows. I'll assume you're not packaging something from a language-specific repository for now. Something you might build with make, for example.

  1. Start with mkDerivation
  2. Watch the build fail
  3. Fix an error, by adding dependencies, extra commands, configure flags, patches, etc.
  4. Repeat

So there you have it, it's trial and error. Experience with the required build tools helps a lot.

Some hints:


Viewing all articles
Browse latest Browse all 2

Trending Articles





<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>