Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.03 1.1 kB view raw
1{ stdenv 2, buildPythonPackage 3, fetchFromGitHub 4, django 5, python 6, cython 7, sympy 8, ply 9, mpmath 10, dateutil 11, colorama 12, six 13, pexpect 14}: 15 16if (stdenv.lib.versionOlder django.version "1.8") || 17 (stdenv.lib.versionAtLeast django.version "1.9") 18 then throw "mathics only supports django-1.8.x" 19 else buildPythonPackage rec { 20 pname = "mathics"; 21 version = "0.9"; 22 23 src = fetchFromGitHub { 24 owner = "mathics"; 25 repo = "Mathics"; 26 rev = "v${version}"; 27 sha256 = "0xzz7j8xskj5y6as178mjmm0i2xbhd4q4mwmdnvghpd2aqq3qx1c"; 28 }; 29 30 buildInputs = [ pexpect ]; 31 32 prePatch = '' 33 substituteInPlace setup.py --replace "sympy==0.7.6" "sympy" 34 ''; 35 36 postFixup = '' 37 wrapPythonProgramsIn $out/bin $out 38 patchPythonScript $out/${python.sitePackages}/mathics/manage.py 39 ''; 40 41 propagatedBuildInputs = [ cython sympy django ply mpmath dateutil colorama six ]; 42 43 meta = with stdenv.lib; { 44 description = "A general-purpose computer algebra system"; 45 homepage = http://www.mathics.org; 46 license = licenses.gpl3; 47 maintainers = [ maintainers.benley ]; 48 }; 49 50}