Files
nixpkgs/pkgs/development/julia-modules/extra-python-packages.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
547 B
Nix
Raw Normal View History

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