mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-30 17:43:42 +00:00
23 lines
493 B
Nix
23 lines
493 B
Nix
|
{ lib
|
||
|
, python3
|
||
|
}:
|
||
|
|
||
|
# This file contains an extra mapping from Julia packages to the Python packages they depend on.
|
||
|
|
||
|
with lib;
|
||
|
|
||
|
rec {
|
||
|
packageMapping = {
|
||
|
ExcelFiles = ["xlrd"];
|
||
|
PyPlot = ["matplotlib"];
|
||
|
PythonPlot = ["matplotlib"];
|
||
|
SymPy = ["sympy"];
|
||
|
};
|
||
|
|
||
|
getExtraPythonPackages = names: concatMap (name: let
|
||
|
allCandidates = if hasAttr name packageMapping then getAttr name packageMapping else [];
|
||
|
in
|
||
|
filter (x: hasAttr x python3.pkgs) allCandidates
|
||
|
) names;
|
||
|
}
|