nixpkgs/pkgs/development/libraries/givaro/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
1.7 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, automake, autoconf, libtool, autoreconfHook, gmpxx }:
2016-10-10 14:31:38 +00:00
stdenv.mkDerivation rec {
pname = "givaro";
2021-12-28 22:48:53 +00:00
version = "4.2.0";
2016-10-10 14:31:38 +00:00
src = fetchFromGitHub {
owner = "linbox-team";
2019-09-08 23:38:31 +00:00
repo = pname;
2016-10-10 14:31:38 +00:00
rev = "v${version}";
2021-12-28 22:48:53 +00:00
sha256 = "sha256-KR0WJc0CSvaBnPRott4hQJhWNBb/Wi6MIhcTExtVobQ=";
2016-10-10 14:31:38 +00:00
};
2018-08-14 00:13:40 +00:00
enableParallelBuilding = true;
nativeBuildInputs = [ autoreconfHook autoconf automake ];
buildInputs = [libtool];
propagatedBuildInputs = [ gmpxx ];
2018-08-14 00:13:40 +00:00
2018-03-07 23:05:52 +00:00
configureFlags = [
"--disable-optimization"
] ++ 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 00:13:40 +00: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 14:31:38 +00:00
meta = {
description = "A C++ library for arithmetic and algebraic computations";
license = lib.licenses.cecill-b;
maintainers = [lib.maintainers.raskin];
platforms = lib.platforms.unix;
2016-10-10 14:31:38 +00:00
};
}