Merge pull request #161876 from FRidh/sage-python

Sage: make it possible to extend the Python runtime environment with additional packages
This commit is contained in:
7c6f434c 2022-02-27 19:02:59 +00:00 committed by GitHub
commit da576d8a4a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View file

@ -1,5 +1,7 @@
{ pkgs
, withDoc ? false
, requireSageTests ? true
, extraPythonPackages ? ps: []
}:
# Here sage and its dependencies are put together. Some dependencies may be pinned
@ -109,7 +111,7 @@ let
rpy2
sphinx
pillow
];
] ++ extraPythonPackages python3.pkgs;
pythonEnv = python3.buildEnv.override {
extraLibs = pythonRuntimeDeps;
@ -166,5 +168,5 @@ in
# A wrapper around sage that makes sure sage finds its docs (if they were build).
callPackage ./sage.nix {
inherit sage-tests sage-with-env sagedoc jupyter-kernel-definition;
inherit withDoc;
inherit withDoc requireSageTests;
}

View file

@ -6,6 +6,7 @@
, jupyter-kernel
, sagedoc
, withDoc
, requireSageTests
}:
# A wrapper that makes sure sage finds its docs (if they were build) and the
@ -26,7 +27,7 @@ stdenv.mkDerivation rec {
buildInputs = [
makeWrapper
] ++ lib.optionals requireSageTests [
# This is a hack to make sure sage-tests is evaluated. It doesn't acutally
# produce anything of value, it just decouples the tests from the build.
sage-tests