diff options
author | Robin Gloster <mail@glob.in> | 2016-08-12 09:46:53 +0000 |
---|---|---|
committer | Robin Gloster <mail@glob.in> | 2016-08-12 09:46:53 +0000 |
commit | b7787d932ec9cbd82ea6bc7c69d8df159b606fdc (patch) | |
tree | c4b6af2e6b49732ce5c6982cb8512ce9b7f1f34d /pkgs/applications/science/math | |
parent | bc025e83bd6c44df38851ef23da53359a0e62841 (diff) | |
parent | 532b2222965377e77ed884c463ee2751fb51dba3 (diff) | |
download | nixlib-b7787d932ec9cbd82ea6bc7c69d8df159b606fdc.tar nixlib-b7787d932ec9cbd82ea6bc7c69d8df159b606fdc.tar.gz nixlib-b7787d932ec9cbd82ea6bc7c69d8df159b606fdc.tar.bz2 nixlib-b7787d932ec9cbd82ea6bc7c69d8df159b606fdc.tar.lz nixlib-b7787d932ec9cbd82ea6bc7c69d8df159b606fdc.tar.xz nixlib-b7787d932ec9cbd82ea6bc7c69d8df159b606fdc.tar.zst nixlib-b7787d932ec9cbd82ea6bc7c69d8df159b606fdc.zip |
Merge remote-tracking branch 'upstream/master' into hardened-stdenv
Diffstat (limited to 'pkgs/applications/science/math')
-rw-r--r-- | pkgs/applications/science/math/LiE/default.nix | 4 | ||||
-rw-r--r-- | pkgs/applications/science/math/geogebra/default.nix | 58 | ||||
-rw-r--r-- | pkgs/applications/science/math/msieve/default.nix | 2 | ||||
-rw-r--r-- | pkgs/applications/science/math/pari/default.nix | 4 | ||||
-rw-r--r-- | pkgs/applications/science/math/ripser/default.nix | 65 |
5 files changed, 128 insertions, 5 deletions
diff --git a/pkgs/applications/science/math/LiE/default.nix b/pkgs/applications/science/math/LiE/default.nix index b448b5114212..515b7e272899 100644 --- a/pkgs/applications/science/math/LiE/default.nix +++ b/pkgs/applications/science/math/LiE/default.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation rec { version = "2.2.2"; # The current version of LiE is 2.2.2, which is more or less unchanged # since about the year 2000. Minor bugfixes do get applied now and then. - name = "LiE-${version}"; + name = "lie-${version}"; meta = { description = "A Computer algebra package for Lie group computations"; @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { characteristics, we refer to the following sources of information. ''; # take from the website - platforms = stdenv.lib.platforms.unix; + platforms = stdenv.lib.platforms.linux; maintainers = [ ]; # this package is probably not going to change anyway }; diff --git a/pkgs/applications/science/math/geogebra/default.nix b/pkgs/applications/science/math/geogebra/default.nix new file mode 100644 index 000000000000..fcbd13566657 --- /dev/null +++ b/pkgs/applications/science/math/geogebra/default.nix @@ -0,0 +1,58 @@ +{ stdenv, fetchurl, jre, makeDesktopItem, makeWrapper }: + +stdenv.mkDerivation rec { + name = "geogebra-${version}"; + version = "5.0.265.0"; + + preferLocalBuild = true; + + src = fetchurl { + url = "http://download.geogebra.org/installers/5.0/GeoGebra-Linux-Portable-${version}.tar.bz2"; + sha256 = "74e5abfa098ee0fc464cd391cd3ef6db474ff25e8ea4fbcd82c4b4b5d3d5c459"; + }; + + srcIcon = fetchurl { + url = "http://static.geogebra.org/images/geogebra-logo.svg"; + sha256 = "55ded6b5ec9ad382494f858d8ab5def0ed6c7d529481cd212863b2edde3b5e07"; + }; + + desktopItem = makeDesktopItem { + name = "geogebra"; + exec = "geogebra"; + icon = "geogebra"; + desktopName = "Geogebra"; + genericName = "Geogebra"; + comment = meta.description; + categories = "Education;Science;Math;"; + mimeType = "application/vnd.geogebra.file;application/vnd.geogebra.tool;"; + }; + + buildInputs = [ makeWrapper ]; + + installPhase = '' + install -D geogebra/* -t "$out/libexec/geogebra/" + + makeWrapper "$out/libexec/geogebra/geogebra" "$out/bin/geogebra" \ + --set JAVACMD "${jre}/bin/java" \ + --set GG_PATH "$out/libexec/geogebra" + + install -Dm644 "${desktopItem}/share/applications/"* \ + -t $out/share/applications/ + + install -Dm644 "${srcIcon}" \ + "$out/share/icons/hicolor/scalable/apps/geogebra.svg" + ''; + + meta = with stdenv.lib; { + description = "Dynamic mathematics software with graphics, algebra and spreadsheets"; + longDescription = '' + Dynamic mathematics software for all levels of education that brings + together geometry, algebra, spreadsheets, graphing, statistics and + calculus in one easy-to-use package. + ''; + homepage = https://www.geogebra.org/; + license = with licenses; [ gpl3 cc-by-nc-sa-30 geogebra ]; + platforms = platforms.all; + hydraPlatforms = []; + }; +} diff --git a/pkgs/applications/science/math/msieve/default.nix b/pkgs/applications/science/math/msieve/default.nix index e01b9654711b..4c99b5081cc5 100644 --- a/pkgs/applications/science/math/msieve/default.nix +++ b/pkgs/applications/science/math/msieve/default.nix @@ -24,6 +24,6 @@ stdenv.mkDerivation { license = stdenv.lib.licenses.publicDomain; homepage = http://msieve.sourceforge.net/; maintainers = [ stdenv.lib.maintainers.roconnor ]; - platforms = stdenv.lib.platforms.linux; + platforms = [ "x86_64-linux" ]; }; } diff --git a/pkgs/applications/science/math/pari/default.nix b/pkgs/applications/science/math/pari/default.nix index da10e89855ae..0cda65b32c30 100644 --- a/pkgs/applications/science/math/pari/default.nix +++ b/pkgs/applications/science/math/pari/default.nix @@ -1,12 +1,12 @@ { stdenv, fetchurl, gmp, readline }: stdenv.mkDerivation rec { - version = "2.7.5"; + version = "2.7.6"; name = "pari-${version}"; src = fetchurl { url = "http://pari.math.u-bordeaux.fr/pub/pari/unix/${name}.tar.gz"; - sha256 = "0c8l83a0gjq73r9hndsrzkypwxvnnm4pxkkzbg6jm95m80nzwh11"; + sha256 = "04dqi697czd8mmw8aiwzrkgbvkjassqagg6lfy3lkf1k5qi9g9rr"; }; buildInputs = [gmp readline]; diff --git a/pkgs/applications/science/math/ripser/default.nix b/pkgs/applications/science/math/ripser/default.nix new file mode 100644 index 000000000000..7f94b7408a11 --- /dev/null +++ b/pkgs/applications/science/math/ripser/default.nix @@ -0,0 +1,65 @@ +{ stdenv, fetchurl, fetchFromGitHub +, assembleReductionMatrix ? false +, useCoefficients ? false +, indicateProgress ? false +, useGoogleHashmap ? false, sparsehash ? null +, fileFormat ? "lowerTriangularCsv" +}: + +with stdenv.lib; + +assert elem fileFormat ["lowerTriangularCsv" "upperTriangularCsv" "dipha"]; +assert useGoogleHashmap -> sparsehash != null; + +let + inherit (stdenv.lib) optional; +in +stdenv.mkDerivation { + name = "ripser"; + version = "1.0"; + + src = fetchFromGitHub { + owner = "Ripser"; + repo = "ripser"; + rev = "f69c6af6ca6883dd518c48faf41cf8901c379598"; + sha256 = "1mw2898s7l29hgajsaf75bs9bjn2sn4g2mvmh41a602jpwp9r0rz"; + }; + + #Patch from dev branch to make compilation work. + #Will be removed when it gets merged into master. + patches = [(fetchurl { + url = https://github.com/Ripser/ripser/commit/dc78d8ce73ee35f3828f0aad67a4e53620277ebf.patch; + sha256 = "1y93aqpqz8fm1cxxrf90dhh67im3ndkr8dnxgbw5y96296n4r924"; + })]; + + buildInputs = optional useGoogleHashmap sparsehash; + + buildFlags = [ + "-std=c++11" + "-Ofast" + "-D NDEBUG" + ] + ++ optional assembleReductionMatrix "-D ASSEMBLE_REDUCTION_MATRIX" + ++ optional useCoefficients "-D USE_COEFFICIENTS" + ++ optional indicateProgress "-D INDICATE_PROGRESS" + ++ optional useGoogleHashmap "-D USE_GOOGLE_HASHMAP" + ++ optional (fileFormat == "lowerTriangularCsv") "-D FILE_FORMAT_LOWER_TRIANGULAR_CSV" + ++ optional (fileFormat == "upperTriangularCsv") "-D FILE_FORMAT_UPPER_TRIANGULAR_CSV" + ++ optional (fileFormat == "dipha") "-D FILE_FORMAT_DIPHA" + ; + + buildPhase = "c++ ripser.cpp -o ripser $buildFlags"; + + installPhase = '' + mkdir -p $out/bin + cp ripser $out/bin + ''; + + meta = { + description = "A lean C++ code for the computation of Vietoris–Rips persistence barcodes"; + homepage = "https://github.com/Ripser/ripser"; + license = stdenv.lib.licenses.lgpl3; + maintainers = with stdenv.lib.maintainers; [erikryb]; + platforms = stdenv.lib.platforms.linux; + }; +} |