sage: make it possible not to rebuild sage-tests

Requiring sage-tests as build input just so it gets build is a bit
unfortunatey but understandable. This commit introduces an option to not
add sage-tests as a dependency. This is preferred in case e.g. Python
packages are added to the environment.
main
Frederik Rietdijk 2 years ago
parent 7442533bf1
commit 330d9344d2
  1. 3
      pkgs/applications/science/math/sage/default.nix
  2. 3
      pkgs/applications/science/math/sage/sage.nix

@ -1,5 +1,6 @@
{ pkgs
, withDoc ? false
, requireSageTests ? true
, extraPythonPackages ? ps: []
}:
@ -167,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;
}

@ -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

Loading…
Cancel
Save