Nix Channels
https://nixos.org/manual/nixpkgs/unstable/#overview-of-nixpkgs
Packages, including the Nix packages collection, are distributed through channels. The collection is distributed for users of Nix on non-NixOS distributions through the channel
nixpkgs-unstable
. Users of NixOS generally use one of thenixos-*
channels, e.g.nixos-22.11
, which includes all packages and modules for the stable NixOS 22.11. Stable NixOS releases are generally only given security updates. More up to date packages and modules are available via thenixos-unstable
channel.Both
nixos-unstable
andnixpkgs-unstable
follow themaster
branch of the nixpkgs repository, although both do lag themaster
branch by generally a couple of days. Updates to a channel are distributed as soon as all tests for that channel pass, e.g. this table shows the status of tests for thenixpkgs-unstable
channel.
nixpkgs-unstable
: builds all packages for supported platforms.nixos-*
: builds all packages only for Linux.
See also Nix Channel Status.
Locales on non-NixOS Linux distros
https://nixos.wiki/wiki/Locales
On Rocky Linux, you should install glibc-all-langpacks
, which provides the locale-archive
file needed.
Without https://github.com/NixOS/nixpkgs/commit/de64f4939609ba9c258446eb17f9ec7425934f77, which the nixos-24.11 branch does not have, you also need to set LOCALE_ARCHIVE
explicitly to avoid using the nixpkgs-bundled locale-archive with just C.UTF-8.
Alternatively, you could install glibcLocales
from nixpkgs and reference the symlink in your .nix-profile.
BEAM language packages
https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/development/beam-modules/default.nix
https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/beam.section.md
All BEAM-related expressions are available via the top-level
beam
attribute, which includes:
interpreters
: a set of compilers running on the BEAM, including multiple Erlang/OTP versions (beam.interpreters.erlang_22
, etc), Elixir (beam.interpreters.elixir
) and LFE (Lisp Flavoured Erlang) (beam.interpreters.lfe
).packages
: a set of package builders (Mix and rebar3), each compiled with a specific Erlang/OTP version, e.g.beam.packages.erlang22
.The default Erlang compiler, defined by
beam.interpreters.erlang
, is aliased aserlang
. The default BEAM package set is defined bybeam.packages.erlang
and aliased at the top level asbeamPackages
.To create a package builder built with a custom Erlang version, use the lambda,
beam.packagesWith
, which accepts an Erlang/OTP derivation and produces a package builder similar tobeam.packages.erlang
.Many Erlang/OTP distributions available in
beam.interpreters
have versions with ODBC and/or Java enabled or without wx (no observer support). For example, there’sbeam.interpreters.erlang_22_odbc_javac
, which corresponds tobeam.interpreters.erlang_22
andbeam.interpreters.erlang_22_nox
, which corresponds tobeam.interpreters.erlang_22
.
elixir-ls
elixir-ls
is built with the default elixir
in BEAM modules. To use a different version of Elixir, you need to override it. For example:
You may still need to install hex locally and run elixir-ls
once to compile it.
If you see the following error, configure locales per Locales on non-NixOS Linux distros.
warning: the VM is running with native name encoding of latin1 which may cause Elixir to malfunction as it expects utf8. Please ensure your locale is set to UTF-8 (which can be verified by running "locale" in your shell) or set the ELIXIR_ERL_OPTIONS="+fnu" environment variable
For Emacs, lsp-mode has lsp-elixir-server-command
set to '("language_server.sh")
by default, so you need to change that to elixir-ls
, which is used to name the executable in nixpkgs.