diff options
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r-- | pkgs/applications/science/logic/elan/default.nix | 11 | ||||
-rw-r--r-- | pkgs/applications/science/machine-learning/shogun/default.nix | 82 | ||||
-rw-r--r-- | pkgs/applications/science/math/geogebra/default.nix | 4 |
3 files changed, 63 insertions, 34 deletions
diff --git a/pkgs/applications/science/logic/elan/default.nix b/pkgs/applications/science/logic/elan/default.nix index 2ac7c208a5f..b77f5110521 100644 --- a/pkgs/applications/science/logic/elan/default.nix +++ b/pkgs/applications/science/logic/elan/default.nix @@ -1,14 +1,9 @@ -{ stdenv, pkgconfig, curl, openssl, zlib, fetchFromGitHub, rustPlatform }: +{ lib, pkgconfig, curl, openssl, zlib, fetchFromGitHub, rustPlatform }: rustPlatform.buildRustPackage rec { pname = "elan"; version = "0.7.5"; - # Delete this on next update; see #79975 for details - legacyCargoFetcher = true; - - cargoSha256 = "0q0xlvyyf88dbz43r7kk9v8rrp6hj0nl5i2i9mg6ibk2gphgdv6v"; - src = fetchFromGitHub { owner = "kha"; repo = "elan"; @@ -16,6 +11,8 @@ rustPlatform.buildRustPackage rec { sha256 = "1147f3lzr6lgvf580ppspn20bdwnf6l8idh1h5ana0p0lf5a0dn1"; }; + cargoSha256 = "0vja1cq6z7jlr4nzfdzn4gl8l31yld82zmgzwihnalif13q3fcps"; + nativeBuildInputs = [ pkgconfig ]; buildInputs = [ curl zlib openssl ]; @@ -38,7 +35,7 @@ rustPlatform.buildRustPackage rec { $out/bin/elan completions zsh > "$out/share/zsh/site-functions/_elan" ''; - meta = with stdenv.lib; { + meta = with lib; { description = "Small tool to manage your installations of the Lean theorem prover"; homepage = "https://github.com/Kha/elan"; license = with licenses; [ asl20 /* or */ mit ]; diff --git a/pkgs/applications/science/machine-learning/shogun/default.nix b/pkgs/applications/science/machine-learning/shogun/default.nix index be15bba979f..988ea8c855c 100644 --- a/pkgs/applications/science/machine-learning/shogun/default.nix +++ b/pkgs/applications/science/machine-learning/shogun/default.nix @@ -1,8 +1,8 @@ -{ stdenv, lib, fetchFromGitHub, fetchpatch, ccache, cmake, ctags, swig +{ stdenv, lib, fetchFromGitHub, fetchpatch, fetchurl, cmake, ctags, swig # data, compression , bzip2, curl, hdf5, json_c, lzma, lzo, protobuf, snappy # maths -, openblasCompat, eigen, nlopt, lp_solve, colpack +, openblasCompat, eigen, nlopt, lp_solve, colpack, liblapack, glpk # libraries , libarchive, libxml2 # extra support @@ -13,47 +13,79 @@ assert pythonSupport -> pythonPackages != null; assert opencvSupport -> opencv != null; -stdenv.mkDerivation rec { +let pname = "shogun"; - version = "6.0.0"; - - src = fetchFromGitHub { - owner = pname + "-toolbox"; - repo = pname; - rev = pname + "_" + version; - sha256 = "0f2zwzvn5apvwypkfkq371xp7c5bdb4g1fwqfh8c2d57ysjxhmgf"; - fetchSubmodules = true; + version = "6.1.4"; + rxcppVersion = "4.0.0"; + gtestVersion = "1.8.0"; + srcs = { + toolbox = fetchFromGitHub { + owner = pname + "-toolbox"; + repo = pname; + rev = pname + "_" + version; + sha256 = "38aULxK50wQ2+/ERosSpRyBmssmYSGv5aaWfWSlrSRc="; + fetchSubmodules = true; + }; + # we need the packed archive + rxcpp = fetchurl { + url = "https://github.com/Reactive-Extensions/RxCpp/archive/v${rxcppVersion}.tar.gz"; + sha256 = "0y2isr8dy2n1yjr9c5570kpc9lvdlch6jv0jvw000amwn5d3krsh"; + }; + gtest = fetchurl { + url = "https://github.com/google/googletest/archive/release-${gtestVersion}.tar.gz"; + sha256 = "1n5p1m2m3fjrjdj752lf92f9wq3pl5cbsfrb49jqbg52ghkz99jq"; + }; }; +in + +stdenv.mkDerivation rec { + + inherit pname version; + + src = srcs.toolbox; + + postUnpack = '' + mkdir -p $sourceRoot/third_party/{rxcpp,gtest} + ln -s ${srcs.rxcpp} $sourceRoot/third_party/rxcpp/v${rxcppVersion}.tar.gz + ln -s ${srcs.gtest} $sourceRoot/third_party/gtest/release-${gtestVersion}.tar.gz + ''; + + # broken + doCheck = false; patches = [ (fetchpatch { - name = "Fix-meta-example-parser-bug-in-parallel-builds.patch"; - url = "https://github.com/shogun-toolbox/shogun/commit/ecd6a8f11ac52748e89d27c7fab7f43c1de39f05.patch"; - sha256 = "1hrwwrj78sxhwcvgaz7n4kvh5y9snfcc4jf5xpgji5hjymnl311n"; - }) - (fetchpatch { url = "https://github.com/awild82/shogun/commit/365ce4c4c700736d2eec8ba6c975327a5ac2cd9b.patch"; sha256 = "158hqv4xzw648pmjbwrhxjp7qcppqa7kvriif87gn3zdn711c49s"; }) ]; + CCACHE_DISABLE="1"; CCACHE_DIR=".ccache"; buildInputs = with lib; [ - openblasCompat bzip2 ccache cmake colpack curl ctags eigen hdf5 json_c lp_solve lzma lzo - protobuf nlopt snappy swig (libarchive.dev) libxml2 + openblasCompat bzip2 cmake colpack curl ctags eigen hdf5 json_c lp_solve lzma lzo + protobuf nlopt snappy swig (libarchive.dev) libxml2 liblapack glpk ] ++ optionals (pythonSupport) (with pythonPackages; [ python ply numpy ]) ++ optional (opencvSupport) opencv; - cmakeFlags = with lib; [] - ++ (optional (pythonSupport) "-DPythonModular=ON") - ++ (optional (opencvSupport) "-DOpenCV=ON") - ; + NIX_CFLAGS_COMPILE="-faligned-new"; + + cmakeFlags = + let + onOff = b: if b then "ON" else "OFF"; + flag = n: b: "-D"+n+"="+onOff b; + in + with lib; [ + (flag "ENABLE_TESTING" doCheck) + (flag "BUILD_META_EXAMPLES" doCheck) + (flag "CMAKE_VERBOSE_MAKEFILE:BOOL" doCheck) + (flag "PythonModular" pythonSupport) + (flag "OpenCV" opencvSupport) + ]; - # Previous attempts to fix parallel builds (see patch above) were not entirely successful. - # Sporadic build failures still exist. Dislable parallel builds for now. - enableParallelBuilding = false; + enableParallelBuilding = true; meta = with stdenv.lib; { description = "A toolbox which offers a wide range of efficient and unified machine learning methods"; diff --git a/pkgs/applications/science/math/geogebra/default.nix b/pkgs/applications/science/math/geogebra/default.nix index a08c0ee3403..de84d35c2e8 100644 --- a/pkgs/applications/science/math/geogebra/default.nix +++ b/pkgs/applications/science/math/geogebra/default.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation rec { pname = "geogebra"; - version = "5-0-570-0"; + version = "5-0-573-0"; preferLocalBuild = true; @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { "https://download.geogebra.org/installers/5.0/GeoGebra-Linux-Portable-${version}.tar.bz2" "http://web.archive.org/https://download.geogebra.org/installers/5.0/GeoGebra-Linux-Portable-${version}.tar.bz2" ]; - sha256 = "0q6brg5rkl2gyyg9vhiilvb8zy23zlp4a1xcwnv501xzcccv0p37"; + sha256 = "0lj0k49sjsjqs716n74xbq6a4gids5903f5s6fhqyahrwyldhzrj"; }; srcIcon = fetchurl { |