mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 14:26:33 +01:00
19 lines
501 B
Nix
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;
|
|
}
|