diff options
Diffstat (limited to 'pkgs/applications/science')
9 files changed, 124 insertions, 13 deletions
diff --git a/pkgs/applications/science/chemistry/molden/default.nix b/pkgs/applications/science/chemistry/molden/default.nix index d5810860c10..87dae3b14d9 100644 --- a/pkgs/applications/science/chemistry/molden/default.nix +++ b/pkgs/applications/science/chemistry/molden/default.nix @@ -1,12 +1,12 @@ { stdenv, fetchurl, which, gfortran, libGLU, xorg } : stdenv.mkDerivation rec { - version = "6.1"; + version = "6.2"; pname = "molden"; src = fetchurl { url = "ftp://ftp.cmbi.ru.nl/pub/molgraph/molden/molden${version}.tar.gz"; - sha256 = "0swbjnqlkwhy8lvjkbx8yklqj4zfphwdg6s3haawxi3dd65ij539"; + sha256 = "01m5p7v5pz1fi77var50sp1bzlvdckwr6kn4wanvic2jmvgp9q5n"; }; nativeBuildInputs = [ which ]; diff --git a/pkgs/applications/science/math/calc/default.nix b/pkgs/applications/science/math/calc/default.nix index eb306439a0a..0d149eca3b6 100644 --- a/pkgs/applications/science/math/calc/default.nix +++ b/pkgs/applications/science/math/calc/default.nix @@ -15,7 +15,6 @@ stdenv.mkDerivation rec { patchPhase = '' substituteInPlace Makefile \ - --replace 'all: check_include' 'all:' \ --replace '-install_name ''${LIBDIR}/libcalc''${LIB_EXT_VERSION}' '-install_name ''${T}''${LIBDIR}/libcalc''${LIB_EXT_VERSION}' \ --replace '-install_name ''${LIBDIR}/libcustcalc''${LIB_EXT_VERSION}' '-install_name ''${T}''${LIBDIR}/libcustcalc''${LIB_EXT_VERSION}' ''; @@ -25,7 +24,7 @@ stdenv.mkDerivation rec { makeFlags = [ "T=$(out)" - "INCDIR=${lib.getDev stdenv.cc.libc}/include" + "INCDIR=" "BINDIR=/bin" "LIBDIR=/lib" "CALC_SHAREDIR=/share/calc" diff --git a/pkgs/applications/science/math/calculix/calculix.patch b/pkgs/applications/science/math/calculix/calculix.patch new file mode 100644 index 00000000000..311421f2ef5 --- /dev/null +++ b/pkgs/applications/science/math/calculix/calculix.patch @@ -0,0 +1,31 @@ +diff --git a/ccx_2.15/src/Makefile b/ccx_2.15/src/Makefile +index 9cab2fc..6e977b8 100755 +--- a/ccx_2.15/src/Makefile ++++ b/ccx_2.15/src/Makefile +@@ -1,6 +1,6 @@ + + CFLAGS = -Wall -O3 -I ../../../SPOOLES.2.2 -DARCH="Linux" -DSPOOLES -DARPACK -DMATRIXSTORAGE -DNETWORKOUT +-FFLAGS = -Wall -O3 ++FFLAGS = -Wall -O3 + + CC=cc + FC=gfortran +@@ -18,15 +18,10 @@ OCCXF = $(SCCXF:.f=.o) + OCCXC = $(SCCXC:.c=.o) + OCCXMAIN = $(SCCXMAIN:.c=.o) + +-DIR=../../../SPOOLES.2.2 ++LIBS = -lpthread -lm -lc -lspooles -larpack -lopenblas + +-LIBS = \ +- $(DIR)/spooles.a \ +- ../../../ARPACK/libarpack_INTEL.a \ +- -lpthread -lm -lc +- +-ccx_2.15: $(OCCXMAIN) ccx_2.15.a $(LIBS) +- ./date.pl; $(CC) $(CFLAGS) -c ccx_2.15.c; $(FC) -Wall -O3 -o $@ $(OCCXMAIN) ccx_2.15.a $(LIBS) ++ccx_2.15: $(OCCXMAIN) ccx_2.15.a ++ $(CC) $(CFLAGS) -c ccx_2.15.c; $(FC) -Wall -O3 -o $@ $(OCCXMAIN) ccx_2.15.a $(LIBS) + + ccx_2.15.a: $(OCCXF) $(OCCXC) + ar vr $@ $? diff --git a/pkgs/applications/science/math/calculix/default.nix b/pkgs/applications/science/math/calculix/default.nix new file mode 100644 index 00000000000..24d5f99ec32 --- /dev/null +++ b/pkgs/applications/science/math/calculix/default.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchurl, gfortran, arpack, spooles, openblas }: + +stdenv.mkDerivation rec { + pname = "calculix"; + version = "2.15"; + + src = fetchurl { + url = "http://www.dhondt.de/ccx_${version}.src.tar.bz2"; + sha256 = "0d4axfxgm3ag4p2vx9rjcky7c122k99a2nhv1jv53brm35rblzdw"; + }; + + nativeBuildInputs = [ gfortran ]; + + buildInputs = [ arpack spooles openblas ]; + + NIX_CFLAGS_COMPILE = [ + "-I${spooles}/include/spooles" + ]; + + patches = [ + ./calculix.patch + ]; + + postPatch = '' + cd ccx*/src + ''; + + installPhase = '' + install -Dm0755 ccx_${version} $out/bin/ccx + ''; + + meta = with stdenv.lib; { + homepage = "http://www.calculix.de/"; + description = "Three-dimensional structural finite element program"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ gebner ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/applications/science/math/gmsh/default.nix b/pkgs/applications/science/math/gmsh/default.nix index fbdbac003dc..1d96c0039ad 100644 --- a/pkgs/applications/science/math/gmsh/default.nix +++ b/pkgs/applications/science/math/gmsh/default.nix @@ -1,10 +1,9 @@ { stdenv, fetchurl, cmake, openblasCompat, gfortran, gmm, fltk, libjpeg -, zlib, libGLU_combined, libGLU, xorg }: +, zlib, libGLU_combined, libGLU, xorg, opencascade-occt }: -let version = "4.4.1"; in - -stdenv.mkDerivation { - name = "gmsh-${version}"; +stdenv.mkDerivation rec { + pname = "gmsh"; + version = "4.4.1"; src = fetchurl { url = "http://gmsh.info/src/gmsh-${version}-source.tgz"; @@ -14,15 +13,14 @@ stdenv.mkDerivation { buildInputs = [ openblasCompat gmm fltk libjpeg zlib libGLU_combined libGLU xorg.libXrender xorg.libXcursor xorg.libXfixes xorg.libXext xorg.libXft xorg.libXinerama xorg.libX11 xorg.libSM xorg.libICE + opencascade-occt ]; nativeBuildInputs = [ cmake gfortran ]; - enableParallelBuilding = true; - meta = { description = "A three-dimensional finite element mesh generator"; - homepage = http://gmsh.info/; + homepage = "http://gmsh.info/"; platforms = [ "x86_64-linux" ]; license = stdenv.lib.licenses.gpl2Plus; }; diff --git a/pkgs/applications/science/math/sage/dist-tests.nix b/pkgs/applications/science/math/sage/dist-tests.nix new file mode 100644 index 00000000000..24a86a8f37a --- /dev/null +++ b/pkgs/applications/science/math/sage/dist-tests.nix @@ -0,0 +1,17 @@ +# Lists past failures and files associated with it. The intention is to build +# up a subset of a testsuite that catches 95% of failures that are relevant for +# distributions while only taking ~5m to run. This in turn makes it more +# reasonable to re-test sage on dependency changes and makes it easier for +# users to override the sage derivation. +# This is an experiment for now. If it turns out that there really is a small +# subset of files responsible for the vast majority of packaging tests, we can +# think about moving this upstream. +[ + "src/sage/env.py" # [1] + "src/sage/misc/persist.pyx" # [1] + "src/sage/misc/inline_fortran.py" # [1] + "src/sage/repl/ipython_extension.py" # [1] +] + +# Numbered list of past failures to annotate files with +# [1] PYTHONPATH related issue https://github.com/NixOS/nixpkgs/commit/ec7f569211091282410050e89e68832d4fe60528 diff --git a/pkgs/applications/science/math/sage/patches/configurationpy-error-verbose.patch b/pkgs/applications/science/math/sage/patches/configurationpy-error-verbose.patch new file mode 100644 index 00000000000..e687281ad1a --- /dev/null +++ b/pkgs/applications/science/math/sage/patches/configurationpy-error-verbose.patch @@ -0,0 +1,19 @@ +diff --git a/src/sage/repl/configuration.py b/src/sage/repl/configuration.py +index 67d7d2accf..18279581e2 100644 +--- a/src/sage/repl/configuration.py ++++ b/src/sage/repl/configuration.py +@@ -9,10 +9,11 @@ the IPython simple prompt is being used:: + sage: cmd = 'print([sys.stdin.isatty(), sys.stdout.isatty()])' + sage: import pexpect + sage: output = pexpect.run( +- ....: 'bash -c \'echo "{0}" | sage\''.format(cmd), ++ ....: 'bash -c \'export SAGE_BANNER=no; echo "{0}" | sage\''.format(cmd), + ....: ).decode('utf-8', 'surrogateescape') +- sage: 'sage: [False, True]' in output +- True ++ sage: print(output) ++ sage...[False, True] ++ sage...Exiting Sage ... + """ + + #***************************************************************************** diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix index 04a2cde9ba9..57d6c852be8 100644 --- a/pkgs/applications/science/math/sage/sage-src.nix +++ b/pkgs/applications/science/math/sage/sage-src.nix @@ -61,7 +61,11 @@ stdenv.mkDerivation rec { # Since sage unfortunately does not release bugfix releases, packagers must # fix those bugs themselves. This is for critical bugfixes, where "critical" # == "causes (transient) doctest failures / somebody complained". - bugfixPatches = [ ]; + bugfixPatches = [ + # To help debug the transient error in + # https://trac.sagemath.org/ticket/23087 when it next occurs. + ./patches/configurationpy-error-verbose.patch + ]; # Patches needed because of package updates. We could just pin the versions of # dependencies, but that would lead to rebuilds, confusion and the burdons of diff --git a/pkgs/applications/science/math/sage/sage-tests.nix b/pkgs/applications/science/math/sage/sage-tests.nix index af5c96c093c..856d604d751 100644 --- a/pkgs/applications/science/math/sage/sage-tests.nix +++ b/pkgs/applications/science/math/sage/sage-tests.nix @@ -51,6 +51,10 @@ stdenv.mkDerivation rec { export HOME="$TMPDIR/sage-home" mkdir -p "$HOME" + # avoid running out of memory with many threads in subprocesses, see + # https://github.com/NixOS/nixpkgs/pull/65802 + export GLIBC_TUNABLES=glibc.malloc.arena_max=4 + echo "Running sage tests with arguments ${timeSpecifier} ${patienceSpecifier} ${testArgs}" "sage" -t --nthreads "$NIX_BUILD_CORES" --optional=sage ${timeSpecifier} ${patienceSpecifier} ${testArgs} ''; |