From 2d78d928cdd964e7b38e57e2f69f71b62d106cc2 Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Thu, 20 Jun 2019 12:17:33 +0200 Subject: [PATCH 1/2] sage: backport threejs r100 compatibility https://github.com/NixOS/nixpkgs/issues/62736#issuecomment-503757429 --- pkgs/applications/science/math/sage/sage-src.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix index e0050efe6bd..013b1bca930 100644 --- a/pkgs/applications/science/math/sage/sage-src.nix +++ b/pkgs/applications/science/math/sage/sage-src.nix @@ -152,6 +152,13 @@ stdenv.mkDerivation rec { rev = "c11d9cfa23ff9f77681a8f12742f68143eed4504"; sha256 = "0xzra7mbgqvahk9v45bjwir2mqz73hrhhy314jq5nxrb35ysdxyi"; }) + + # https://trac.sagemath.org/ticket/26718 + (fetchpatch { + name = "threejs-r100.patch"; + url = "https://git.sagemath.org/sage.git/patch/?h=86c5bb000259e6de5d7c60afc608a4b0d010b690"; + sha256 = "0sgqqd4df2bxsq19b6kfy7dvgyxprlpg7f3xx7g3fs8ij937m352"; + }) ]; patches = nixPatches ++ bugfixPatches ++ packageUpgradePatches; From 9955657209a827a98573ed808ba233db4bc1509b Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Thu, 20 Jun 2019 12:49:20 +0200 Subject: [PATCH 2/2] sage: fix online threejs --- pkgs/applications/science/math/sage/sage-with-env.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/applications/science/math/sage/sage-with-env.nix b/pkgs/applications/science/math/sage/sage-with-env.nix index 5bb7eda47d5..e4b1aeae016 100644 --- a/pkgs/applications/science/math/sage/sage-with-env.nix +++ b/pkgs/applications/science/math/sage/sage-with-env.nix @@ -99,6 +99,13 @@ stdenv.mkDerivation rec { for pkg in ${lib.concatStringsSep " " input_names}; do touch "installed/$pkg" done + + # threejs version is in format 0..minor, but sage currently still + # relies on installed_packages for the online version of threejs to work + # and expects the format r. This is a hotfix for now. + # upstream: https://trac.sagemath.org/ticket/26434 + rm "installed/threejs"* + touch "installed/threejs-r${lib.versions.minor three.version}" ''; installPhase = ''