at master 547 B view raw
1{ 2 lib, 3 python3, 4}: 5 6# This file contains an extra mapping from Julia packages to the Python packages they depend on. 7rec { 8 packageMapping = { 9 ExcelFiles = [ "xlrd" ]; 10 PyPlot = [ "matplotlib" ]; 11 PythonPlot = [ "matplotlib" ]; 12 SymPy = [ "sympy" ]; 13 }; 14 15 getExtraPythonPackages = 16 names: 17 lib.concatMap ( 18 name: 19 let 20 allCandidates = if lib.hasAttr name packageMapping then lib.getAttr name packageMapping else [ ]; 21 in 22 lib.filter (x: lib.hasAttr x python3.pkgs) allCandidates 23 ) names; 24}