Jump to content

Julia

From Official NixOS Wiki
Revision as of 15:09, 10 April 2026 by IllustratedMan-code (talk | contribs) (Added an example using the withPackages function)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Julia is a programming language, that aims to create an unprecedented combination of ease-of-use, power, and efficiency in a single language.

Installation And Versions

You can install the newest version of Julia either with julia-bin (the derivation which downloads the binary) or julia (the derivation which builds Julia from the source). From the end-user perspective, -bin packages should be indistinguishable from source-built ones.

Packages

Julia packages can be installed via nix using the julia.withPackages function. For example:

{pkgs, ...}:
let
  myjulia = (pkgs.julia.withPackages [
    "Plots"
  ]);
in
{

environment.systemPackages = [ myjulia ];

home.packages = [ myjulia ]; # if using home manager
}

You can also install packages the without nix.

Some Julia packages expect binaries to be installed on your system. Until a better solution is found, you can run Julia inside Distrobox.

Most notably, Julia Plots does not work. You can use Gadfly instead.

As of April 2026, the above statement is no longer accurate. Julia Plots does seem to work with no additional configuration.

Another solution is to enable nix-ld, see also here.