2023-04-08 01:15:01 +00: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"];
|
|
|
|
};
|
|
|
|
|
2024-08-13 20:26:07 +00:00
|
|
|
getExtraPythonPackages = names: lib.concatMap (name: let
|
|
|
|
allCandidates = if lib.hasAttr name packageMapping then lib.getAttr name packageMapping else [];
|
2023-04-08 01:15:01 +00:00
|
|
|
in
|
2024-08-13 20:26:07 +00:00
|
|
|
lib.filter (x: lib.hasAttr x python3.pkgs) allCandidates
|
2023-04-08 01:15:01 +00:00
|
|
|
) names;
|
|
|
|
}
|