Nix For Lang Packaging: Difference between revisions

imported>Samueldr
m Fixes most probably a pythonic mistake with ''' → '' / """
imported>Nyarly
No edit summary
Line 73: Line 73:


A lot of the time, a $lang2nix is provided to translate the dependency set into nix code. In general this becomes easier when a .lock file is provided because the $lang-specific dependency resolution has already been done. It is even easier if all the dependencies have an associated sha256 that matches how nix calculates them.
A lot of the time, a $lang2nix is provided to translate the dependency set into nix code. In general this becomes easier when a .lock file is provided because the $lang-specific dependency resolution has already been done. It is even easier if all the dependencies have an associated sha256 that matches how nix calculates them.
== Curating a set of $lang dependencies ==
Some languages have been collected into lists of $lang packages within Nixpkgs. Each package is then pointed at the nixpkgs versions of its dependencies. (This is the Python preferred approach.)
Pros:
* Visibility
* Fewer touchpoints in the face of updates (esp. for security)
Cons:
* More work on Nix-side for both library and application maintainers - the process is very manual.


== Extending stdenv.mkDerivation ==
== Extending stdenv.mkDerivation ==