Merge pull request #39981 from timokau/sage-on-nixos

Sage on nixos
This commit is contained in:
Michael Raskin
2018-07-01 07:37:42 +00:00
committed by GitHub
63 changed files with 4013 additions and 487 deletions

View File

@@ -2,9 +2,11 @@
, fetchPypi
, buildPythonPackage
, cython
, sphinx
, pariSupport ? true, pari # for interfacing with the PARI/GP signal handler
}:
assert pariSupport -> pari != null;
buildPythonPackage rec {
pname = "cysignals";
version = "1.7.1";
@@ -14,6 +16,8 @@ buildPythonPackage rec {
sha256 = "15nky8siwlc7s8v23vv4m0mnxa1z6jcs2qfr26m2mkw9j9g2na2j";
};
# explicit check:
# build/src/cysignals/implementation.c:27:2: error: #error "cysignals must be compiled without _FORTIFY_SOURCE"
hardeningDisable = [
"fortify"
];
@@ -26,6 +30,10 @@ buildPythonPackage rec {
export PATH="$out/bin:$PATH"
'';
buildInputs = lib.optionals pariSupport [
pari
];
propagatedBuildInputs = [
cython
];

View File

@@ -1,7 +1,6 @@
{ stdenv
, buildPythonPackage
, fetchpatch
, fetchPypi
, fetchFromGitHub
, flask
, flask-silk
, future
@@ -9,11 +8,16 @@
buildPythonPackage rec {
pname = "Flask-AutoIndex";
version = "0.6";
version = "2018-06-28";
src = fetchPypi {
inherit pname version;
sha256 = "19b10mb1nrqfjyafki6wnrbn8mqi30bbyyiyvp5xssc74pciyfqs";
# master fixes various issues (binary generation, flask syntax) and has no
# major changes
# new release requested: https://github.com/sublee/flask-autoindex/issues/38
src = fetchFromGitHub {
owner = "sublee";
repo = "flask-autoindex";
rev = "e3d449a89d56bf4c171c7c8d90af028e579782cf";
sha256 = "0bwq2nid4h8vrxspggk064vra4wd804cl2ryyx4j2d1dyywmgjgy";
};
propagatedBuildInputs = [
@@ -22,15 +26,6 @@ buildPythonPackage rec {
future
];
patches = [
# fix generated binary, see https://github.com/sublee/flask-autoindex/pull/32
(fetchpatch {
name = "fix_binary.patch";
url = "https://github.com/sublee/flask-autoindex/pull/32.patch";
sha256 = "1v2r0wvi7prhipjq89774svv6aqj0a13mdfj07pdlkpzfbf029dn";
})
];
meta = with stdenv.lib; {
description = "The mod_autoindex for Flask";
longDescription = ''

View File

@@ -1,16 +1,20 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, fetchFromGitHub
, flask
}:
buildPythonPackage rec {
pname = "Flask-Silk";
version = "0.2";
version = "2018-06-28";
src = fetchPypi {
inherit pname version;
sha256 = "1gjzighx4f0w39sq9xvzr1kwb4y7yv9qrgzvli1p89gy16piz8l0";
# master fixes flask import syntax and has no major changes
# new release requested: https://github.com/sublee/flask-silk/pull/6
src = fetchFromGitHub {
owner = "sublee";
repo = "flask-silk";
rev = "3a8166550f9a0ec52edae7bf31d9818c4c15c531";
sha256 = "0mplziqw52jfspas6vsm210lmxqqzgj0dxm8y0i3gpbyyykwcmh0";
};
propagatedBuildInputs = [

View File

@@ -1,6 +1,7 @@
{ lib
, buildPythonPackage
, fetchPypi
, fetchpatch
, glibcLocales
, mpmath
}:
@@ -25,10 +26,26 @@ buildPythonPackage rec {
export LANG="en_US.UTF-8"
'';
patches = [
# see https://trac.sagemath.org/ticket/20204 and https://github.com/sympy/sympy/issues/12825
# There is also an upstream patch for this, included in the next release (PR #128826).
# However that doesn't quite fix the issue yet. Apparently some changes by sage are required.
# TODO re-evaluate the change once a new sympy version is released (open a sage trac ticket about
# it).
(fetchpatch {
url = "https://git.sagemath.org/sage.git/plain/build/pkgs/sympy/patches/03_undeffun_sage.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba";
sha256 = "1mh2va1rlgizgvx8yzqwgvbf5wvswarn511002b361mc8yy0bnhr";
})
(fetchpatch {
url = "https://github.com/sympy/sympy/pull/13276.patch";
sha256 = "1rz74b5c74vwh3pj9axxgh610i02l3555vvsvr4a15ya7siw7zxh";
})
];
meta = {
description = "A Python library for symbolic mathematics";
homepage = http://www.sympy.org/;
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ lovek323 ];
};
}
}