forked from mirrors/nixpkgs
Merge master into staging-next
This commit is contained in:
commit
9f677fc6b8
|
@ -654,6 +654,8 @@
|
|||
./services/networking/hylafax/default.nix
|
||||
./services/networking/i2pd.nix
|
||||
./services/networking/i2p.nix
|
||||
./services/networking/icecream/scheduler.nix
|
||||
./services/networking/icecream/daemon.nix
|
||||
./services/networking/iodine.nix
|
||||
./services/networking/iperf3.nix
|
||||
./services/networking/ircd-hybrid/default.nix
|
||||
|
|
155
nixos/modules/services/networking/icecream/daemon.nix
Normal file
155
nixos/modules/services/networking/icecream/daemon.nix
Normal file
|
@ -0,0 +1,155 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.icecream.daemon;
|
||||
in {
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.icecream.daemon = {
|
||||
|
||||
enable = mkEnableOption "Icecream Daemon";
|
||||
|
||||
openFirewall = mkOption {
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Whether to automatically open receive port in the firewall.
|
||||
'';
|
||||
};
|
||||
|
||||
openBroadcast = mkOption {
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Whether to automatically open the firewall for scheduler discovery.
|
||||
'';
|
||||
};
|
||||
|
||||
cacheLimit = mkOption {
|
||||
type = types.ints.u16;
|
||||
default = 256;
|
||||
description = ''
|
||||
Maximum size in Megabytes of cache used to store compile environments of compile clients.
|
||||
'';
|
||||
};
|
||||
|
||||
netName = mkOption {
|
||||
type = types.str;
|
||||
default = "ICECREAM";
|
||||
description = ''
|
||||
Network name to connect to. A scheduler with the same name needs to be running.
|
||||
'';
|
||||
};
|
||||
|
||||
noRemote = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Prevent jobs from other nodes being scheduled on this daemon.
|
||||
'';
|
||||
};
|
||||
|
||||
schedulerHost = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = ''
|
||||
Explicit scheduler hostname, useful in firewalled environments.
|
||||
|
||||
Uses scheduler autodiscovery via broadcast if set to null.
|
||||
'';
|
||||
};
|
||||
|
||||
maxProcesses = mkOption {
|
||||
type = types.nullOr types.ints.u16;
|
||||
default = null;
|
||||
description = ''
|
||||
Maximum number of compile jobs started in parallel for this daemon.
|
||||
|
||||
Uses the number of CPUs if set to null.
|
||||
'';
|
||||
};
|
||||
|
||||
nice = mkOption {
|
||||
type = types.int;
|
||||
default = 5;
|
||||
description = ''
|
||||
The level of niceness to use.
|
||||
'';
|
||||
};
|
||||
|
||||
hostname = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = ''
|
||||
Hostname of the daemon in the icecream infrastructure.
|
||||
|
||||
Uses the hostname retrieved via uname if set to null.
|
||||
'';
|
||||
};
|
||||
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
default = "icecc";
|
||||
description = ''
|
||||
User to run the icecream daemon as. Set to root to enable receive of
|
||||
remote compile environments.
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
default = pkgs.icecream;
|
||||
defaultText = "pkgs.icecream";
|
||||
type = types.package;
|
||||
description = "Icecream package to use.";
|
||||
};
|
||||
|
||||
extraArgs = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
description = "Additional command line parameters.";
|
||||
example = [ "-v" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
networking.firewall.allowedTCPPorts = mkIf cfg.openFirewall [ 10245 ];
|
||||
networking.firewall.allowedUDPPorts = mkIf cfg.openBroadcast [ 8765 ];
|
||||
|
||||
systemd.services.icecc-daemon = {
|
||||
description = "Icecream compile daemon";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = escapeShellArgs ([
|
||||
"${getBin cfg.package}/bin/iceccd"
|
||||
"-b" "$STATE_DIRECTORY"
|
||||
"-u" "icecc"
|
||||
(toString cfg.nice)
|
||||
]
|
||||
++ optionals (cfg.schedulerHost != null) ["-s" cfg.schedulerHost]
|
||||
++ optionals (cfg.netName != null) [ "-n" cfg.netName ]
|
||||
++ optionals (cfg.cacheLimit != null) [ "--cache-limit" (toString cfg.cacheLimit) ]
|
||||
++ optionals (cfg.maxProcesses != null) [ "-m" (toString cfg.maxProcesses) ]
|
||||
++ optionals (cfg.hostname != null) [ "-N" (cfg.hostname) ]
|
||||
++ optional cfg.noRemote "--no-remote"
|
||||
++ cfg.extraArgs);
|
||||
DynamicUser = true;
|
||||
User = "icecc";
|
||||
Group = "icecc";
|
||||
StateDirectory = "icecc";
|
||||
RuntimeDirectory = "icecc";
|
||||
AmbientCapabilities = "CAP_SYS_CHROOT";
|
||||
CapabilityBoundingSet = "CAP_SYS_CHROOT";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
meta.maintainers = with lib.maintainers; [ emantor ];
|
||||
}
|
101
nixos/modules/services/networking/icecream/scheduler.nix
Normal file
101
nixos/modules/services/networking/icecream/scheduler.nix
Normal file
|
@ -0,0 +1,101 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.icecream.scheduler;
|
||||
in {
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.icecream.scheduler = {
|
||||
enable = mkEnableOption "Icecream Scheduler";
|
||||
|
||||
netName = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = ''
|
||||
Network name for the icecream scheduler.
|
||||
|
||||
Uses the default ICECREAM if null.
|
||||
'';
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
type = types.port;
|
||||
default = 8765;
|
||||
description = ''
|
||||
Server port to listen for icecream daemon requests.
|
||||
'';
|
||||
};
|
||||
|
||||
openFirewall = mkOption {
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Whether to automatically open the daemon port in the firewall.
|
||||
'';
|
||||
};
|
||||
|
||||
openTelnet = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to open the telnet TCP port on 8766.
|
||||
'';
|
||||
};
|
||||
|
||||
persistentClientConnection = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to prevent clients from connecting to a better scheduler.
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
default = pkgs.icecream;
|
||||
defaultText = "pkgs.icecream";
|
||||
type = types.package;
|
||||
description = "Icecream package to use.";
|
||||
};
|
||||
|
||||
extraArgs = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
description = "Additional command line parameters";
|
||||
example = [ "-v" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
networking.firewall.allowedTCPPorts = mkMerge [
|
||||
(mkIf cfg.openFirewall [ cfg.port ])
|
||||
(mkIf cfg.openTelnet [ 8766 ])
|
||||
];
|
||||
|
||||
systemd.services.icecc-scheduler = {
|
||||
description = "Icecream scheduling server";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = escapeShellArgs ([
|
||||
"${getBin cfg.package}/bin/icecc-scheduler"
|
||||
"-p" (toString cfg.port)
|
||||
]
|
||||
++ optionals (cfg.netName != null) [ "-n" (toString cfg.netName) ]
|
||||
++ optional cfg.persistentClientConnection "-r"
|
||||
++ cfg.extraArgs);
|
||||
|
||||
DynamicUser = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
meta.maintainers = with lib.maintainers; [ emantor ];
|
||||
}
|
|
@ -12,13 +12,13 @@ let
|
|||
;
|
||||
in pythonPackages.buildPythonApplication rec {
|
||||
pname = "picard";
|
||||
version = "2.5.2";
|
||||
version = "2.5.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "metabrainz";
|
||||
repo = pname;
|
||||
rev = "release-${version}";
|
||||
sha256 = "193pk6fhrqar2ra8krj6xdd7sm5qfw0p708iazzwk4b8c8g0q72j";
|
||||
sha256 = "11kx4wwl6d2yy0kijcsda0kz2494a7cywp3mzvbga1hcz78f2xv6";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ gettext qt5.wrapQtAppsHook qt5.qtbase ]
|
||||
|
|
24
pkgs/applications/networking/icemon/default.nix
Normal file
24
pkgs/applications/networking/icemon/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{ lib, fetchFromGitHub, mkDerivation, qtbase, cmake, extra-cmake-modules, icecream, libcap_ng, lzo, zstd, libarchive, wrapQtAppsHook }:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "icemon";
|
||||
version = "3.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "icecc";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "09jnipr67dhawbxfn69yh7mmjrkylgiqmd0gmc2limd3z15d7pgc";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake extra-cmake-modules wrapQtAppsHook ];
|
||||
buildInputs = [ icecream qtbase libcap_ng lzo zstd libarchive ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Icecream GUI Monitor";
|
||||
inherit (src.meta) homepage;
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ emantor ];
|
||||
platforms = with platforms; linux ++ darwin;
|
||||
};
|
||||
}
|
|
@ -1,29 +1,31 @@
|
|||
{ mkDerivation, lib, fetchFromGitHub, pkgconfig
|
||||
{ mkDerivation, lib, fetchFromGitHub, makeWrapper, pkgconfig
|
||||
, boost, libtorrentRasterbar, qtbase, qttools, qtsvg
|
||||
, debugSupport ? false # Debugging
|
||||
, guiSupport ? true, dbus ? null # GUI (disable to run headless)
|
||||
, debugSupport ? false
|
||||
, guiSupport ? true, dbus ? null # GUI OR headless
|
||||
, webuiSupport ? true # WebUI
|
||||
, trackerSearch ? true, python3 ? null
|
||||
}:
|
||||
|
||||
assert guiSupport -> (dbus != null);
|
||||
with lib;
|
||||
assert trackerSearch -> (python3 != null);
|
||||
|
||||
with lib;
|
||||
mkDerivation rec {
|
||||
pname = "qbittorrent";
|
||||
version = "4.3.0.1";
|
||||
version = "4.3.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "qbittorrent";
|
||||
repo = "qbittorrent";
|
||||
rev = "release-${version}";
|
||||
sha256 = "068sf24mjvc2idimgpzvf7gjk8n9xrr3qqlqfx5j3j598ckm3yfp";
|
||||
sha256 = "17ih00q7idrpl3b2vgh4smva6lazs5jw06pblriscn1lrwdvrc38";
|
||||
};
|
||||
|
||||
# NOTE: 2018-05-31: CMake is working but it is not officially supported
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
nativeBuildInputs = [ makeWrapper pkgconfig ];
|
||||
|
||||
buildInputs = [ boost libtorrentRasterbar qtbase qttools qtsvg ]
|
||||
++ optional guiSupport dbus; # D(esktop)-Bus depends on GUI support
|
||||
++ optional guiSupport dbus # D(esktop)-Bus depends on GUI support
|
||||
++ optional trackerSearch python3;
|
||||
|
||||
# Otherwise qm_gen.pri assumes lrelease-qt5, which does not exist.
|
||||
QMAKE_LRELEASE = "lrelease";
|
||||
|
@ -35,6 +37,12 @@ mkDerivation rec {
|
|||
++ optional (!webuiSupport) "--disable-webui"
|
||||
++ optional debugSupport "--enable-debug";
|
||||
|
||||
postInstall = "wrapProgram $out/bin/${
|
||||
if guiSupport
|
||||
then "qbittorrent"
|
||||
else "qbittorrent-nox"
|
||||
} --prefix PATH : ${makeBinPath [ python3 ]}";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
|
|
|
@ -9,11 +9,11 @@ assert (!blas.isILP64) && (!lapack.isILP64);
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "giac${lib.optionalString enableGUI "-with-xcas"}";
|
||||
version = "1.5.0-21"; # TODO try to remove preCheck phase on upgrade
|
||||
version = "1.5.0-87"; # TODO try to remove preCheck phase on upgrade
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/giac_${version}.tar.gz";
|
||||
sha256 = "1b9khiv0mk2xzw1rblm2jy6qsf8y6f9k7qy15sxpb21d72hzzbl2";
|
||||
sha256 = "1d0h1yb7qvh9x7wwv9yrzmcp712f49w1iljkxp4y6g9pzsmg1mmv";
|
||||
};
|
||||
|
||||
patches = stdenv.lib.optionals (!enableGUI) [
|
||||
|
|
|
@ -87,6 +87,10 @@ stdenv.mkDerivation ({
|
|||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru = {
|
||||
ecl = ecl;
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Computer algebra system";
|
||||
homepage = "http://maxima.sourceforge.net";
|
||||
|
|
|
@ -7,7 +7,7 @@ stdenv.mkDerivation rec {
|
|||
version = "27r1";
|
||||
src = fetchurl {
|
||||
url = "http://pallini.di.uniroma1.it/nauty${version}.tar.gz";
|
||||
sha256 = "1nym0p2djws8ylkpr0kgpxfa6fxdlh46cmvz0gn5vd02jzgs0aww";
|
||||
sha256 = "0xsfqfcknbd6g6wzpa5l7crmmk3bf3zjh37rhylq6b20dqcmvjkn";
|
||||
};
|
||||
outputs = [ "out" "dev" ];
|
||||
configureFlags = [
|
||||
|
|
|
@ -15,7 +15,8 @@ stdenv.mkDerivation rec {
|
|||
version = "2.11.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://pari.math.u-bordeaux.fr/pub/pari/unix/${pname}-${version}.tar.gz";
|
||||
# Versions with current majorMinor values are at http://pari.math.u-bordeaux.fr/pub/pari/unix/${pname}-${version}.tar.gz
|
||||
url = "https://pari.math.u-bordeaux.fr/pub/pari/OLD/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.gz";
|
||||
sha256 = "sha256-v8iPxPc1L0hA5uNSxy8DacvqikVAOxg0piafNwmXCxw=";
|
||||
};
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, fetchurl
|
||||
, autoreconfHook
|
||||
, pkgconfig
|
||||
, flint
|
||||
|
@ -33,6 +34,14 @@ stdenv.mkDerivation rec {
|
|||
pkgconfig
|
||||
];
|
||||
|
||||
patches = [
|
||||
(fetchurl {
|
||||
name = "py_ssize_t_clean.patch";
|
||||
url = "https://git.sagemath.org/sage.git/plain/build/pkgs/pynac/patches/py_ssize_t_clean.patch?h=9.2";
|
||||
sha256 = "0l3gbg9hc4v671zf4w376krnk3wh8hj3649610nlvzzxckcryzab";
|
||||
})
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Python is Not a CAS -- modified version of Ginac";
|
||||
longDescription = ''
|
||||
|
|
|
@ -9,31 +9,13 @@
|
|||
let
|
||||
inherit (pkgs) symlinkJoin callPackage nodePackages;
|
||||
|
||||
# https://trac.sagemath.org/ticket/15980 for tracking of python3 support
|
||||
python = pkgs.python2.override {
|
||||
python3 = pkgs.python3.override {
|
||||
packageOverrides = self: super: {
|
||||
# python packages that appear unmaintained and were not accepted into the nixpkgs
|
||||
# tree because of that. These packages are only dependencies of the more-or-less
|
||||
# deprecated sagenb. However sagenb is still a default dependency and the doctests
|
||||
# depend on it.
|
||||
# See https://github.com/NixOS/nixpkgs/pull/38787 for a discussion.
|
||||
# The dependency on the sage notebook (and therefore these packages) will be
|
||||
# removed in the future:
|
||||
# https://trac.sagemath.org/ticket/25837
|
||||
flask-oldsessions = self.callPackage ./flask-oldsessions.nix {};
|
||||
flask-openid = self.callPackage ./flask-openid.nix {};
|
||||
python-openid = self.callPackage ./python-openid.nix {};
|
||||
sagenb = self.callPackage ./sagenb.nix {
|
||||
mathjax = nodePackages.mathjax;
|
||||
};
|
||||
|
||||
# Package with a cyclic dependency with sage
|
||||
pybrial = self.callPackage ./pybrial.nix {};
|
||||
|
||||
# `sagelib`, i.e. all of sage except some wrappers and runtime dependencies
|
||||
sagelib = self.callPackage ./sagelib.nix {
|
||||
inherit flint ecl arb;
|
||||
inherit flint arb;
|
||||
inherit sage-src env-locations pynac singular;
|
||||
ecl = maxima-ecl.ecl;
|
||||
linbox = pkgs.linbox.override { withSage = true; };
|
||||
pkg-config = pkgs.pkgconfig; # not to confuse with pythonPackages.pkgconfig
|
||||
};
|
||||
|
@ -59,9 +41,10 @@ let
|
|||
# A bash script setting various environment variables to tell sage where
|
||||
# the files its looking fore are located. Also see `sage-env`.
|
||||
env-locations = callPackage ./env-locations.nix {
|
||||
inherit pari_data ecl;
|
||||
inherit pari_data;
|
||||
inherit singular maxima-ecl;
|
||||
cysignals = python.pkgs.cysignals;
|
||||
ecl = maxima-ecl.ecl;
|
||||
cysignals = python3.pkgs.cysignals;
|
||||
three = nodePackages.three;
|
||||
mathjax = nodePackages.mathjax;
|
||||
};
|
||||
|
@ -69,21 +52,22 @@ let
|
|||
# The shell file that gets sourced on every sage start. Will also source
|
||||
# the env-locations file.
|
||||
sage-env = callPackage ./sage-env.nix {
|
||||
sagelib = python.pkgs.sagelib;
|
||||
sagelib = python3.pkgs.sagelib;
|
||||
inherit env-locations;
|
||||
inherit python ecl singular palp flint pynac pythonEnv maxima-ecl;
|
||||
inherit python3 singular palp flint pynac pythonEnv maxima-ecl;
|
||||
ecl = maxima-ecl.ecl;
|
||||
pkg-config = pkgs.pkgconfig; # not to confuse with pythonPackages.pkgconfig
|
||||
};
|
||||
|
||||
# The documentation for sage, building it takes a lot of ram.
|
||||
sagedoc = callPackage ./sagedoc.nix {
|
||||
inherit sage-with-env;
|
||||
inherit python maxima-ecl;
|
||||
inherit python3 maxima-ecl;
|
||||
};
|
||||
|
||||
# sagelib with added wrappers and a dependency on sage-tests to make sure thet tests were run.
|
||||
sage-with-env = callPackage ./sage-with-env.nix {
|
||||
inherit pythonEnv;
|
||||
inherit python3 pythonEnv;
|
||||
inherit sage-env;
|
||||
inherit pynac singular maxima-ecl;
|
||||
pkg-config = pkgs.pkgconfig; # not to confuse with pythonPackages.pkgconfig
|
||||
|
@ -100,10 +84,8 @@ let
|
|||
|
||||
sage-src = callPackage ./sage-src.nix {};
|
||||
|
||||
pythonRuntimeDeps = with python.pkgs; [
|
||||
pythonRuntimeDeps = with python3.pkgs; [
|
||||
sagelib
|
||||
pybrial
|
||||
sagenb
|
||||
cvxopt
|
||||
networkx
|
||||
service-identity
|
||||
|
@ -116,11 +98,10 @@ let
|
|||
ipywidgets
|
||||
rpy2
|
||||
sphinx
|
||||
typing
|
||||
pillow
|
||||
];
|
||||
|
||||
pythonEnv = python.buildEnv.override {
|
||||
pythonEnv = python3.buildEnv.override {
|
||||
extraLibs = pythonRuntimeDeps;
|
||||
ignoreCollisions = true;
|
||||
} // { extraLibs = pythonRuntimeDeps; }; # make the libs accessible
|
||||
|
@ -129,8 +110,21 @@ let
|
|||
|
||||
singular = pkgs.singular.override { inherit flint; };
|
||||
|
||||
# https://trac.sagemath.org/ticket/26625
|
||||
maxima-ecl = pkgs.maxima-ecl;
|
||||
maxima-ecl = pkgs.maxima-ecl.override {
|
||||
ecl = pkgs.ecl.override {
|
||||
# "echo syntax error | ecl > /dev/full 2>&1" segfaults in
|
||||
# ECL. We apply a patch to fix it (write_error.patch), but it
|
||||
# only works if threads are disabled. sage 9.2 tests this
|
||||
# (src/sage/interfaces/tests.py) and ships ecl like so.
|
||||
# https://gitlab.com/embeddable-common-lisp/ecl/-/merge_requests/1#note_1657275
|
||||
threadSupport = false;
|
||||
|
||||
# if we don't use the system boehmgc, sending a SIGINT to ecl
|
||||
# can segfault if we it happens during memory allocation.
|
||||
# src/sage/libs/ecl.pyx would intermittently fail in this case.
|
||||
useBoehmgc = true;
|
||||
};
|
||||
};
|
||||
|
||||
# *not* to confuse with the python package "pynac"
|
||||
pynac = pkgs.pynac.override { inherit singular flint; };
|
||||
|
@ -161,9 +155,6 @@ let
|
|||
pari-seadata-small
|
||||
];
|
||||
};
|
||||
|
||||
# https://trac.sagemath.org/ticket/22191
|
||||
ecl = pkgs.ecl_16_1_2;
|
||||
in
|
||||
# A wrapper around sage that makes sure sage finds its docs (if they were build).
|
||||
callPackage ./sage.nix {
|
||||
|
|
|
@ -44,6 +44,6 @@ writeTextFile rec {
|
|||
export JSMOL_DIR="${jmol}/share/jsmol"
|
||||
export MATHJAX_DIR="${mathjax}/lib/node_modules/mathjax"
|
||||
export THREEJS_DIR="${three}/lib/node_modules/three"
|
||||
export SAGE_INCLUDE_DIRECTORIES="${cysignals}/lib/python2.7/site-packages"
|
||||
export SAGE_INCLUDE_DIRECTORIES="${cysignals}/${cysignals.pythonModule.sitePackages}"
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
{ stdenv
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, python
|
||||
, flask
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "Flask-OldSessions";
|
||||
version = "0.10";
|
||||
|
||||
# no artifact on pypi: https://github.com/mitsuhiko/flask-oldsessions/issues/1
|
||||
src = fetchFromGitHub {
|
||||
owner = "mitsuhiko";
|
||||
repo = "flask-oldsessions";
|
||||
rev = version;
|
||||
sha256 = "04b5m8njjiwld9a0zw55iqwvyjgwcpdbhz1cic8nyhgcmypbicqn";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
flask
|
||||
];
|
||||
|
||||
# missing module flask.testsuite, probably assumes an old version of flask
|
||||
doCheck = false;
|
||||
checkPhase = ''
|
||||
${python.interpreter} run-tests.py
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Provides a session class that works like the one in Flask before 0.10.";
|
||||
license = licenses.bsd2;
|
||||
maintainers = teams.sage.members;
|
||||
homepage = "https://github.com/mitsuhiko/flask-oldsessions";
|
||||
};
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
{ stdenv
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, flask
|
||||
, python-openid
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "Flask-OpenID";
|
||||
version = "1.2.5";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1aycwmwi7ilcaa5ab8hm0bp6323zl8z25q9ha0gwrl8aihfgx3ss";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
flask
|
||||
python-openid
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Adds openid support to flask applications";
|
||||
license = licenses.bsd2;
|
||||
maintainers = teams.sage.members;
|
||||
homepage = "https://pythonhosted.org/Flask-OpenID/";
|
||||
};
|
||||
}
|
|
@ -1,17 +1,17 @@
|
|||
From 8218bd4fdeb4c92de8af0d3aabec55980fc4fb3d Mon Sep 17 00:00:00 2001
|
||||
From f5ea42a7aaed7611fb55b65897b9fcf2b7bcf97e Mon Sep 17 00:00:00 2001
|
||||
From: Timo Kaufmann <timokau@zoho.com>
|
||||
Date: Sun, 21 Oct 2018 17:52:40 +0200
|
||||
Subject: [PATCH] Only test py2/py3 optional tests when all of sage is tested
|
||||
|
||||
---
|
||||
src/sage/doctest/control.py | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
src/sage/doctest/control.py | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/sage/doctest/control.py b/src/sage/doctest/control.py
|
||||
index bf18df8b2b..935c67abf7 100644
|
||||
index 2d93841e50..6d156e29a1 100644
|
||||
--- a/src/sage/doctest/control.py
|
||||
+++ b/src/sage/doctest/control.py
|
||||
@@ -362,7 +362,8 @@ class DocTestController(SageObject):
|
||||
@@ -375,7 +375,8 @@ class DocTestController(SageObject):
|
||||
if not optionaltag_regex.search(o):
|
||||
raise ValueError('invalid optional tag {!r}'.format(o))
|
||||
|
||||
|
@ -21,15 +21,6 @@ index bf18df8b2b..935c67abf7 100644
|
|||
|
||||
self.options = options
|
||||
|
||||
@@ -765,7 +766,7 @@ class DocTestController(SageObject):
|
||||
sage: DC = DocTestController(DD, [dirname])
|
||||
sage: DC.expand_files_into_sources()
|
||||
sage: sorted(DC.sources[0].options.optional) # abs tol 1
|
||||
- ['guava', 'magma', 'py2']
|
||||
+ ['guava', 'magma']
|
||||
|
||||
We check that files are skipped appropriately::
|
||||
|
||||
--
|
||||
2.18.1
|
||||
2.28.0
|
||||
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
diff --git a/src/sage/env.py b/src/sage/env.py
|
||||
index 061b94f3f1..67cd091540 100644
|
||||
index 1ddfc7cfb9..45033d6328 100644
|
||||
--- a/src/sage/env.py
|
||||
+++ b/src/sage/env.py
|
||||
@@ -189,88 +189,13 @@ var('MAXIMA_FAS')
|
||||
@@ -203,97 +203,13 @@ var('ARB_LIBRARY', 'arb')
|
||||
var('SAGE_BANNER', '')
|
||||
var('SAGE_IMPORTALL', 'yes')
|
||||
|
||||
-
|
||||
-def _get_shared_lib_filename(libname, *additional_libnames):
|
||||
- """
|
||||
- Return the full path to a shared library file installed in the standard
|
||||
- location for the system within the ``LIBDIR`` prefix (or
|
||||
- ``$SAGE_LOCAL/lib`` in the case of manual build of Sage).
|
||||
- Return the full path to a shared library file installed in
|
||||
- ``$SAGE_LOCAL/lib`` or the directories associated with the
|
||||
- Python sysconfig.
|
||||
-
|
||||
- This can also be passed more than one library name (e.g. for cases where
|
||||
- some library may have multiple names depending on the platform) in which
|
||||
|
@ -25,7 +25,7 @@ index 061b94f3f1..67cd091540 100644
|
|||
- For distributions like Debian that use a multiarch layout, we also try the
|
||||
- multiarch lib paths (i.e. ``/usr/lib/<arch>/``).
|
||||
-
|
||||
- Returns ``None`` if the file does not exist.
|
||||
- This returns ``None`` if the file does not exist.
|
||||
-
|
||||
- EXAMPLES::
|
||||
-
|
||||
|
@ -48,11 +48,17 @@ index 061b94f3f1..67cd091540 100644
|
|||
-
|
||||
- for libname in (libname,) + additional_libnames:
|
||||
- if sys.platform == 'cygwin':
|
||||
- bindir = sysconfig.get_config_var('BINDIR')
|
||||
- # Later down we take the last matching DLL found, so search
|
||||
- # SAGE_LOCAL second so that it takes precedence
|
||||
- bindirs = [
|
||||
- sysconfig.get_config_var('BINDIR'),
|
||||
- os.path.join(SAGE_LOCAL, 'bin')
|
||||
- ]
|
||||
- pats = ['cyg{}.dll'.format(libname), 'cyg{}-*.dll'.format(libname)]
|
||||
- filenames = []
|
||||
- for pat in pats:
|
||||
- filenames += glob.glob(os.path.join(bindir, pat))
|
||||
- for bindir in bindirs:
|
||||
- for pat in pats:
|
||||
- filenames += glob.glob(os.path.join(bindir, pat))
|
||||
-
|
||||
- # Note: This is not very robust, since if there are multi DLL
|
||||
- # versions for the same library this just selects one more or less
|
||||
|
@ -66,10 +72,13 @@ index 061b94f3f1..67cd091540 100644
|
|||
- else:
|
||||
- ext = 'so'
|
||||
-
|
||||
- libdirs = [sysconfig.get_config_var('LIBDIR')]
|
||||
- libdirs = [
|
||||
- os.path.join(SAGE_LOCAL, 'lib'),
|
||||
- sysconfig.get_config_var('LIBDIR')
|
||||
- ]
|
||||
- multilib = sysconfig.get_config_var('MULTILIB')
|
||||
- if multilib:
|
||||
- libdirs.insert(0, os.path.join(libdirs[0], multilib))
|
||||
- libdirs.insert(1, os.path.join(libdirs[0], multilib))
|
||||
-
|
||||
- for libdir in libdirs:
|
||||
- basename = 'lib{}.{}'.format(libname, ext)
|
||||
|
@ -89,7 +98,7 @@ index 061b94f3f1..67cd091540 100644
|
|||
|
||||
# locate libgap shared object
|
||||
-GAP_SO= _get_shared_lib_filename('gap','')
|
||||
+GAP_SO= '/default'
|
||||
+GAP_SO = '/default'
|
||||
var('GAP_SO', GAP_SO)
|
||||
|
||||
# post process
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
diff --git a/src/sage/misc/sphinxify.py b/src/sage/misc/sphinxify.py
|
||||
index 4849c2bffa..76b7bc8602 100644
|
||||
--- a/src/sage/misc/sphinxify.py
|
||||
+++ b/src/sage/misc/sphinxify.py
|
||||
@@ -25,6 +25,7 @@ from __future__ import absolute_import, print_function
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
+import warnings
|
||||
from tempfile import mkdtemp
|
||||
from sphinx.application import Sphinx
|
||||
|
||||
@@ -120,7 +121,10 @@ smart_quotes = no""")
|
||||
# buildername, confoverrides, status, warning, freshenv).
|
||||
sphinx_app = Sphinx(srcdir, confdir, outdir, doctreedir, format,
|
||||
confoverrides, None, None, True)
|
||||
- sphinx_app.build(None, [rst_name])
|
||||
+ with warnings.catch_warnings():
|
||||
+ # Quick and dirty workaround for https://trac.sagemath.org/ticket/28856#comment:19
|
||||
+ warnings.simplefilter("ignore")
|
||||
+ sphinx_app.build(None, [rst_name])
|
||||
sys.path = old_sys_path
|
||||
|
||||
# We need to remove "_" from __builtin__ that the gettext module installs
|
|
@ -1,24 +1,24 @@
|
|||
diff --git a/src/sage/tests/cmdline.py b/src/sage/tests/cmdline.py
|
||||
index bd6b76ab82..ccf1203dec 100644
|
||||
index 6e034dcb5a..8ec60ec72b 100644
|
||||
--- a/src/sage/tests/cmdline.py
|
||||
+++ b/src/sage/tests/cmdline.py
|
||||
@@ -837,8 +837,6 @@ def test_executable(args, input="", timeout=100.0, **kwds):
|
||||
@@ -660,8 +660,8 @@ def test_executable(args, input="", timeout=100.0, pydebug_ignore_warnings=False
|
||||
sage: with open(input, 'w') as F:
|
||||
....: _ = F.write(s)
|
||||
sage: L = ["sage", "--rst2ipynb", input, output]
|
||||
- sage: test_executable(L) # optional - rst2ipynb
|
||||
- ('', '', 0)
|
||||
+ sage: test_executable(L)[2] # optional - rst2ipynb
|
||||
+ 0
|
||||
sage: import json # optional - rst2ipynb
|
||||
sage: d = json.load(open(output,'r')) # optional - rst2ipynb
|
||||
sage: type(d) # optional - rst2ipynb
|
||||
@@ -757,8 +757,6 @@ def test_executable(args, input="", timeout=100.0, pydebug_ignore_warnings=False
|
||||
///
|
||||
4
|
||||
}}}
|
||||
- sage: err # py2
|
||||
- sage: err # py2 # optional -- sagenb
|
||||
- ''
|
||||
sage: ret
|
||||
sage: ret # py2 # optional -- sagenb
|
||||
0
|
||||
|
||||
@@ -871,8 +869,8 @@ def test_executable(args, input="", timeout=100.0, **kwds):
|
||||
sage: output = tmp_filename(ext='.sws')
|
||||
sage: with open(input, 'w') as F:
|
||||
....: _ = F.write(s)
|
||||
- sage: test_executable(["sage", "--rst2sws", input, output]) # py2
|
||||
- ('', '', 0)
|
||||
+ sage: test_executable(["sage", "--rst2sws", input, output])[2] # py2
|
||||
+ 0
|
||||
sage: import tarfile # py2
|
||||
sage: f = tarfile.open(output, 'r') # py2
|
||||
sage: print(f.extractfile('sage_worksheet/worksheet.html').read()) # py2
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
diff --git a/src/sage/all.py b/src/sage/all.py
|
||||
index c87c9372e9..862fca4fcc 100644
|
||||
--- a/src/sage/all.py
|
||||
+++ b/src/sage/all.py
|
||||
@@ -306,6 +306,7 @@ warnings.filters.remove(('ignore', None, DeprecationWarning, None, 0))
|
||||
# Ignore all deprecations from IPython etc.
|
||||
warnings.filterwarnings('ignore', category=DeprecationWarning,
|
||||
module='.*(IPython|ipykernel|jupyter_client|jupyter_core|nbformat|notebook|ipywidgets|storemagic)')
|
||||
+warnings.filterwarnings('ignore', category=DeprecationWarning, message=r".*The import 'werkzeug.ImmutableDict' is deprecated")
|
||||
# Ignore collections.abc warnings, there are a lot of them but they are
|
||||
# harmless.
|
||||
warnings.filterwarnings('ignore', category=DeprecationWarning,
|
|
@ -1,20 +0,0 @@
|
|||
diff --git a/src/sage/doctest/parsing.py b/src/sage/doctest/parsing.py
|
||||
index 6bdc9a0..31fc780 100644
|
||||
--- a/src/sage/doctest/parsing.py
|
||||
+++ b/src/sage/doctest/parsing.py
|
||||
@@ -40,6 +40,7 @@ from .external import available_software
|
||||
|
||||
float_regex = re.compile('\s*([+-]?\s*((\d*\.?\d+)|(\d+\.?))([eE][+-]?\d+)?)')
|
||||
optional_regex = re.compile(r'(py2|py3|long time|not implemented|not tested|known bug)|([^ a-z]\s*optional\s*[:-]*((\s|\w)*))')
|
||||
+pari_stack_warning_regex = re.compile(r'\s*\*\*\*.*(Warning: increasing stack size to )\d+\.')
|
||||
find_sage_prompt = re.compile(r"^(\s*)sage: ", re.M)
|
||||
find_sage_continuation = re.compile(r"^(\s*)\.\.\.\.:", re.M)
|
||||
random_marker = re.compile('.*random', re.I)
|
||||
@@ -935,6 +936,7 @@ class SageOutputChecker(doctest.OutputChecker):
|
||||
<type 'float'>
|
||||
"""
|
||||
got = self.human_readable_escape_sequences(got)
|
||||
+ got = pari_stack_warning_regex.sub('', got)
|
||||
if isinstance(want, MarkedOutput):
|
||||
if want.random:
|
||||
return True
|
|
@ -0,0 +1,39 @@
|
|||
diff --git a/src/sage/repl/image.py b/src/sage/repl/image.py
|
||||
index d7d00b0..cd1607a 100644
|
||||
--- a/src/sage/repl/image.py
|
||||
+++ b/src/sage/repl/image.py
|
||||
@@ -77,7 +77,7 @@ class Image(SageObject):
|
||||
|
||||
- ``size`` -- 2-tuple, containing (width, height) in pixels.
|
||||
|
||||
- - ``color`` -- string or tuple of numeric. What colour to use
|
||||
+ - ``color`` -- string, numeric or tuple of numeric. What colour to use
|
||||
for the image. Default is black. If given, this should be a
|
||||
a tuple with one value per band. When creating RGB images,
|
||||
you can also use colour strings as supported by the
|
||||
@@ -91,9 +91,15 @@ class Image(SageObject):
|
||||
EXAMPLES::
|
||||
|
||||
sage: from sage.repl.image import Image
|
||||
- sage: Image('P', (16, 16), (13,))
|
||||
+ sage: Image('P', (16, 16), 13)
|
||||
16x16px 8-bit Color image
|
||||
"""
|
||||
+ # pillow does not support Sage integers as color
|
||||
+ from sage.rings.integer import Integer
|
||||
+ if isinstance(color, Integer):
|
||||
+ color = int(color)
|
||||
+ elif isinstance(color, tuple):
|
||||
+ color = tuple(int(i) if isinstance(i, Integer) else i for i in color)
|
||||
self._pil = PIL.Image.new(mode, size, color)
|
||||
|
||||
@property
|
||||
@@ -233,7 +239,7 @@ class Image(SageObject):
|
||||
EXAMPLES::
|
||||
|
||||
sage: from sage.repl.image import Image
|
||||
- sage: img = Image('P', (12, 34), (13,))
|
||||
+ sage: img = Image('P', (12, 34), 13)
|
||||
sage: filename = tmp_filename(ext='.png')
|
||||
sage: img.save(filename)
|
||||
sage: with open(filename, 'rb') as f:
|
|
@ -1,28 +0,0 @@
|
|||
diff --git a/src/sage/all.py b/src/sage/all.py
|
||||
index ca309ef..be3186b 100644
|
||||
--- a/src/sage/all.py
|
||||
+++ b/src/sage/all.py
|
||||
@@ -298,6 +298,23 @@ warnings.filterwarnings('ignore', module='matplotlib[.]font_manager')
|
||||
warnings.filterwarnings('default',
|
||||
'[\s\S]*See http://trac.sagemath.org/[0-9]* for details.')
|
||||
|
||||
+# Hotpatch around https://bugs.python.org/issue5755 which won't be fixed for
|
||||
+# python 2.7. Idea by https://stackoverflow.com/a/36293331.
|
||||
+from distutils.command.build_ext import build_ext
|
||||
+from distutils.sysconfig import customize_compiler
|
||||
+
|
||||
+_build_extensions = build_ext.build_extensions
|
||||
+
|
||||
+def build_extensions_patched(self):
|
||||
+ customize_compiler(self.compiler)
|
||||
+ try:
|
||||
+ self.compiler.compiler_so.remove("-Wstrict-prototypes")
|
||||
+ except (AttributeError, ValueError):
|
||||
+ pass
|
||||
+ _build_extensions(self)
|
||||
+
|
||||
+build_ext.build_extensions = build_extensions_patched
|
||||
+
|
||||
|
||||
# Set a new random number seed as the very last thing
|
||||
# (so that printing initial_seed() and using that seed
|
|
@ -0,0 +1,36 @@
|
|||
diff --git a/src/sage/doctest/forker.py b/src/sage/doctest/forker.py
|
||||
index cb3667659e..867f547d71 100644
|
||||
--- a/src/sage/doctest/forker.py
|
||||
+++ b/src/sage/doctest/forker.py
|
||||
@@ -200,6 +200,15 @@ def init_sage(controller=None):
|
||||
from sage.cpython._py2_random import Random
|
||||
sage.misc.randstate.DEFAULT_PYTHON_RANDOM = Random
|
||||
|
||||
+ # IPython's pretty printer sorts the repr of dicts by their keys by default
|
||||
+ # (or their keys' str() if they are not otherwise orderable). However, it
|
||||
+ # disables this for CPython 3.6+ opting to instead display dicts' "natural"
|
||||
+ # insertion order, which is preserved in those versions).
|
||||
+ # However, this order is random in some instances.
|
||||
+ # Also modifications of code may affect the order.
|
||||
+ # So here we fore sorted dict printing.
|
||||
+ IPython.lib.pretty.for_type(dict, _sorted_dict_pprinter_factory('{', '}'))
|
||||
+
|
||||
if controller is None:
|
||||
import sage.repl.ipython_kernel.all_jupyter
|
||||
else:
|
||||
@@ -222,15 +231,6 @@ def init_sage(controller=None):
|
||||
from sage.repl.rich_output.backend_doctest import BackendDoctest
|
||||
dm.switch_backend(BackendDoctest())
|
||||
|
||||
- # IPython's pretty printer sorts the repr of dicts by their keys by default
|
||||
- # (or their keys' str() if they are not otherwise orderable). However, it
|
||||
- # disables this for CPython 3.6+ opting to instead display dicts' "natural"
|
||||
- # insertion order, which is preserved in those versions).
|
||||
- # However, this order is random in some instances.
|
||||
- # Also modifications of code may affect the order.
|
||||
- # So here we fore sorted dict printing.
|
||||
- IPython.lib.pretty.for_type(dict, _sorted_dict_pprinter_factory('{', '}'))
|
||||
-
|
||||
# Switch on extra debugging
|
||||
from sage.structure.debug_options import debug
|
||||
debug.refine_category_hash_check = True
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/sagenb/__init__.py b/sagenb/__init__.py
|
||||
index 4db0d2cb..2fc5f01e 100644
|
||||
--- a/sagenb/__init__.py
|
||||
+++ b/sagenb/__init__.py
|
||||
@@ -1,3 +1,8 @@
|
||||
# -*- coding: utf-8 -*
|
||||
# init
|
||||
+import warnings
|
||||
from . import storage
|
||||
+
|
||||
+# deprecation in attrs, needs to be fixed in twisted
|
||||
+warnings.filterwarnings('ignore', category=DeprecationWarning,
|
||||
+ message=r'The usage of `cmp` is deprecated and will be removed.*')
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/src/sage/interfaces/sagespawn.pyx b/src/sage/interfaces/sagespawn.pyx
|
||||
index 9041238f1d..469befbc66 100644
|
||||
--- a/src/sage/interfaces/sagespawn.pyx
|
||||
+++ b/src/sage/interfaces/sagespawn.pyx
|
||||
@@ -228,7 +228,7 @@ class SagePtyProcess(PtyProcess):
|
||||
Check that the process eventually dies after calling
|
||||
``terminate_async``::
|
||||
|
||||
- sage: s.ptyproc.terminate_async(interval=0.2)
|
||||
+ sage: s.ptyproc.terminate_async(interval=float(0.2))
|
||||
sage: while True:
|
||||
....: try:
|
||||
....: os.kill(s.pid, 0)
|
|
@ -36,7 +36,7 @@ index 73a078e619..059125c59f 100644
|
|||
# Run Sphinx with Sage's special logger
|
||||
- sys.argv = ["sphinx-build"] + build_command.split()
|
||||
- from .sphinxbuild import runsphinx
|
||||
+ args = "python -um sage_setup.docbuild.sphinxbuild -N".split() + build_command.split()
|
||||
+ args = "python3 -um sage_setup.docbuild.sphinxbuild -N".split() + build_command.split()
|
||||
try:
|
||||
- runsphinx()
|
||||
+ subprocess.check_call(args)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git a/src/sage/lfunctions/sympow.py b/src/sage/lfunctions/sympow.py
|
||||
index 1640ac4f6a..03578be7b8 100644
|
||||
index 92cb01fd73..b123e6accc 100644
|
||||
--- a/src/sage/lfunctions/sympow.py
|
||||
+++ b/src/sage/lfunctions/sympow.py
|
||||
@@ -50,6 +50,7 @@ from __future__ import print_function, absolute_import
|
||||
|
@ -8,14 +8,14 @@ index 1640ac4f6a..03578be7b8 100644
|
|||
|
||||
+from sage.env import DOT_SAGE
|
||||
from sage.structure.sage_object import SageObject
|
||||
from sage.misc.all import pager, verbose
|
||||
import sage.rings.all
|
||||
@@ -76,7 +77,7 @@ class Sympow(SageObject):
|
||||
from sage.misc.all import pager
|
||||
from sage.misc.verbose import verbose
|
||||
@@ -78,7 +79,7 @@ class Sympow(SageObject):
|
||||
"""
|
||||
Used to call sympow with given args
|
||||
"""
|
||||
- cmd = 'sympow %s'%args
|
||||
- cmd = 'sympow %s' % args
|
||||
+ cmd = 'env SYMPOW_CACHEDIR="%s/sympow///" sympow %s' % (DOT_SAGE, args)
|
||||
v = os.popen(cmd).read().strip()
|
||||
with os.popen(cmd) as f:
|
||||
v = f.read().strip()
|
||||
verbose(v, level=2)
|
||||
return v
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, buildPythonPackage
|
||||
, brial
|
||||
}:
|
||||
# This has a cyclic dependency with sage. I don't include sage in the
|
||||
# buildInputs and let python figure it out at runtime. Because of this,
|
||||
# I don't include the package in the main nipxkgs tree. It wouldn't be useful
|
||||
# outside of sage anyways (as you could just directly depend on sage and use
|
||||
# it).
|
||||
buildPythonPackage rec {
|
||||
pname = "pyBRiAl";
|
||||
version = brial.version;
|
||||
|
||||
# included with BRiAl source
|
||||
src = brial.src;
|
||||
|
||||
sourceRoot = "source/sage-brial";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "python implementation of BRiAl";
|
||||
license = licenses.gpl2;
|
||||
maintainers = teams.sage.members;
|
||||
};
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
{ stdenv
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, isPy3k
|
||||
, django
|
||||
, nose
|
||||
, twill
|
||||
, pycrypto
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "python-openid";
|
||||
version = "2.2.5";
|
||||
|
||||
disabled = isPy3k;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
pycrypto
|
||||
];
|
||||
|
||||
# Cannot access the djopenid example module.
|
||||
# I don't know how to fix that (adding the examples dir to PYTHONPATH doesn't work)
|
||||
doCheck = false;
|
||||
checkInputs = [ nose django twill ];
|
||||
checkPhase = ''
|
||||
nosetests
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "OpenID library for Python";
|
||||
license = licenses.asl20;
|
||||
maintainers = teams.sage.members;
|
||||
homepage = "https://github.com/openid/python-openid/";
|
||||
};
|
||||
}
|
|
@ -1,7 +1,6 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, writeTextFile
|
||||
, python
|
||||
, sagelib
|
||||
, env-locations
|
||||
, gfortran
|
||||
|
@ -67,11 +66,6 @@ let
|
|||
"@sage-local@"
|
||||
"@sage-local@/build"
|
||||
pythonEnv
|
||||
# empty python env to add python wrapper that clears PYTHONHOME (see
|
||||
# wrapper.nix). This is necessary because sage will call the python3 binary
|
||||
# (from python2 code). The python2 PYTHONHOME (again set in wrapper.nix)
|
||||
# will then confuse python3, if it is not overwritten.
|
||||
python3.buildEnv
|
||||
gfortran # for inline fortran
|
||||
stdenv.cc # for cython
|
||||
bash
|
||||
|
@ -129,8 +123,21 @@ writeTextFile rec {
|
|||
]
|
||||
}'
|
||||
export SAGE_ROOT='${sagelib.src}'
|
||||
export SAGE_LOCAL='@sage-local@'
|
||||
'' +
|
||||
# TODO: is using pythonEnv instead of @sage-local@ here a good
|
||||
# idea? there is a test in src/sage/env.py that checks if the values
|
||||
# SAGE_ROOT and SAGE_LOCAL set here match the ones set in env.py.
|
||||
# we fix up env.py's SAGE_ROOT in sage-src.nix (which does not
|
||||
# have access to sage-with-env), but env.py autodetects
|
||||
# SAGE_LOCAL to be pythonEnv.
|
||||
# setting SAGE_LOCAL to pythonEnv also avoids having to create
|
||||
# python3, ipython, ipython3 and jupyter symlinks in
|
||||
# sage-with-env.nix.
|
||||
''
|
||||
export SAGE_LOCAL='${pythonEnv}'
|
||||
|
||||
export SAGE_SHARE='${sagelib}/share'
|
||||
export SAGE_ENV_CONFIG_SOURCED=1 # sage-env complains if sage-env-config is not sourced beforehand
|
||||
orig_path="$PATH"
|
||||
export PATH='${runtimepath}'
|
||||
|
||||
|
@ -177,9 +184,9 @@ writeTextFile rec {
|
|||
])
|
||||
}'
|
||||
|
||||
export SAGE_LIB='${sagelib}/${python.sitePackages}'
|
||||
export SAGE_LIB='${sagelib}/${python3.sitePackages}'
|
||||
|
||||
export SAGE_EXTCODE='${sagelib.src}/src/ext'
|
||||
export SAGE_EXTCODE='${sagelib.src}/src/sage/ext_data'
|
||||
|
||||
# for find_library
|
||||
export DYLD_LIBRARY_PATH="${lib.makeLibraryPath [stdenv.cc.libc singular]}''${DYLD_LIBRARY_PATH:+:}$DYLD_LIBRARY_PATH"
|
||||
|
|
|
@ -10,44 +10,23 @@
|
|||
# all get the same sources with the same patches applied.
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "8.9";
|
||||
version = "9.2";
|
||||
pname = "sage-src";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sagemath";
|
||||
repo = "sage";
|
||||
rev = version;
|
||||
sha256 = "1bwga58x3s8z42w5h51c232f91ndsc1861dlb1glhax3pn0rhn3a";
|
||||
sha256 = "103j8d5x6szl9fxaz0dvdi4y47q1af9h9y5hmjh2xayi62qmp5ql";
|
||||
};
|
||||
|
||||
# Patches needed because of particularities of nix or the way this is packaged.
|
||||
# The goal is to upstream all of them and get rid of this list.
|
||||
nixPatches = [
|
||||
# https://trac.sagemath.org/ticket/25358
|
||||
(fetchpatch {
|
||||
name = "safe-directory-test-without-patch.patch";
|
||||
url = "https://git.sagemath.org/sage.git/patch?id2=8bdc326ba57d1bb9664f63cf165a9e9920cc1afc&id=dc673c17555efca611f68398d5013b66e9825463";
|
||||
sha256 = "1hhannz7xzprijakn2w2d0rhd5zv2zikik9p51i87bas3nc658f7";
|
||||
})
|
||||
|
||||
# `is_unitary` test in `matrix_double_dense.pyx` fails with some BLAS implementations
|
||||
# https://trac.sagemath.org/ticket/29297 should be included in 9.1
|
||||
(fetchpatch {
|
||||
name = "is_unitary-special-case.patch";
|
||||
url = "https://git.sagemath.org/sage.git/patch?id=cc3eb9ffa991e328b09028d32aab7e7cc2ddbb6a";
|
||||
sha256 = "0jq4w8hnp5c9q99011ldr4n3knvm1rx2g85z0hidv3i9x868p0ay";
|
||||
})
|
||||
|
||||
# Unfortunately inclusion in upstream sage was rejected. Instead the bug was
|
||||
# fixed in python, but of course not backported to 2.7. So we'll probably
|
||||
# have to keep this around until 2.7 is deprecated.
|
||||
# https://trac.sagemath.org/ticket/25316
|
||||
# https://github.com/python/cpython/pull/7476
|
||||
./patches/python-5755-hotpatch.patch
|
||||
|
||||
# Make sure py2/py3 tests are only run when their expected context (all "sage"
|
||||
# tests) are also run. That is necessary to test dochtml individually. See
|
||||
# https://trac.sagemath.org/ticket/26110 for an upstream discussion.
|
||||
# TODO: Determine if it is still necessary.
|
||||
./patches/Only-test-py2-py3-optional-tests-when-all-of-sage-is.patch
|
||||
|
||||
# Fixes a potential race condition which can lead to transient doctest failures.
|
||||
|
@ -61,10 +40,17 @@ stdenv.mkDerivation rec {
|
|||
# https://groups.google.com/forum/#!topic/sage-packaging/YGOm8tkADrE
|
||||
./patches/sphinx-docbuild-subprocesses.patch
|
||||
|
||||
# Fix doctest failures with docutils 0.15:
|
||||
# https://nix-cache.s3.amazonaws.com/log/dzmzrb2zvardsmpy7idg7djkizmkzdhs-sage-tests-8.9.drv
|
||||
# https://trac.sagemath.org/ticket/28856#comment:19
|
||||
./patches/docutils-0.15.patch
|
||||
# Sage's workaround to pretty print dicts (in
|
||||
# src/sage/doctest/forker.py:init_sage) runs too late (after
|
||||
# controller.load_environment(), which imports sage.all.*) to to
|
||||
# affect sage.sandpiles.Sandpile{Config,Divisor}'s pretty printer.
|
||||
# Due to the sandpiles module being lazily loaded, this only
|
||||
# affects the first run (subsequent runs read from an import cache
|
||||
# at ~/.sage/cache and are not affected), which is probably why
|
||||
# other distributions don't hit this bug. This breaks two sandpile
|
||||
# tests, so do the workaround a little bit earlier.
|
||||
# https://trac.sagemath.org/ticket/31053
|
||||
./patches/register-pretty-printer-earlier.patch
|
||||
];
|
||||
|
||||
# Since sage unfortunately does not release bugfix releases, packagers must
|
||||
|
@ -74,6 +60,17 @@ stdenv.mkDerivation rec {
|
|||
# To help debug the transient error in
|
||||
# https://trac.sagemath.org/ticket/23087 when it next occurs.
|
||||
./patches/configurationpy-error-verbose.patch
|
||||
|
||||
# fix intermittent errors in Sage 9.2's psage.py (this patch is
|
||||
# already included in Sage 9.3): https://trac.sagemath.org/ticket/30730
|
||||
(fetchpatch {
|
||||
name = "fix-psage-is-locked.patch";
|
||||
url = "https://git.sagemath.org/sage.git/patch/?id=75df605f216ddc7b6ca719be942d666b241520e9";
|
||||
sha256 = "0g9pl1wbb3sgs26d3bvv70cpa77sfskylv4kd255y1794f1fgk4q";
|
||||
})
|
||||
|
||||
# fix intermittent errors in sagespawn.pyx: https://trac.sagemath.org/ticket/31052
|
||||
./patches/sagespawn-implicit-casting.patch
|
||||
];
|
||||
|
||||
# Patches needed because of package updates. We could just pin the versions of
|
||||
|
@ -96,55 +93,16 @@ stdenv.mkDerivation rec {
|
|||
} // builtins.removeAttrs args [ "rev" "base" ])
|
||||
);
|
||||
in [
|
||||
# New glpk version has new warnings, filter those out until upstream sage has found a solution
|
||||
# Should be fixed with glpk > 4.65.
|
||||
# https://trac.sagemath.org/ticket/24824
|
||||
./patches/pari-stackwarn.patch # not actually necessary since the pari upgrade, but necessary for the glpk patch to apply
|
||||
(fetchpatch {
|
||||
url = "https://salsa.debian.org/science-team/sagemath/raw/58bbba93a807ca2933ca317501d093a1bb4b84db/debian/patches/dt-version-glpk-4.65-ignore-warnings.patch";
|
||||
sha256 = "0b9293v73wb4x13wv5zwyjgclc01zn16msccfzzi6znswklgvddp";
|
||||
stripLen = 1;
|
||||
})
|
||||
|
||||
# After updating smypow to (https://trac.sagemath.org/ticket/3360) we can
|
||||
# now set the cache dir to be withing the .sage directory. This is not
|
||||
# strictly necessary, but keeps us from littering in the user's HOME.
|
||||
./patches/sympow-cache.patch
|
||||
|
||||
# https://trac.sagemath.org/ticket/28472
|
||||
(fetchpatch {
|
||||
name = "eclib-20190909.patch";
|
||||
url = "https://git.sagemath.org/sage.git/patch?id=d27dc479a5772d59e4bc85d805b6ffd595284f1d";
|
||||
sha256 = "1nf1s9y7n30lhlbdnam7sghgaq9nasmv96415gl5jlcf7a3hlxk3";
|
||||
})
|
||||
|
||||
# ignore a deprecation warning for usage of `cmp` in the attrs library in the doctests
|
||||
./patches/ignore-cmp-deprecation.patch
|
||||
|
||||
# Werkzeug has deprecated ImmutableDict, but it is still used in legacy
|
||||
# sagenb. That's no big issue since sagenb will be removed soon anyways.
|
||||
./patches/ignore-werkzeug-immutable-dict-deprecation.patch
|
||||
|
||||
# threejs r109 (#28560)
|
||||
(fetchpatch {
|
||||
name = "threejs-r109.patch";
|
||||
url = "https://git.sagemath.org/sage.git/patch?id=fcc11d6effa39f375bc5f4ea5831fb7a2f2767da";
|
||||
sha256 = "0hnmc8ld3bblks0hcjvjjaydkgwdr1cs3dbl2ys4gfq964pjgqwc";
|
||||
})
|
||||
|
||||
# https://trac.sagemath.org/ticket/28911
|
||||
(fetchpatch {
|
||||
name = "sympy-1.5.patch";
|
||||
url = "https://git.sagemath.org/sage.git/patch/?h=c6d0308db15efd611211d26cfcbefbd180fc0831";
|
||||
sha256 = "0nwai2jr22h49km4hx3kwafs3mzsc5kwsv7mqwjf6ibwfx2bbgyq";
|
||||
})
|
||||
|
||||
# https://trac.sagemath.org/ticket/29313 (patch from ArchLinux)
|
||||
(fetchpatch {
|
||||
name = "pari-2.11.3.patch";
|
||||
url = "https://aur.archlinux.org/cgit/aur.git/plain/sagemath-pari-2.11.3.patch?h=sagemath-git&id=02e1d58bd1cd70935d69a4990469d18be6bd2c43";
|
||||
sha256 = "0z07444zvijyw96d11q7j81pvg7ysd6ycf1bbbjr6za9y74hv7d2";
|
||||
})
|
||||
# adapt sage's Image class to pillow 8.0.1 (https://trac.sagemath.org/ticket/30971)
|
||||
./patches/pillow-update.patch
|
||||
];
|
||||
|
||||
patches = nixPatches ++ bugfixPatches ++ packageUpgradePatches;
|
||||
|
@ -152,16 +110,16 @@ stdenv.mkDerivation rec {
|
|||
postPatch = ''
|
||||
# make sure shebangs etc are fixed, but sage-python23 still works
|
||||
find . -type f -exec sed \
|
||||
-e 's/sage-python23/python/g' \
|
||||
-e 's/sage-python23/python3/g' \
|
||||
-i {} \;
|
||||
|
||||
echo '#!${runtimeShell}
|
||||
python "$@"' > build/bin/sage-python23
|
||||
python3 "$@"' > build/bin/sage-python23
|
||||
|
||||
# Make sure sage can at least be imported without setting any environment
|
||||
# variables. It won't be close to feature complete though.
|
||||
sed -i \
|
||||
"s|var('SAGE_LOCAL',.*|var('SAGE_LOCAL', '$out/src')|" \
|
||||
"s|var('SAGE_ROOT'.*|var('SAGE_ROOT', '$out')|" \
|
||||
src/sage/env.py
|
||||
|
||||
# Do not use sage-env-config (generated by ./configure).
|
||||
|
@ -169,7 +127,39 @@ stdenv.mkDerivation rec {
|
|||
echo '# do nothing' > src/bin/sage-env-config
|
||||
'';
|
||||
|
||||
configurePhase = "# do nothing";
|
||||
# Test src/doc/en/reference/spkg/conf.py will fail if
|
||||
# src/doc/en/reference/spkg/index.rst is not generated. It is
|
||||
# generated by src/doc/bootstrap, so I've copied the relevant part
|
||||
# here. An alternative would be to create an empty
|
||||
# src/doc/en/reference/spkg/index.rst file.
|
||||
configurePhase = ''
|
||||
OUTPUT_DIR="src/doc/en/reference/spkg"
|
||||
mkdir -p "$OUTPUT_DIR"
|
||||
OUTPUT_INDEX="$OUTPUT_DIR"/index.rst
|
||||
cat > "$OUTPUT_INDEX" <<EOF
|
||||
|
||||
External Packages
|
||||
=================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
EOF
|
||||
for PKG_SCRIPTS in build/pkgs/*; do
|
||||
if [ -d "$PKG_SCRIPTS" ]; then
|
||||
PKG_BASE=$(basename "$PKG_SCRIPTS")
|
||||
if [ -f "$PKG_SCRIPTS"/SPKG.rst ]; then
|
||||
# Instead of just copying, we may want to call
|
||||
# a version of sage-spkg-info to format extra information.
|
||||
cp "$PKG_SCRIPTS"/SPKG.rst "$OUTPUT_DIR"/$PKG_BASE.rst
|
||||
echo >> "$OUTPUT_INDEX" " $PKG_BASE"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
cat >> "$OUTPUT_INDEX" <<EOF
|
||||
.. include:: ../footer.txt
|
||||
EOF
|
||||
'';
|
||||
|
||||
buildPhase = "# do nothing";
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
, pari
|
||||
, gmp
|
||||
, gfan
|
||||
, python2
|
||||
, python3
|
||||
, flintqs
|
||||
, eclib
|
||||
, ntl
|
||||
|
@ -50,11 +50,11 @@ let
|
|||
];
|
||||
|
||||
# remove python prefix, replace "-" in the name by "_", apply patch_names
|
||||
# python2.7-some-pkg-1.0 -> some_pkg-1.0
|
||||
# python3.8-some-pkg-1.0 -> some_pkg-1.0
|
||||
pkg_to_spkg_name = pkg: patch_names: let
|
||||
parts = lib.splitString "-" pkg.name;
|
||||
# remove python2.7-
|
||||
stripped_parts = if (builtins.head parts) == python2.libPrefix then builtins.tail parts else parts;
|
||||
# remove python3.8-
|
||||
stripped_parts = if (builtins.head parts) == python3.libPrefix then builtins.tail parts else parts;
|
||||
version = lib.last stripped_parts;
|
||||
orig_pkgname = lib.init stripped_parts;
|
||||
pkgname = patch_names (lib.concatStringsSep "_" orig_pkgname);
|
||||
|
|
|
@ -61,7 +61,6 @@ stdenv.mkDerivation rec {
|
|||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
broken = true;
|
||||
description = "Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab";
|
||||
license = licenses.gpl2;
|
||||
maintainers = teams.sage.members;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ stdenv
|
||||
, sage-with-env
|
||||
, python
|
||||
, python3
|
||||
, maxima-ecl
|
||||
, tachyon
|
||||
, jmol
|
||||
|
@ -17,16 +17,15 @@ stdenv.mkDerivation rec {
|
|||
# modules are imported and because matplotlib is used to produce plots.
|
||||
buildInputs = [
|
||||
sage-with-env.env.lib
|
||||
python
|
||||
python3
|
||||
maxima-ecl
|
||||
tachyon
|
||||
jmol
|
||||
cddlib
|
||||
] ++ (with python.pkgs; [
|
||||
] ++ (with python3.pkgs; [
|
||||
psutil
|
||||
future
|
||||
sphinx
|
||||
sagenb
|
||||
scipy
|
||||
sympy
|
||||
matplotlib
|
||||
|
@ -35,8 +34,6 @@ stdenv.mkDerivation rec {
|
|||
ipykernel
|
||||
ipywidgets
|
||||
jupyter_client
|
||||
typing
|
||||
pybrial
|
||||
]);
|
||||
|
||||
unpackPhase = ''
|
||||
|
@ -47,13 +44,26 @@ stdenv.mkDerivation rec {
|
|||
chmod -R 755 "$SAGE_DOC_SRC_OVERRIDE"
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
# src/doc/bootstrap generates installation instructions for
|
||||
# arch, debian, fedora, cygwin and homebrew. as a hack, disable
|
||||
# including the generated files.
|
||||
sed -i "/literalinclude/d" $SAGE_DOC_SRC_OVERRIDE/en/installation/source.rst
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
export SAGE_NUM_THREADS="$NIX_BUILD_CORES"
|
||||
export HOME="$TMPDIR/sage_home"
|
||||
mkdir -p "$HOME"
|
||||
|
||||
# needed to link them in the sage docs using intersphinx
|
||||
export PPLPY_DOCS=${python.pkgs.pplpy.doc}/share/doc/pplpy
|
||||
export PPLPY_DOCS=${python3.pkgs.pplpy.doc}/share/doc/pplpy
|
||||
|
||||
# adapted from src/doc/bootstrap
|
||||
OUTPUT_DIR="$SAGE_DOC_SRC_OVERRIDE/en/reference/repl"
|
||||
mkdir -p "$OUTPUT_DIR"
|
||||
OUTPUT="$OUTPUT_DIR/options.txt"
|
||||
${sage-with-env}/bin/sage -advanced > "$OUTPUT"
|
||||
|
||||
${sage-with-env}/bin/sage -python -m sage_setup.docbuild \
|
||||
--mathjax \
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
, ecm
|
||||
, flint
|
||||
, gd
|
||||
, giac
|
||||
, givaro
|
||||
, glpk
|
||||
, gsl
|
||||
|
@ -51,6 +52,7 @@
|
|||
, libbraiding
|
||||
, gmpy2
|
||||
, pplpy
|
||||
, sqlite
|
||||
}:
|
||||
|
||||
assert (!blas.isILP64) && (!lapack.isILP64);
|
||||
|
@ -94,6 +96,7 @@ buildPythonPackage rec {
|
|||
ecm
|
||||
fflas-ffpack
|
||||
flint
|
||||
giac
|
||||
givaro
|
||||
glpk
|
||||
gsl
|
||||
|
@ -124,6 +127,7 @@ buildPythonPackage rec {
|
|||
libbraiding
|
||||
gmpy2
|
||||
pplpy
|
||||
sqlite
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
|
|
|
@ -1,57 +0,0 @@
|
|||
{ stdenv
|
||||
, python
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, mathjax
|
||||
, twisted
|
||||
, flask
|
||||
, flask-oldsessions
|
||||
, flask-openid
|
||||
, flask-autoindex
|
||||
, flask-babel
|
||||
}:
|
||||
|
||||
# Has a cyclic dependency with sage (not expressed here) and is not useful outside of sage.
|
||||
# Deprecated, hopefully soon to be removed. See
|
||||
# https://trac.sagemath.org/ticket/25837
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "sagenb";
|
||||
version = "1.1.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sagemath";
|
||||
repo = "sagenb";
|
||||
rev = version;
|
||||
sha256 = "0bxvhr03qh2nsjdfc4pyfiqrn9jhp3vf7irsc9gqx0185jlblbxs";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# cmp deprecation in attrs needs to be handled in twisted
|
||||
./patches/sagenb-cmp-deprecation.patch
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
twisted
|
||||
flask
|
||||
flask-oldsessions
|
||||
flask-openid
|
||||
flask-autoindex
|
||||
flask-babel
|
||||
];
|
||||
|
||||
# tests depend on sage
|
||||
doCheck = false;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Sage Notebook";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = teams.sage.members;
|
||||
};
|
||||
|
||||
# let sagenb use mathjax
|
||||
postInstall = ''
|
||||
mkdir -p "$out/${python.sitePackages}/sagenb/data"
|
||||
ln -s ${mathjax}/lib/node_modules/mathjax "$out/${python.sitePackages}/sagenb/data/mathjax"
|
||||
'';
|
||||
}
|
|
@ -18,14 +18,14 @@ in
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "simgrid";
|
||||
version = "3.25";
|
||||
version = "3.26";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "framagit.org";
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "019fgryfwpcrkv1f3271v7qxk0mfw2w990vgnk1cqhmr9i1f17gs";
|
||||
sha256 = "0kwiggdjqjhjvmwb1m7hb9clvm3xz948fy5ia67dif2pakwad754";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake perl python3 boost valgrind ]
|
||||
|
|
|
@ -36,6 +36,38 @@ stdenv.mkDerivation {
|
|||
};
|
||||
|
||||
patches = [
|
||||
# https://trac.sagemath.org/ticket/22191#comment:237
|
||||
(fetchurl {
|
||||
name = "ECL_WITH_LISP_FPE.patch";
|
||||
url = "https://git.sagemath.org/sage.git/plain/build/pkgs/ecl/patches/ECL_WITH_LISP_FPE.patch?h=9.2";
|
||||
sha256 = "0b194613avcmzr1k9gq725z41wdkg5rsa0q21kdw050iqpprcj1c";
|
||||
})
|
||||
|
||||
# https://gitlab.com/embeddable-common-lisp/ecl/-/merge_requests/1
|
||||
(fetchurl {
|
||||
name = "write_error.patch";
|
||||
url = "https://git.sagemath.org/sage.git/plain/build/pkgs/ecl/patches/write_error.patch?h=9.2";
|
||||
sha256 = "1lvdvh77blnxp0zbd27dsbq1ljkb5qblabf1illszn4j7qgq88fh";
|
||||
})
|
||||
|
||||
# Three patches to fix ecl's unicode handling (https://trac.sagemath.org/ticket/30122)
|
||||
(fetchurl {
|
||||
name = "0001-unicode-fix-ecl_string_case-for-non-ascii-characters.patch";
|
||||
url = "https://git.sagemath.org/sage.git/plain/build/pkgs/ecl/patches/0001-unicode-fix-ecl_string_case-for-non-ascii-characters.patch?h=9.2";
|
||||
sha256 = "0z8pnhawivrrbg4vz144nr2sz64jxp7764hn6df13bgkz84iqbmk";
|
||||
})
|
||||
|
||||
(fetchurl {
|
||||
name = "0002-cosmetic-fix-some-compiler-warnings.patch";
|
||||
url = "https://git.sagemath.org/sage.git/plain/build/pkgs/ecl/patches/0002-cosmetic-fix-some-compiler-warnings.patch?h=9.2";
|
||||
sha256 = "0msx3say9igwr9z5ywnr3gs6vsndnzlx47fmzwzh4l0m274cnia8";
|
||||
})
|
||||
|
||||
(fetchurl {
|
||||
name = "0003-printer-fix-printing-of-symbols-with-non-ascii-names.patch";
|
||||
url = "https://git.sagemath.org/sage.git/plain/build/pkgs/ecl/patches/0003-printer-fix-printing-of-symbols-with-non-ascii-names.patch?h=9.2";
|
||||
sha256 = "0ln5dsx6p265fkph3bl5wblgfi3f7frb4jl6v473wz3ibvcx1x9a";
|
||||
})
|
||||
];
|
||||
|
||||
configureFlags = [
|
||||
|
|
|
@ -12,8 +12,8 @@ stdenv.mkDerivation {
|
|||
};
|
||||
|
||||
patches = [(fetchpatch {
|
||||
name = "ppl.patch";
|
||||
url = "http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=patch;h=c39f6a07b51f89e365b05ba4147aa2aa448febd7";
|
||||
name = "clang5-support.patch";
|
||||
url = "https://git.sagemath.org/sage.git/plain/build/pkgs/ppl/patches/clang5-support.patch?h=9.2";
|
||||
sha256 = "1zj90hm25pkgvk4jlkfzh18ak9b98217gbidl3731fdccbw6hr87";
|
||||
})];
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
, stdlib-shims
|
||||
, ppx_yojson_conv_lib
|
||||
, ocaml-syntax-shims
|
||||
, yojson
|
||||
, result
|
||||
, omd
|
||||
, octavius
|
||||
, dune-build-info
|
||||
|
@ -12,10 +14,10 @@
|
|||
, lib
|
||||
}:
|
||||
let
|
||||
version = "1.1.0";
|
||||
version = "1.4.0";
|
||||
src = fetchzip {
|
||||
url = "https://github.com/ocaml/ocaml-lsp/releases/download/${version}/ocaml-lsp-server-${version}.tbz";
|
||||
sha256 = "0al89waw43jl80k9z06kh44byhjhwb5hmzx07sddwi1kr1vc6jrb";
|
||||
url = "https://github.com/ocaml/ocaml-lsp/releases/download/${version}/jsonrpc-${version}.tbz";
|
||||
sha256 = "16vvwq3d9xmr91r6yv5i2gyqcdliji7asyq4g6iygi617233fa33";
|
||||
};
|
||||
|
||||
# unvendor some (not all) dependencies.
|
||||
|
@ -23,7 +25,7 @@ let
|
|||
# ocaml-lsp without messing with your opam switch, but nix should prevent
|
||||
# this type of problems without resorting to vendoring.
|
||||
preBuild = ''
|
||||
rm -r vendor/{octavius,uutf,ocaml-syntax-shims,omd,cmdliner}
|
||||
rm -r ocaml-lsp-server/vendor/{octavius,uutf,ocaml-syntax-shims,omd,cmdliner}
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
|
@ -36,6 +38,7 @@ let
|
|||
dune-build-info
|
||||
omd
|
||||
cmdliner
|
||||
jsonrpc
|
||||
];
|
||||
|
||||
lsp = buildDunePackage {
|
||||
|
@ -47,6 +50,15 @@ let
|
|||
inherit buildInputs preBuild;
|
||||
};
|
||||
|
||||
jsonrpc = buildDunePackage {
|
||||
pname = "jsonrpc";
|
||||
inherit version src;
|
||||
useDune2 = true;
|
||||
minimumOCamlVersion = "4.06";
|
||||
|
||||
buildInputs = [ yojson stdlib-shims ocaml-syntax-shims ppx_yojson_conv_lib result ];
|
||||
};
|
||||
|
||||
in
|
||||
buildDunePackage {
|
||||
pname = "ocaml-lsp-server";
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
buildPythonPackage rec {
|
||||
pname = "cypari2";
|
||||
# upgrade may break sage, please test the sage build or ping @timokau on upgrade
|
||||
version = "2.1.2";
|
||||
version = "2.1.1";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "03cd45edab8716ebbfdb754e65fea72e873c73dc91aec098fe4a01e35324ac7a";
|
||||
sha256 = "df1ef62e771ec36e5a456f5fc8b51bc6745b70f0efdd0c7a30c3f0b5f1fb93db";
|
||||
};
|
||||
|
||||
# This differs slightly from the default python installPhase in that it pip-installs
|
||||
|
@ -26,7 +26,7 @@ buildPythonPackage rec {
|
|||
export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH"
|
||||
|
||||
# install "." instead of "*.whl"
|
||||
${python.pythonForBuild.pkgs.bootstrapped-pip}/bin/pip install --no-index --prefix=$out --no-cache --build=tmpdir .
|
||||
${python.pythonForBuild.pkgs.bootstrapped-pip}/bin/pip install . --no-index --no-warn-script-location --prefix="$out" --no-cache
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
let
|
||||
pname = "gmpy2";
|
||||
version = "2.1a4";
|
||||
version = "2.1.0b5";
|
||||
in
|
||||
|
||||
buildPythonPackage {
|
||||
|
@ -22,20 +22,9 @@ buildPythonPackage {
|
|||
owner = "aleaxit";
|
||||
repo = "gmpy";
|
||||
rev = "gmpy2-${version}";
|
||||
sha256 = "1wg4w4q2l7n26ksrdh4rwqmifgfm32n7x29cgdvmmbv5lmilb5hz";
|
||||
sha256 = "1mqzyp7qwqqyk6jbicgx22svdy2106xwhmhfvdf0vpnmwswcxclb";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Backport of two bugfixes (including a segfault):
|
||||
# https://github.com/aleaxit/gmpy/pull/217
|
||||
# https://github.com/aleaxit/gmpy/pull/218
|
||||
(fetchpatch {
|
||||
name = "bugfixes.patch";
|
||||
url = "https://git.sagemath.org/sage.git/plain/build/pkgs/gmpy2/patches/PR217_PR218_conversion_methods.patch?id=b7fbb9a4dac5d6882f6b83a57447dd79ecafb84c";
|
||||
sha256 = "1x3gwvqac36k4ypclxq37fcvi6p790k4xdpm2bj2b3xsvjb80ycz";
|
||||
})
|
||||
];
|
||||
|
||||
buildInputs = [ gmp mpfr libmpc ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
|
|
@ -41,8 +41,10 @@ let
|
|||
|
||||
builtGrammars = let
|
||||
change = name: grammar:
|
||||
callPackage ./library.nix {
|
||||
language = name; inherit version; source = fetchGrammar grammar;
|
||||
callPackage ./library.nix {} {
|
||||
language = name;
|
||||
inherit version;
|
||||
source = fetchGrammar grammar;
|
||||
};
|
||||
in
|
||||
# typescript doesn't have parser.c in the same place as others
|
||||
|
@ -60,10 +62,6 @@ in rustPlatform.buildRustPackage {
|
|||
# needed for the tests
|
||||
rm -rf test/fixtures/grammars
|
||||
ln -s ${grammars} test/fixtures/grammars
|
||||
|
||||
# These functions do not appear in the source code
|
||||
sed -i /_ts_query_context/d lib/binding_web/exports.json
|
||||
sed -i /___assert_fail/d lib/binding_web/exports.json
|
||||
'';
|
||||
|
||||
# Compile web assembly with emscripten. The --debug flag prevents us from
|
||||
|
|
|
@ -1,7 +1,15 @@
|
|||
{ stdenv
|
||||
, language
|
||||
, tree-sitter
|
||||
}:
|
||||
|
||||
# Build a parser grammar and put the resulting shared object in `$out/parser`
|
||||
|
||||
{
|
||||
# language name
|
||||
language
|
||||
# version of tree-sitter
|
||||
, version
|
||||
# source for the language grammar
|
||||
, source
|
||||
}:
|
||||
|
||||
|
|
25
pkgs/servers/icecream/default.nix
Normal file
25
pkgs/servers/icecream/default.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ stdenv, fetchFromGitHub, autoreconfHook, docbook2x, libarchive, libcap_ng, lzo, zstd, docbook_xml_dtd_45 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "icecream";
|
||||
version = "2020-04-15";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "icecc";
|
||||
repo = pname;
|
||||
rev = "c370c4d701d05e1872d44d1c1642a774a7f25807";
|
||||
sha256 = "0ld2ihd39irlk4wshpbw7inmgyl3x0gbkgsy10izcm1wwfc0x2ac";
|
||||
};
|
||||
enableParallelBuilding = true;
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook docbook2x ];
|
||||
buildInputs = [ libarchive libcap_ng lzo zstd docbook_xml_dtd_45 ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Distributed compiler with a central scheduler to share build load";
|
||||
inherit (src.meta) homepage;
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ emantor ];
|
||||
platforms = with platforms; linux ++ darwin;
|
||||
};
|
||||
}
|
|
@ -4777,6 +4777,8 @@ in
|
|||
|
||||
icecast = callPackage ../servers/icecast { };
|
||||
|
||||
icemon = libsForQt5.callPackage ../applications/networking/icemon { };
|
||||
|
||||
icepeak = haskell.lib.justStaticExecutables haskellPackages.icepeak;
|
||||
|
||||
iceshelf = callPackage ../tools/backup/iceshelf { };
|
||||
|
@ -17125,6 +17127,8 @@ in
|
|||
|
||||
hydron = callPackage ../servers/hydron { };
|
||||
|
||||
icecream = callPackage ../servers/icecream { };
|
||||
|
||||
icingaweb2 = callPackage ../servers/icingaweb2 { };
|
||||
icingaweb2Modules = {
|
||||
theme-april = callPackage ../servers/icingaweb2/theme-april { };
|
||||
|
@ -27323,7 +27327,7 @@ in
|
|||
ecl = null;
|
||||
};
|
||||
maxima-ecl = maxima.override {
|
||||
ecl = ecl_16_1_2;
|
||||
inherit ecl;
|
||||
ecl-fasl = true;
|
||||
sbcl = null;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue