summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorTimo Kaufmann <timokau@zoho.com>2018-07-20 17:01:23 +0200
committerTimo Kaufmann <timokau@zoho.com>2018-07-23 12:17:25 +0200
commit024c23503cc5144dc94f6d75f0b4343c07fad3fd (patch)
tree4a41c3b112262fc7799a59464027b40078e6de03 /pkgs
parent102eb1fd29f1d5e8da664b4a2ad3737ad017351c (diff)
downloadnixlib-024c23503cc5144dc94f6d75f0b4343c07fad3fd.tar
nixlib-024c23503cc5144dc94f6d75f0b4343c07fad3fd.tar.gz
nixlib-024c23503cc5144dc94f6d75f0b4343c07fad3fd.tar.bz2
nixlib-024c23503cc5144dc94f6d75f0b4343c07fad3fd.tar.lz
nixlib-024c23503cc5144dc94f6d75f0b4343c07fad3fd.tar.xz
nixlib-024c23503cc5144dc94f6d75f0b4343c07fad3fd.tar.zst
nixlib-024c23503cc5144dc94f6d75f0b4343c07fad3fd.zip
singular: 4.1.1p1 -> 4.1.1p2
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/science/math/singular/default.nix38
1 files changed, 23 insertions, 15 deletions
diff --git a/pkgs/applications/science/math/singular/default.nix b/pkgs/applications/science/math/singular/default.nix
index 8be302f41e5e..98b75cd22d05 100644
--- a/pkgs/applications/science/math/singular/default.nix
+++ b/pkgs/applications/science/math/singular/default.nix
@@ -1,4 +1,5 @@
 { stdenv, fetchurl, gmp, bison, perl, ncurses, readline, coreutils, pkgconfig
+, lib
 , autoreconfHook
 , file
 , flint
@@ -9,21 +10,25 @@
 }:
 
 stdenv.mkDerivation rec {
-  name = "singular-${version}${patchVersion}";
-  version = "4.1.1";
-  patchVersion = "p1";
+  name = "singular-${version}";
+  version = "4.1.1p2";
 
-  urlVersion = builtins.replaceStrings [ "." ] [ "-" ] version;
-  src = fetchurl {
-    url = "http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/SOURCES/${urlVersion}/singular-${version}${patchVersion}.tar.gz";
-    sha256 = "0wvgz7l1b7zkpmim0r3mvv4fp8xnhlbz4c7hc90rn30snlansnf1";
+  src = let
+    # singular sorts its tarballs in directories by base release (without patch version)
+    # for example 4.1.1p1 will be in the directory 4-1-1
+    baseVersion = builtins.head (lib.splitString "p" version);
+    urlVersion = builtins.replaceStrings [ "." ] [ "-" ] baseVersion;
+  in
+  fetchurl {
+    url = "http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/SOURCES/${urlVersion}/singular-${version}.tar.gz";
+    sha256 = "07x9kri8vl4galik7lr6pscq3c51n8570pyw64i7gbj0m706f7wf";
   };
 
   configureFlags = [
     "--with-ntl=${ntl}"
-  ] ++stdenv.lib.optionals enableFactory [
+  ] ++ lib.optionals enableFactory [
     "--enable-factory"
-  ] ++ stdenv.lib.optionals enableGfanlib [
+  ] ++ lib.optionals enableGfanlib [
     "--enable-gfanlib"
   ];
 
@@ -42,7 +47,7 @@ stdenv.mkDerivation rec {
     readline
     ntl
     flint
-  ] ++ stdenv.lib.optionals enableGfanlib [
+  ] ++ lib.optionals enableGfanlib [
     cddlib
   ];
   nativeBuildInputs = [
@@ -60,10 +65,12 @@ stdenv.mkDerivation rec {
       -i '{}' ';'
   '';
 
-  hardeningDisable = stdenv.lib.optional stdenv.isi686 "stackprotector";
+  hardeningDisable = lib.optional stdenv.isi686 "stackprotector";
 
   # The Makefile actually defaults to `make install` anyway
-  buildPhase = "true;";
+  buildPhase = ''
+    # do nothing
+  '';
 
   installPhase = ''
     mkdir -p "$out"
@@ -77,7 +84,7 @@ stdenv.mkDerivation rec {
   # simple test to make sure singular starts and finds its libraries
   doInstallCheck = true;
   installCheckPhase = ''
-    $out/bin/Singular -c 'LIB "freegb.lib"; exit;'
+    "$out/bin/Singular" -c 'LIB "freegb.lib"; exit;'
     if [ $? -ne 0 ]; then
         echo >&2 "Error loading the freegb library in Singular."
         exit 1
@@ -86,9 +93,10 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A CAS for polynomial computations";
-    maintainers = with maintainers; [ raskin ];
+    maintainers = with maintainers; [ raskin timokau ];
+    # 32 bit x86 fails with some link error: `undefined reference to `__divmoddi4@GCC_7.0.0'`
     platforms = subtractLists platforms.i686 platforms.linux;
     license = licenses.gpl3; # Or GPLv2 at your option - but not GPLv4
     homepage = http://www.singular.uni-kl.de;