Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions pkgs/applications/science/math/singular/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{ stdenv, fetchurl, gmp, bison, perl, autoconf, ncurses, readline, coreutils, pkgconfig
, autoreconfHook
, file
, flint
, ntl
, cddlib
Expand All @@ -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"
Expand All @@ -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";
Expand Down