summaryrefslogtreecommitdiff
path: root/pkgs/development/julia-modules/extra-python-packages.nix
blob: 76913ac48aa795e82a4dcd2d8c7b85b2a6a31698 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
  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;
}