Julia: Difference between revisions
m Added a note about a potentially inaccurate statement about Julia Plots |
Added an example using the withPackages function |
||
| Line 5: | Line 5: | ||
== Packages == | == Packages == | ||
Julia packages can be installed via nix using the <code>julia.withPackages</code> function. For example:<syntaxhighlight lang="nix"> | |||
{pkgs, ...}: | |||
let | |||
myjulia = (pkgs.julia.withPackages [ | |||
"Plots" | |||
]); | |||
in | |||
{ | |||
environment.systemPackages = [ myjulia ]; | |||
home.packages = [ myjulia ]; # if using home manager | |||
} | |||
</syntaxhighlight> | |||
You can also install packages the [https://docs.julialang.org/en/v1/stdlib/Pkg/ 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]]. | Some Julia packages expect binaries to be installed on your system. Until a better solution is found, you can run Julia inside [[Distrobox]]. | ||