summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorTimo Kaufmann <timokau@zoho.com>2018-04-23 16:28:25 +0200
committerTimo Kaufmann <timokau@zoho.com>2018-04-24 12:04:28 +0200
commitba389086de2fbd69866445460b7e80496a70c071 (patch)
treeca0ba116a699a1066a6facd78d29a6a78de2e265 /pkgs/applications
parent7c3dc2f53fc837be79426f11c9133f73d15a05c4 (diff)
downloadnixlib-ba389086de2fbd69866445460b7e80496a70c071.tar
nixlib-ba389086de2fbd69866445460b7e80496a70c071.tar.gz
nixlib-ba389086de2fbd69866445460b7e80496a70c071.tar.bz2
nixlib-ba389086de2fbd69866445460b7e80496a70c071.tar.lz
nixlib-ba389086de2fbd69866445460b7e80496a70c071.tar.xz
nixlib-ba389086de2fbd69866445460b7e80496a70c071.tar.zst
nixlib-ba389086de2fbd69866445460b7e80496a70c071.zip
singular: Fix ntl dependency
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/science/math/singular/default.nix21
1 files changed, 16 insertions, 5 deletions
diff --git a/pkgs/applications/science/math/singular/default.nix b/pkgs/applications/science/math/singular/default.nix
index 882d481a7f98..cec1a831c912 100644
--- a/pkgs/applications/science/math/singular/default.nix
+++ b/pkgs/applications/science/math/singular/default.nix
@@ -1,5 +1,6 @@
 { stdenv, fetchurl, gmp, bison, perl, autoconf, ncurses, readline, coreutils, pkgconfig
 , autoreconfHook
+, file
 , flint
 , ntl
 , cddlib
@@ -18,7 +19,9 @@ stdenv.mkDerivation rec {
     sha256 = "0wvgz7l1b7zkpmim0r3mvv4fp8xnhlbz4c7hc90rn30snlansnf1";
   };
 
-  configureFlags = stdenv.lib.optionals enableFactory [
+  configureFlags = [
+    "--with-ntl=${ntl}"
+  ] ++stdenv.lib.optionals enableFactory [
     "--enable-factory"
   ] ++ stdenv.lib.optionals enableGfanlib [
     "--enable-gfanlib"
@@ -42,11 +45,19 @@ stdenv.mkDerivation rec {
   ] ++ stdenv.lib.optionals enableGfanlib [
     cddlib
   ];
-  nativeBuildInputs = [ autoconf bison perl pkgconfig autoreconfHook ];
+  nativeBuildInputs = [
+    bison
+    perl
+    pkgconfig
+    autoreconfHook
+  ];
 
-  preConfigure = ''
-    find . -type f -exec sed -e 's@/bin/rm@${coreutils}&@g' -i '{}' ';'
-    find . -type f -exec sed -e 's@/bin/uname@${coreutils}&@g' -i '{}' ';'
+  preAutoreconf = ''
+    find . -type f -readable -writable -exec sed \
+      -e 's@/bin/rm@${coreutils}&@g' \
+      -e 's@/bin/uname@${coreutils}&@g' \
+      -e 's@/usr/bin/file@${file}/bin/file@g' \
+      -i '{}' ';'
   '';
 
   hardeningDisable = stdenv.lib.optional stdenv.isi686 "stackprotector";