nixpkgs/pkgs/development/julia-modules/extra-python-packages.nix
Tom McLaughlin 36bf6afd42 julia.withPackages: init on supported Julias (1.6, 1.8, 1.9)
Be able to build arbitrary Julia environments in Nixpkgs, in the same style as python.withPackages.
2023-12-14 23:00:34 -08:00

22 lines
493 B
Nix

{ lib
, python3
}:
# This file contains an extra mapping from Julia packages to the Python packages they depend on.
with lib;
rec {
packageMapping = {
ExcelFiles = ["xlrd"];
PyPlot = ["matplotlib"];
PythonPlot = ["matplotlib"];
SymPy = ["sympy"];
};
getExtraPythonPackages = names: concatMap (name: let
allCandidates = if hasAttr name packageMapping then getAttr name packageMapping else [];
in
filter (x: hasAttr x python3.pkgs) allCandidates
) names;
}