diff --git a/pkgs/development/python-modules/spherogram/default.nix b/pkgs/development/python-modules/spherogram/default.nix index 1589a8520e0f..7af4b90c6cef 100644 --- a/pkgs/development/python-modules/spherogram/default.nix +++ b/pkgs/development/python-modules/spherogram/default.nix @@ -14,6 +14,11 @@ networkx, snappy-15-knots, snappy-manifolds, + + # tests + runCommand, + sage, + writableTmpDirAsHomeHook, }: buildPythonPackage rec { @@ -50,6 +55,25 @@ buildPythonPackage rec { runHook postCheck ''; + passthru.tests.sage = + let + sage' = sage.override { + extraPythonPackages = ps: [ ps.spherogram ]; + requireSageTests = false; + }; + in + runCommand "spherogram-sage-tests" + { + nativeBuildInputs = [ + sage' + writableTmpDirAsHomeHook + ]; + } + '' + sage -python -m spherogram.test + touch $out + ''; + meta = { description = "Spherical diagrams for 3-manifold topology"; homepage = "https://snappy.computop.org/spherogram.html";