3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/givaro/default.nix

46 lines
1.7 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, automake, autoconf, libtool, autoreconfHook, gmpxx }:
2016-10-10 15:31:38 +01:00
stdenv.mkDerivation rec {
pname = "givaro";
version = "4.1.1";
2016-10-10 15:31:38 +01:00
src = fetchFromGitHub {
owner = "linbox-team";
2019-09-09 00:38:31 +01:00
repo = pname;
2016-10-10 15:31:38 +01:00
rev = "v${version}";
sha256 = "11wz57q6ijsvfs5r82masxgr319as92syi78lnl9lgdblpc6xigk";
2016-10-10 15:31:38 +01:00
};
2018-08-14 01:13:40 +01:00
enableParallelBuilding = true;
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [autoconf automake libtool];
propagatedBuildInputs = [ gmpxx ];
2018-08-14 01:13:40 +01:00
2018-03-07 23:05:52 +00:00
configureFlags = [
"--disable-optimization"
] ++ stdenv.lib.optionals stdenv.isx86_64 [
2018-03-07 23:05:52 +00:00
# disable SIMD instructions (which are enabled *when available* by default)
"--${if stdenv.hostPlatform.sse3Support then "enable" else "disable"}-sse3"
"--${if stdenv.hostPlatform.ssse3Support then "enable" else "disable"}-ssse3"
"--${if stdenv.hostPlatform.sse4_1Support then "enable" else "disable"}-sse41"
"--${if stdenv.hostPlatform.sse4_2Support then "enable" else "disable"}-sse42"
"--${if stdenv.hostPlatform.avxSupport then "enable" else "disable"}-avx"
"--${if stdenv.hostPlatform.avx2Support then "enable" else "disable"}-avx2"
"--${if stdenv.hostPlatform.fmaSupport then "enable" else "disable"}-fma"
"--${if stdenv.hostPlatform.fma4Support then "enable" else "disable"}-fma4"
];
2018-08-14 01:13:40 +01:00
# On darwin, tests are linked to dylib in the nix store, so we need to make
# sure tests run after installPhase.
doInstallCheck = true;
installCheckTarget = "check";
doCheck = false;
2016-10-10 15:31:38 +01:00
meta = {
inherit version;
description = ''A C++ library for arithmetic and algebraic computations'';
license = stdenv.lib.licenses.cecill-b;
maintainers = [stdenv.lib.maintainers.raskin];
2018-08-14 01:13:40 +01:00
platforms = stdenv.lib.platforms.unix;
2016-10-10 15:31:38 +01:00
};
}