Language-specific package helpers: Difference between revisions

From NixOS Wiki
imported>Mic92
No edit summary
m consistency
 
(35 intermediate revisions by 21 users not shown)
Line 1: Line 1:
__NOTOC__ <!-- Page too short for TOC to be useful -->
__NOTOC__ <!-- Page too short for TOC to be useful -->
The official overview can be found in the [http://nixos.org/nixpkgs/manual/#chap-language-support nixpkgs manual].
The Nixpkgs-provided helpers can be found in the [http://nixos.org/nixpkgs/manual/#chap-language-support Nixpkgs manual].
 
=== Elisp ===
* [https://github.com/ttuegel/emacs2nix emacs2nix]
 
=== Erlang ===
* [https://github.com/erlang-nix/hex2nix hex2nix]
* [https://github.com/axelf4/nix-rebar3 nix-rebar3] Builds rebar3 projects, without any Nix code generation.


=== Go ===
=== Go ===
* [https://github.com/kamilchm/go2nix go2nix]
* [https://github.com/kamilchm/go2nix go2nix]
* [https://github.com/nixcloud/dep2nix dep2nix]
* For go 1.11+ modules: [https://github.com/adisbladis/vgo2nix vgo2nix]
* [https://github.com/nix-community/gomod2nix gomod2nix]
=== Haskell ===
* [https://github.com/NixOS/cabal2nix cabal2nix]
* [https://github.com/adetokunbo/haskell-overridez haskell-overridez] - Simplify usage of nix dependencies during haskell development
* [https://github.com/nmattia/snack snack]
=== JavaScript / Node.js ===
* [https://github.com/svanderburg/node2nix node2nix], Recommend for use in nixpkgs
* [https://github.com/nmattia/napalm napalm], Imports package-lock.json into nix directly
* yarn-based (carry the same name but different implementations), yarn is a drop-in for `npm`:
** [https://github.com/moretea/yarn2nix yarn2nix] by moretea
** [https://github.com/Profpatsch/yarn2nix yarn2nix] by Profpatsch
** [https://github.com/stephank/yarn-plugin-nixify yarn-plugin-nixify] by stephank
* [https://github.com/rvl/bower2nix bower2nix]
=== PureScript ===
* [https://github.com/purs-nix/purs-nix purs-nix]
=== Lua ===
* [https://github.com/nix-community/luarocks-nix luarocks2nix] works with https://github.com/NixOS/nixpkgs/pull/33903
=== OCaml ===
* [https://github.com/timbertson/opam2nix opam2nix]
=== Perl ===
* [https://gitee.com/volth/cpan2nix/ cpan2nix]
=== Python ===
=== Python ===
* [https://github.com/garbas/pypi2nix pypi2nix] - Recommended by Community
* [https://github.com/nix-community/poetry2nix poetry2nix] - poetry2nix turns Poetry projects into Nix derivations without the need to actually write Nix expressions.
* [https://github.com/johbo/pip2nix pip2nix]
* [https://github.com/nix-community/nixpkgs-pytools nixpkgs-pytools] - semi-automated way to add python packages to nixpkgs.
* [https://github.com/cript0nauta/pynixify pynixify] - Create a nixpkgs overlay with human-readable expressions for each package
* [https://github.com/johbo/pip2nix pip2nix] - Generate nix expressions for Python packages.
 
Abandoned / discontinued:
* [https://github.com/garbas/pypi2nix pypi2nix] - Generate Nix expressions for Python packages
* [https://github.com/proger/python2nix python2nix]
* [https://github.com/proger/python2nix python2nix]
* [https://github.com/badi/nix-pip nix-pip]
* [https://github.com/badi/nix-pip nix-pip]
=== Node.js ===
* [https://github.com/DavHau/mach-nix mach-nix] - Create reproducible python environments from `requirements.txt` (using Nix)
* [https://github.com/svanderburg/node2nix node2nix]
 
* [https://github.com/NixOS/npm2nix npm2nix]
* yarn-based (carry the same name but different implementations):
** [https://github.com/moretea/yarn2nix yarn2nix] by moretea
** [https://github.com/Profpatsch/yarn2nix yarn2nix] by Profpatsch
* [https://bitbucket.org/shlevy/bower2nix bower2nix]
=== Ruby ===
=== Ruby ===
* [https://github.com/manveru/bundix bundix]
* [https://github.com/manveru/bundix bundix]
=== Haskell ===
 
* [https://github.com/NixOS/cabal2nix cabal2nix]
=== Rust ===
* [https://github.com/nmattia/naersk naersk] Pure nix, works well with dependencies from crates.io. Builds rust crates dependencies in one derivation and the crate itself in another.
* [https://github.com/nix-community/crate2nix crate2nix] Uses `buildRustCrate` from `nixpkgs` to build all dependencies independently. Either check in the generated build file or use it via "import from derivation".
* [https://github.com/cargo2nix/cargo2nix cargo2nix] Uses a `mkCrate` wrapper around Cargo and `rustc` to build all dependencies independently. Supports cross-compilation, alternative registries, and `nix-shell` integration.
* [https://github.com/ipetkov/crane crane] Builds rust crate dependencies in one derivation and the crate itself in another. Boilerplate setup for running test suites.
 
=== Scala ===
=== Scala ===
* [https://github.com/teozkr/Sbtix sbtix]
* [https://gitlab.com/nightkr/Sbtix sbtix]
=== Elisp ===
* [https://github.com/zaninime/sbt-derivation sbt-derivation]
* [https://github.com/ttuegel/emacs2nix emacs2nix]
=== Rust ===
* [https://pijul.org/2017/12/12/buildrustcrate/ carnix] [https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/rust.section.md#compiling-rust-crates-using-nix-instead-of-cargo documentation] - Recommend by community, also integrated into nixpkgs.
* [https://github.com/williamyaoh/cratesio2nix cratesio2nix]
* [https://github.com/fractalide/nixcrates nixcrates]
* [https://github.com/fractalide/nix-crates-index nix-crates-index]
* [https://github.com/williamyaoh/manilla manilla]
=== Erlang ===
* [https://github.com/erlang-nix/hex2nix hex2nix]
=== OCaml ===
* [https://github.com/timbertson/opam2nix opam2nix]

Latest revision as of 06:10, 14 September 2024

The Nixpkgs-provided helpers can be found in the Nixpkgs manual.

Elisp

Erlang

Go

Haskell

JavaScript / Node.js

PureScript

Lua

OCaml

Perl

Python

  • poetry2nix - poetry2nix turns Poetry projects into Nix derivations without the need to actually write Nix expressions.
  • nixpkgs-pytools - semi-automated way to add python packages to nixpkgs.
  • pynixify - Create a nixpkgs overlay with human-readable expressions for each package
  • pip2nix - Generate nix expressions for Python packages.

Abandoned / discontinued:

Ruby

Rust

  • naersk Pure nix, works well with dependencies from crates.io. Builds rust crates dependencies in one derivation and the crate itself in another.
  • crate2nix Uses `buildRustCrate` from `nixpkgs` to build all dependencies independently. Either check in the generated build file or use it via "import from derivation".
  • cargo2nix Uses a `mkCrate` wrapper around Cargo and `rustc` to build all dependencies independently. Supports cross-compilation, alternative registries, and `nix-shell` integration.
  • crane Builds rust crate dependencies in one derivation and the crate itself in another. Boilerplate setup for running test suites.

Scala