depot/pkgs/development/julia-modules/extra-python-packages.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

19 lines
501 B
Nix

{ 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;
}