diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2018-08-17 13:44:40 +0200 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2018-08-17 13:45:21 +0200 |
commit | cbabebcc2e3b884296fedf8591e04f59240b3939 (patch) | |
tree | 54f637fbb59548753ac613ec3e4f56aae97a5e6e /pkgs/applications/science | |
parent | 7a22083e1271869294a074cbe7a971f2d8abb4f4 (diff) | |
parent | 93147d737d24f55d8da7257e24d840c9f9b1fe6c (diff) | |
download | nixlib-cbabebcc2e3b884296fedf8591e04f59240b3939.tar nixlib-cbabebcc2e3b884296fedf8591e04f59240b3939.tar.gz nixlib-cbabebcc2e3b884296fedf8591e04f59240b3939.tar.bz2 nixlib-cbabebcc2e3b884296fedf8591e04f59240b3939.tar.lz nixlib-cbabebcc2e3b884296fedf8591e04f59240b3939.tar.xz nixlib-cbabebcc2e3b884296fedf8591e04f59240b3939.tar.zst nixlib-cbabebcc2e3b884296fedf8591e04f59240b3939.zip |
Merge branch 'master' into staging-next
Hydra: ?compare=1473892
Diffstat (limited to 'pkgs/applications/science')
15 files changed, 371 insertions, 94 deletions
diff --git a/pkgs/applications/science/astronomy/gildas/default.nix b/pkgs/applications/science/astronomy/gildas/default.nix index 7ede379fb499..ee19077065e0 100644 --- a/pkgs/applications/science/astronomy/gildas/default.nix +++ b/pkgs/applications/science/astronomy/gildas/default.nix @@ -7,13 +7,13 @@ let in stdenv.mkDerivation rec { - srcVersion = "jul18a"; - version = "20180701_a"; + srcVersion = "aug18a"; + version = "20180801_a"; name = "gildas-${version}"; src = fetchurl { - url = "http://www.iram.fr/~gildas/dist/archive/gildas/gildas-src-${srcVersion}.tar.gz"; - sha256 = "0kl3zf6b1kv8hgsfrarsnm2gnrdax3vi8f856249y4nxsa7lbv2i"; + url = "http://www.iram.fr/~gildas/dist/gildas-src-${srcVersion}.tar.gz"; + sha256 = "0mg3wijrj8x1p912vkgrhxbypjx7aj9b1492yxvq2y3fxban6bj1"; }; enableParallelBuilding = true; @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { buildInputs = [ gtk2-x11 lesstif cfitsio python27Env ]; - patches = [ ./wrapper.patch ./return-error-code.patch ./clang.patch ./mod.patch ./aarch64.patch ]; + patches = [ ./wrapper.patch ./return-error-code.patch ./clang.patch ./aarch64.patch ]; configurePhase='' substituteInPlace admin/wrapper.sh --replace '%%OUT%%' $out diff --git a/pkgs/applications/science/astronomy/gildas/mod.patch b/pkgs/applications/science/astronomy/gildas/mod.patch deleted file mode 100644 index c917b4674f13..000000000000 --- a/pkgs/applications/science/astronomy/gildas/mod.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -ruN gildas-src-jul18a/admin/Makefile.build gildas-src-jul18a.mod/admin/Makefile.build ---- gildas-src-jul18a/admin/Makefile.build 2018-06-14 14:36:54.000000000 +0200 -+++ gildas-src-jul18a.mod/admin/Makefile.build 2018-07-06 13:31:46.000000000 +0200 -@@ -291,6 +291,13 @@ - win-$(LIB_IDENTITY)-und.def -o $@ $(FLDLIBS) $(LIB_DEPENDS) $(ADD_LIBS) $(SYS_LIBS)) - endif - -+# Dummy rules for modules just so that make consider the module a -+# valid dependency when first parsing the makefiles. This rule should -+# never be applied as the modules are a by-product of the compilation -+# of the object -+$(builddir)/%.mod: -+ echo "dummy" > /dev/null -+ - # Fortran executables - $(bindir)/% : $(builddir)/%.o | $(bindir) - $(FC) $(ALL_FLDFLAGS) $< $(OBJECTS) -o $@ \ diff --git a/pkgs/applications/science/biology/picard-tools/default.nix b/pkgs/applications/science/biology/picard-tools/default.nix index a08a54c94ecd..0ddbdab4c1b1 100644 --- a/pkgs/applications/science/biology/picard-tools/default.nix +++ b/pkgs/applications/science/biology/picard-tools/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "picard-tools-${version}"; - version = "2.18.10"; + version = "2.18.11"; src = fetchurl { url = "https://github.com/broadinstitute/picard/releases/download/${version}/picard.jar"; - sha256 = "1px5ar6iizm4czpc66hyyafandw6g9x9s1abj8klc78alvihciw4"; + sha256 = "03wkyz3bjx3n8bwambhz9lr09271r1wxycmx4p7m2naqs4afxb89"; }; buildInputs = [ jre makeWrapper ]; diff --git a/pkgs/applications/science/logic/aiger/default.nix b/pkgs/applications/science/logic/aiger/default.nix index 1a60c5e148cc..03524fc6b222 100644 --- a/pkgs/applications/science/logic/aiger/default.nix +++ b/pkgs/applications/science/logic/aiger/default.nix @@ -13,18 +13,15 @@ stdenv.mkDerivation rec { configurePhase = '' # Set up picosat, so we can build 'aigbmc' - echo $(pwd) - ls .. mkdir ../picosat ln -s ${picosat}/include/picosat/picosat.h ../picosat/picosat.h ln -s ${picosat}/lib/picosat.o ../picosat/picosat.o ln -s ${picosat}/share/picosat.version ../picosat/VERSION - ls .. ./configure.sh ''; installPhase = '' - mkdir -p $out/bin + mkdir -p $out/bin $dev/include $lib/lib # Do the installation manually, as the Makefile has odd # cyrillic characters, and this is easier than adding @@ -41,8 +38,13 @@ stdenv.mkDerivation rec { for x in ''${BINS[*]}; do install -m 755 -s $x $out/bin/$x done + + cp -v aiger.o $lib/lib + cp -v aiger.h $dev/include ''; + outputs = [ "out" "dev" "lib" ]; + meta = { description = "And-Inverter Graph (AIG) utilities"; homepage = http://fmv.jku.at/aiger/; diff --git a/pkgs/applications/science/logic/boolector/default.nix b/pkgs/applications/science/logic/boolector/default.nix index aa815e48db41..8e0ad22bba18 100644 --- a/pkgs/applications/science/logic/boolector/default.nix +++ b/pkgs/applications/science/logic/boolector/default.nix @@ -1,41 +1,50 @@ -{ stdenv, fetchurl, writeShellScriptBin }: +{ stdenv, fetchFromGitHub +, cmake, lingeling, btor2tools +}: stdenv.mkDerivation rec { name = "boolector-${version}"; - version = "2.4.1"; - src = fetchurl { - url = "http://fmv.jku.at/boolector/boolector-${version}-with-lingeling-bbc.tar.bz2"; - sha256 = "0mdf7hwix237pvknvrpazcx6s3ininj5k7vhysqjqgxa7lxgq045"; + version = "3.0.0"; + + src = fetchFromGitHub { + owner = "boolector"; + repo = "boolector"; + rev = "refs/tags/${version}"; + sha256 = "15i3ni5klss423m57wcy1gx0m5wfrjmglapwg85pm7fb3jj1y7sz"; }; - prePatch = - let - lingelingPatch = writeShellScriptBin "lingeling-patch" '' - sed -i -e "1i#include <stdint.h>" lingeling/lglib.h - - ${crossFix}/bin/crossFix lingeling - ''; - crossFix = writeShellScriptBin "crossFix" '' - # substituteInPlace not available here - sed -i $1/makefile.in \ - -e 's@ar rc@$(AR) rc@' \ - -e 's@ranlib@$(RANLIB)@' - ''; - in '' - sed -i -e 's@mv lingeling\* lingeling@\0 \&\& ${lingelingPatch}/bin/lingeling-patch@' makefile - sed -i -e 's@mv boolector\* boolector@\0 \&\& ${crossFix}/bin/crossFix boolector@' makefile - ''; + nativeBuildInputs = [ cmake ]; + buildInputs = [ lingeling btor2tools ]; + + cmakeFlags = + [ "-DSHARED=ON" + "-DUSE_LINGELING=YES" + "-DBTOR2_INCLUDE_DIR=${btor2tools.dev}/include" + "-DBTOR2_LIBRARIES=${btor2tools.lib}/lib/libbtor2parser.so" + "-DLINGELING_INCLUDE_DIR=${lingeling.dev}/include" + "-DLINGELING_LIBRARIES=${lingeling.lib}/lib/liblgl.a" + ]; installPhase = '' - mkdir $out - mv boolector/bin $out + mkdir -p $out/bin $lib/lib $dev/include + + cp -vr bin/* $out/bin + cp -vr lib/* $lib/lib + + rm -rf $out/bin/{examples,test} + + cd ../src + find . -iname '*.h' -exec cp --parents '{}' $dev/include \; + rm -rf $dev/include/tests ''; - meta = { - license = stdenv.lib.licenses.unfreeRedistributable; + outputs = [ "out" "dev" "lib" ]; + + meta = with stdenv.lib; { description = "An extremely fast SMT solver for bit-vectors and arrays"; - homepage = "http://fmv.jku.at/boolector"; - platforms = stdenv.lib.platforms.linux; - maintainers = [ stdenv.lib.maintainers.thoughtpolice ]; + homepage = https://boolector.github.io; + license = licenses.mit; + platforms = platforms.linux; + maintainers = with maintainers; [ thoughtpolice ]; }; } diff --git a/pkgs/applications/science/logic/btor2tools/default.nix b/pkgs/applications/science/logic/btor2tools/default.nix new file mode 100644 index 000000000000..ed3d9e638121 --- /dev/null +++ b/pkgs/applications/science/logic/btor2tools/default.nix @@ -0,0 +1,33 @@ +{ stdenv, fetchFromGitHub }: + +stdenv.mkDerivation rec { + name = "btor2tools-${version}"; + version = "pre55_8c150b39"; + + src = fetchFromGitHub { + owner = "boolector"; + repo = "btor2tools"; + rev = "8c150b39cdbcdef4247344acf465d75ef642365d"; + sha256 = "1r5pid4x567nms02ajjrz3v0zj18k0fi5pansrmc2907rnx2acxx"; + }; + + configurePhase = "./configure.sh -shared"; + + installPhase = '' + mkdir -p $out $dev/include/btor2parser/ $lib/lib + + cp -vr bin $out + cp -v src/btor2parser/btor2parser.h $dev/include/btor2parser + cp -v build/libbtor2parser.* $lib/lib + ''; + + outputs = [ "out" "dev" "lib" ]; + + meta = with stdenv.lib; { + description = "Fast SAT solver"; + homepage = http://fmv.jku.at/lingeling/; + license = licenses.mit; + platforms = platforms.linux; + maintainers = with maintainers; [ thoughtpolice ]; + }; +} diff --git a/pkgs/applications/science/logic/lingeling/default.nix b/pkgs/applications/science/logic/lingeling/default.nix new file mode 100644 index 000000000000..000587a22e67 --- /dev/null +++ b/pkgs/applications/science/logic/lingeling/default.nix @@ -0,0 +1,49 @@ +{ stdenv, fetchFromGitHub +, aiger +}: + +stdenv.mkDerivation rec { + name = "lingeling-${version}"; + # This is the version used in satcomp2018, which was + # relicensed, and also known as version 'bcj' + version = "pre1_03b4860d"; + + src = fetchFromGitHub { + owner = "arminbiere"; + repo = "lingeling"; + rev = "03b4860d14016f42213ea271014f2f13d181f504"; + sha256 = "1lw1yfy219p7rrk88sbq4zl24b70040zapbjdrpv5a6i0jsblksx"; + }; + + configurePhase = '' + ./configure.sh + + # Rather than patch ./configure, just sneak in use of aiger here, since it + # doesn't handle real build products very well (it works on a build-time + # dir, not installed copy)... This is so we can build 'blimc' + substituteInPlace ./makefile \ + --replace 'targets: liblgl.a' 'targets: liblgl.a blimc' \ + --replace '$(AIGER)/aiger.o' '${aiger.lib}/lib/aiger.o' \ + --replace '$(AIGER)/aiger.h' '${aiger.dev}/include/aiger.h' \ + --replace '-I$(AIGER)' '-I${aiger.dev}/include' + ''; + + installPhase = '' + mkdir -p $out/bin $lib/lib $dev/include + + cp lglib.h $dev/include + cp liblgl.a $lib/lib + + cp lingeling plingeling treengeling ilingeling blimc $out/bin + ''; + + outputs = [ "out" "dev" "lib" ]; + + meta = with stdenv.lib; { + description = "Fast SAT solver"; + homepage = http://fmv.jku.at/lingeling/; + license = licenses.mit; + platforms = platforms.linux; + maintainers = with maintainers; [ thoughtpolice ]; + }; +} diff --git a/pkgs/applications/science/math/caffe/darwin.patch b/pkgs/applications/science/math/caffe/darwin.patch new file mode 100644 index 000000000000..e8fa6a683f73 --- /dev/null +++ b/pkgs/applications/science/math/caffe/darwin.patch @@ -0,0 +1,47 @@ +diff --git a/Makefile b/Makefile +index c823f66e..65b90c5e 100644 +--- a/Makefile ++++ b/Makefile +@@ -32,9 +32,9 @@ SRC_DIRS := $(shell find * -type d -exec bash -c "find {} -maxdepth 1 \ + LIBRARY_NAME := $(PROJECT) + LIB_BUILD_DIR := $(BUILD_DIR)/lib + STATIC_NAME := $(LIB_BUILD_DIR)/lib$(LIBRARY_NAME).a +-DYNAMIC_VERSION_MAJOR := 1 +-DYNAMIC_VERSION_MINOR := 0 +-DYNAMIC_VERSION_REVISION := 0 ++DYNAMIC_VERSION_MAJOR := 1 ++DYNAMIC_VERSION_MINOR := 0 ++DYNAMIC_VERSION_REVISION := 0 + DYNAMIC_NAME_SHORT := lib$(LIBRARY_NAME).so + #DYNAMIC_SONAME_SHORT := $(DYNAMIC_NAME_SHORT).$(DYNAMIC_VERSION_MAJOR) + DYNAMIC_VERSIONED_NAME_SHORT := $(DYNAMIC_NAME_SHORT).$(DYNAMIC_VERSION_MAJOR).$(DYNAMIC_VERSION_MINOR).$(DYNAMIC_VERSION_REVISION) +diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake +index c48255c8..cf4c580e 100644 +--- a/cmake/Dependencies.cmake ++++ b/cmake/Dependencies.cmake +@@ -105,7 +105,6 @@ if(USE_OPENCV) + endif() + + # ---[ BLAS +-if(NOT APPLE) + set(BLAS "Atlas" CACHE STRING "Selected BLAS library") + set_property(CACHE BLAS PROPERTY STRINGS "Atlas;Open;MKL") + +@@ -123,17 +122,6 @@ if(NOT APPLE) + list(APPEND Caffe_LINKER_LIBS PUBLIC ${MKL_LIBRARIES}) + list(APPEND Caffe_DEFINITIONS PUBLIC -DUSE_MKL) + endif() +-elseif(APPLE) +- find_package(vecLib REQUIRED) +- list(APPEND Caffe_INCLUDE_DIRS PUBLIC ${vecLib_INCLUDE_DIR}) +- list(APPEND Caffe_LINKER_LIBS PUBLIC ${vecLib_LINKER_LIBS}) +- +- if(VECLIB_FOUND) +- if(NOT vecLib_INCLUDE_DIR MATCHES "^/System/Library/Frameworks/vecLib.framework.*") +- list(APPEND Caffe_DEFINITIONS PUBLIC -DUSE_ACCELERATE) +- endif() +- endif() +-endif() + + # ---[ Python + if(BUILD_python) diff --git a/pkgs/applications/science/math/caffe/default.nix b/pkgs/applications/science/math/caffe/default.nix index d7357c5048d5..e56c63e01bf0 100644 --- a/pkgs/applications/science/math/caffe/default.nix +++ b/pkgs/applications/science/math/caffe/default.nix @@ -1,27 +1,39 @@ -{ stdenv, lib +{ stdenv, lib, runCommand , fetchFromGitHub +, fetchurl , cmake , boost , google-gflags , glog , hdf5-cpp -, leveldb -, lmdb , opencv3 , protobuf -, snappy , doxygen , openblas -, cudaSupport ? true, cudatoolkit +, Accelerate, CoreGraphics, CoreVideo +, lmdbSupport ? true, lmdb +, leveldbSupport ? true, leveldb, snappy +, cudaSupport ? stdenv.isLinux, cudatoolkit , cudnnSupport ? false, cudnn ? null , ncclSupport ? false, nccl ? null , pythonSupport ? false, python ? null, numpy ? null }: +assert leveldbSupport -> (leveldb != null && snappy != null); assert cudnnSupport -> cudaSupport; assert ncclSupport -> cudaSupport; assert pythonSupport -> (python != null && numpy != null); +let + toggle = bool: if bool then "ON" else "OFF"; + + test_model_weights = fetchurl { + url = "http://dl.caffe.berkeleyvision.org/bvlc_reference_caffenet.caffemodel"; + sha256 = "472d4a06035497b180636d8a82667129960371375bd10fcb6df5c6c7631f25e0"; + }; + +in + stdenv.mkDerivation rec { name = "caffe-${version}"; version = "1.0"; @@ -44,19 +56,27 @@ stdenv.mkDerivation rec { "-DCUDA_ARCH_NAME=All" "-DCUDA_HOST_COMPILER=${cudatoolkit.cc}/bin/cc" ] else [ "-DCPU_ONLY=ON" ]) - ++ lib.optional ncclSupport "-DUSE_NCCL=ON"; + ++ ["-DUSE_NCCL=${toggle ncclSupport}"] + ++ ["-DUSE_LEVELDB=${toggle leveldbSupport}"] + ++ ["-DUSE_LMDB=${toggle lmdbSupport}"]; - buildInputs = [ boost google-gflags glog protobuf hdf5-cpp lmdb leveldb snappy opencv3 openblas ] + buildInputs = [ boost google-gflags glog protobuf hdf5-cpp opencv3 openblas ] ++ lib.optional cudaSupport cudatoolkit ++ lib.optional cudnnSupport cudnn + ++ lib.optional lmdbSupport lmdb ++ lib.optional ncclSupport nccl - ++ lib.optionals pythonSupport [ python numpy ]; + ++ lib.optionals leveldbSupport [ leveldb snappy ] + ++ lib.optionals pythonSupport [ python numpy ] + ++ lib.optionals stdenv.isDarwin [ Accelerate CoreGraphics CoreVideo ] + ; propagatedBuildInputs = lib.optional pythonSupport python.pkgs.protobuf; outputs = [ "bin" "out"]; propagatedBuildOutputs = []; # otherwise propagates out -> bin cycle + patches = [ ./darwin.patch ]; + preConfigure = lib.optionalString (cudaSupport && lib.versionAtLeast cudatoolkit.version "9.0") '' # CUDA 9.0 doesn't support sm_20 sed -i 's,20 21(20) ,,' cmake/Cuda.cmake @@ -71,6 +91,9 @@ stdenv.mkDerivation rec { # Internal static library. rm $out/lib/libproto.a + # Install models + cp -a ../models $out/share/Caffe/models + moveToOutput "bin" "$bin" '' + lib.optionalString pythonSupport '' mkdir -p $out/${python.sitePackages} @@ -78,6 +101,16 @@ stdenv.mkDerivation rec { rm -rf $out/python ''; + doInstallCheck = false; # build takes more than 30 min otherwise + installCheckPhase = '' + model=bvlc_reference_caffenet + m_path="$out/share/Caffe/models/$model" + $bin/bin/caffe test \ + -model "$m_path/deploy.prototxt" \ + -solver "$m_path/solver.prototxt" \ + -weights "${test_model_weights}" + ''; + meta = with stdenv.lib; { description = "Deep learning framework"; longDescription = '' @@ -88,6 +121,6 @@ stdenv.mkDerivation rec { homepage = http://caffe.berkeleyvision.org/; maintainers = with maintainers; [ jb55 ]; license = licenses.bsd2; - platforms = platforms.linux; + platforms = platforms.linux ++ platforms.darwin; }; } diff --git a/pkgs/applications/science/math/cplex/default.nix b/pkgs/applications/science/math/cplex/default.nix new file mode 100644 index 000000000000..fe3913648f87 --- /dev/null +++ b/pkgs/applications/science/math/cplex/default.nix @@ -0,0 +1,82 @@ +{ stdenv, makeWrapper, openjdk, gtk2, xorg, glibcLocales, releasePath }: + +# To use this package, you need to download your own cplex installer from IBM +# and override the releasePath attribute to point to the location of the file. +# +# Note: cplex creates an individual build for each license which screws +# somewhat with the use of functions like requireFile as the hash will be +# different for every user. + +stdenv.mkDerivation rec { + name = "cplex-${version}"; + version = "128"; + + src = + if builtins.isNull releasePath then + throw '' + This nix expression requires that the cplex installer is already + downloaded to your machine. Get it from IBM: + https://developer.ibm.com/docloud/blog/2017/12/20/cplex-optimization-studio-12-8-now-available/ + + Set `cplex.releasePath = /path/to/download;` in your + ~/.config/nixpkgs/config.nix for `nix-*` commands, or + `config.cplex.releasePath = /path/to/download;` in your + `configuration.nix` for NixOS. + '' + else + releasePath; + + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ openjdk gtk2 xorg.libXtst glibcLocales ]; + + unpackPhase = "cp $src $name"; + + patchPhase = '' + sed -i -e 's|/usr/bin/tr"|tr" |' $name + ''; + + buildPhase = '' + sh $name -i silent -DLICENSE_ACCEPTED=TRUE -DUSER_INSTALL_DIR=$out + ''; + + installPhase = '' + mkdir -p $out/bin + ln -s $out/opl/bin/x86-64_linux/oplrun\ + $out/opl/bin/x86-64_linux/oplrunjava\ + $out/opl/oplide/oplide\ + $out/cplex/bin/x86-64_linux/cplex\ + $out/cpoptimizer/bin/x86-64_linux/cpoptimizer\ + $out/bin + ''; + + fixupPhase = + let + libraryPath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc gtk2 xorg.libXtst ]; + in '' + interpreter=${stdenv.glibc}/lib/ld-linux-x86-64.so.2 + + for pgm in $out/opl/bin/x86-64_linux/oplrun $out/opl/bin/x86-64_linux/oplrunjava $out/opl/oplide/oplide; + do + patchelf --set-interpreter "$interpreter" $pgm; + wrapProgram $pgm \ + --prefix LD_LIBRARY_PATH : $out/opl/bin/x86-64_linux:${libraryPath} \ + --set LOCALE_ARCHIVE ${glibcLocales}/lib/locale/locale-archive; + done + + for pgm in $out/cplex/bin/x86-64_linux/cplex $out/cpoptimizer/bin/x86-64_linux/cpoptimizer $out/opl/oplide/jre/bin/*; + do + if grep ELF $pgm > /dev/null; + then + patchelf --set-interpreter "$interpreter" $pgm; + fi + done + ''; + + meta = with stdenv.lib; { + description = "Optimization solver for mathematical programming"; + homepage = "https://www.ibm.com/be-en/marketplace/ibm-ilog-cplex"; + license = licenses.unfree; + platforms = [ "x86_64-linux" ]; + maintainers = with maintainers; [ bfortz ]; + }; +} diff --git a/pkgs/applications/science/math/gfan/default.nix b/pkgs/applications/science/math/gfan/default.nix index 65d551f39a71..d2d1ddb65846 100644 --- a/pkgs/applications/science/math/gfan/default.nix +++ b/pkgs/applications/science/math/gfan/default.nix @@ -9,15 +9,20 @@ stdenv.mkDerivation rec { sha256 = "02pihqb1lb76a0xbfwjzs1cd6ay3ldfxsm8dvsbl6qs3vkjxax56"; }; - makeFlags = ''PREFIX=$(out) CC=cc CXX=c++ cddnoprefix=1''; - buildInputs = [gmp mpir cddlib]; + patchPhase = stdenv.lib.optionalString stdenv.isDarwin '' + substituteInPlace Makefile --replace "-fno-guess-branch-probability" "" + ''; + + buildFlags = [ "CC=cc" "CXX=c++" "cddnoprefix=1" ]; + installFlags = [ ''PREFIX=$(out)'' ]; + buildInputs = [ gmp mpir cddlib ]; meta = { inherit version; description = ''A software package for computing Gröbner fans and tropical varieties''; license = stdenv.lib.licenses.gpl2 ; maintainers = [stdenv.lib.maintainers.raskin]; - platforms = stdenv.lib.platforms.linux; + platforms = stdenv.lib.platforms.unix; homepage = http://home.math.au.dk/jensen/software/gfan/gfan.html; }; } diff --git a/pkgs/applications/science/math/qalculate-gtk/default.nix b/pkgs/applications/science/math/qalculate-gtk/default.nix index 7990088ffbe9..59dbfdb509dc 100644 --- a/pkgs/applications/science/math/qalculate-gtk/default.nix +++ b/pkgs/applications/science/math/qalculate-gtk/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { name = "qalculate-gtk-${version}"; - version = "2.6.1"; + version = "2.6.2"; src = fetchFromGitHub { owner = "qalculate"; repo = "qalculate-gtk"; rev = "v${version}"; - sha256 = "19jw1w29x0r1qq5r8gmqrqr00ml2pfi2w433723vjzxpfg2pp70r"; + sha256 = "1yzw6avhka7bbi071z9d8cipcghyjq2bg9x3arv1cf395xlnrmb9"; }; patchPhase = '' diff --git a/pkgs/applications/science/math/ratpoints/default.nix b/pkgs/applications/science/math/ratpoints/default.nix index 82a6836bd623..2dd4778234df 100644 --- a/pkgs/applications/science/math/ratpoints/default.nix +++ b/pkgs/applications/science/math/ratpoints/default.nix @@ -1,20 +1,36 @@ -{stdenv, fetchurl, gmp}: +{ stdenv, fetchurl, fetchpatch, gmp }: stdenv.mkDerivation rec { name = "ratpoints-${version}"; - version = "2.1.3"; + version = "2.1.3.p4"; + src = fetchurl { url = "http://www.mathe2.uni-bayreuth.de/stoll/programs/ratpoints-${version}.tar.gz"; sha256 = "0zhad84sfds7izyksbqjmwpfw4rvyqk63yzdjd3ysd32zss5bgf4"; }; - buildInputs = [gmp]; - makeFlags = "INSTALL_DIR=$(out)"; + + enableParallelBuilding = true; + + patches = [ + (fetchpatch { + url = "https://git.sagemath.org/sage.git/plain/build/pkgs/ratpoints/patches/sturm_and_rp_private.patch?id=1615f58890e8f9881c4228c78a6b39b9aab1303a"; + sha256 = "0q3wajncyfr3gahd8gwk9x7g56zw54lpywrl63lqk7drkf60mrcl"; + }) + ]; + + buildInputs = [ gmp ]; + + makeFlags = [ "CC=cc" ]; + buildFlags = stdenv.lib.optional stdenv.isDarwin ["CCFLAGS2=-lgmp -lc -lm" "CCFLAGS=-UUSE_SSE"]; + installFlags = [ "INSTALL_DIR=$(out)" ]; + preInstall = ''mkdir -p "$out"/{bin,share,lib,include}''; + meta = { inherit version; description = ''A program to find rational points on hyperelliptic curves''; license = stdenv.lib.licenses.gpl2Plus; maintainers = [stdenv.lib.maintainers.raskin]; - platforms = stdenv.lib.platforms.linux; + platforms = stdenv.lib.platforms.unix; homepage = http://www.mathe2.uni-bayreuth.de/stoll/programs/; updateWalker = true; }; diff --git a/pkgs/applications/science/math/symmetrica/default.nix b/pkgs/applications/science/math/symmetrica/default.nix index 6123fd7306d9..a641993b393b 100644 --- a/pkgs/applications/science/math/symmetrica/default.nix +++ b/pkgs/applications/science/math/symmetrica/default.nix @@ -5,20 +5,15 @@ stdenv.mkDerivation rec { name = "symmetrica-${version}"; version = "2.0"; + src = fetchurl { url = "http://www.algorithm.uni-bayreuth.de/en/research/SYMMETRICA/SYM2_0_tar.gz"; sha256 = "1qhfrbd5ybb0sinl9pad64rscr08qvlfzrzmi4p4hk61xn6phlmz"; name = "symmetrica-2.0.tar.gz"; }; + sourceRoot = "."; - installPhase = '' - mkdir -p "$out"/{lib,share/doc/symmetrica,include/symmetrica} - ar crs libsymmetrica.a *.o - ranlib libsymmetrica.a - cp libsymmetrica.a "$out/lib" - cp *.h "$out/include/symmetrica" - cp README *.doc "$out/share/doc/symmetrica" - ''; + patches = [ # don't show banner ("SYMMETRICA VERSION X - STARTING) # it doesn't contain very much helpful information and a banner is not ideal for a library @@ -34,13 +29,34 @@ stdenv.mkDerivation rec { url = "https://git.sagemath.org/sage.git/plain/build/pkgs/symmetrica/patches/int32.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba"; sha256 = "0p33c85ck4kd453z687ni4bdcqr1pqx2756j7aq11bf63vjz4cyz"; }) + + (fetchpatch { + url = "https://git.sagemath.org/sage.git/plain/build/pkgs/symmetrica/patches/return_values.patch?id=1615f58890e8f9881c4228c78a6b39b9aab1303a"; + sha256 = "0dmczkicwl50sivc07w3wm3jpfk78wm576dr25999jdj2ipsb7nk"; + }) ]; + + postPatch = '' + substituteInPlace makefile --replace gcc cc + ''; + + enableParallelBuilding = true; + + installPhase = '' + mkdir -p "$out"/{lib,share/doc/symmetrica,include/symmetrica} + ar crs libsymmetrica.a *.o + ranlib libsymmetrica.a + cp libsymmetrica.a "$out/lib" + cp *.h "$out/include/symmetrica" + cp README *.doc "$out/share/doc/symmetrica" + ''; + meta = { inherit version; description = ''A collection of routines for representation theory and combinatorics''; license = stdenv.lib.licenses.publicDomain; maintainers = [stdenv.lib.maintainers.raskin]; - platforms = stdenv.lib.platforms.linux; + platforms = stdenv.lib.platforms.unix; homepage = http://www.symmetrica.de/; }; } diff --git a/pkgs/applications/science/misc/simgrid/default.nix b/pkgs/applications/science/misc/simgrid/default.nix index 17a1719ba1ed..b6cd8c294c1b 100644 --- a/pkgs/applications/science/misc/simgrid/default.nix +++ b/pkgs/applications/science/misc/simgrid/default.nix @@ -1,11 +1,11 @@ -{ stdenv, fetchFromGitHub, cmake, elfutils, perl, python3, boost, valgrind +{ stdenv, fetchFromGitHub, cmake, perl, python3, boost, valgrind # Optional requirements # Lua 5.3 needed and not available now #, luaSupport ? false, lua5 , fortranSupport ? false, gfortran , buildDocumentation ? false, transfig, ghostscript, doxygen , buildJavaBindings ? false, openjdk -, modelCheckingSupport ? false, libunwind, libevent # Inside elfutils - , libelf, libevent, libdw +, modelCheckingSupport ? false, libunwind, libevent, elfutils # Inside elfutils: libelf and libdw , debug ? false , moreTests ? false }: @@ -18,20 +18,20 @@ in stdenv.mkDerivation rec { name = "simgrid-${version}"; - version = "3.19.1"; + version = "3.20"; src = fetchFromGitHub { owner = "simgrid"; repo = "simgrid"; rev = "v${version}"; - sha256 = "0vpgcp40xv20hcpslx5wz2mf2phaq41f7x8yr0bm7mknqd3zwxih"; + sha256 = "0xb20qhvsah2dz2hvn850i3w9a5ghsbcx8vka2ap6xsdkxf593gy"; }; - nativeBuildInputs = [ cmake perl elfutils python3 boost valgrind ] + nativeBuildInputs = [ cmake perl python3 boost valgrind ] ++ optionals fortranSupport [ gfortran ] ++ optionals buildJavaBindings [ openjdk ] ++ optionals buildDocumentation [ transfig ghostscript doxygen ] - ++ optionals modelCheckingSupport [ libunwind libevent ]; + ++ optionals modelCheckingSupport [ libunwind libevent elfutils ]; #buildInputs = optional luaSupport lua5; @@ -83,13 +83,15 @@ stdenv.mkDerivation rec { ''; doCheck = true; - + checkPhase = '' runHook preCheck - ctest --output-on-failure -E smpi-replay-multiple + + ctest -j $NIX_BUILD_CORES --output-on-failure -E smpi-replay-multiple + runHook postCheck ''; - + enableParallelBuilding = true; meta = { |