2020-03-27 18:50:45 +00:00
{ stdenv , fetchFromGitHub , autoreconfHook , givaro , pkgconfig , blas , lapack
2018-03-07 17:45:46 +00:00
, gmpxx
} :
2020-03-27 18:50:45 +00:00
2020-04-20 21:50:55 +01:00
assert ( ! blas . isILP64 ) && ( ! lapack . isILP64 ) ;
2020-03-27 18:50:45 +00:00
2016-10-12 08:29:48 +01:00
stdenv . mkDerivation rec {
pname = " f f l a s - f f p a c k " ;
2019-09-04 17:13:00 +01:00
version = " 2 . 4 . 3 " ;
2018-08-14 07:00:54 +01:00
2016-10-12 08:29:48 +01:00
src = fetchFromGitHub {
owner = " l i n b o x - t e a m " ;
2019-09-09 00:38:31 +01:00
repo = pname ;
rev = version ;
2019-09-04 17:13:00 +01:00
sha256 = " 1 y n b j d 7 2 q r w p 0 b 4 k p n 0 p 5 d 7 g d d p v j 8 d l b 5 f w d x a j r 5 p v k v i 3 i f 7 4 " ;
2016-10-12 08:29:48 +01:00
} ;
2018-08-14 07:00:54 +01:00
2018-03-07 17:45:46 +00:00
checkInputs = [
gmpxx
] ;
2018-08-14 07:00:54 +01:00
enableParallelBuilding = true ;
2018-03-07 17:45:46 +00:00
nativeBuildInputs = [
autoreconfHook
pkgconfig
] ++ stdenv . lib . optionals doCheck checkInputs ;
2018-08-14 07:00:54 +01:00
2020-03-27 18:50:45 +00:00
buildInputs = [ givaro blas lapack ] ;
2018-08-14 07:00:54 +01:00
2018-03-07 17:45:46 +00:00
configureFlags = [
2020-03-27 18:50:45 +00:00
" - - w i t h - b l a s - l i b s = - l c b l a s "
" - - w i t h - l a p a c k - l i b s = - l l a p a c k e "
2019-04-21 18:06:50 +01:00
] ++ stdenv . lib . optionals stdenv . isx86_64 {
2018-03-07 17:45:46 +00:00
# disable SIMD instructions (which are enabled *when available* by default)
2019-09-25 10:21:43 +01:00
# for now we need to be careful to disable *all* relevant versions of an instruction set explicitly (https://github.com/linbox-team/fflas-ffpack/issues/284)
default = [ " - - d i s a b l e - s s e 3 " " - - d i s a b l e - s s s e 3 " " - - d i s a b l e - s s e 4 1 " " - - d i s a b l e - s s e 4 2 " " - - d i s a b l e - a v x " " - - d i s a b l e - a v x 2 " " - - d i s a b l e - a v x 5 1 2 f " " - - d i s a b l e - a v x 5 1 2 d q " " - - d i s a b l e - a v x 5 1 2 v l " " - - d i s a b l e - f m a " " - - d i s a b l e - f m a 4 " ] ;
westmere = [ " - - d i s a b l e - a v x " " - - d i s a b l e - a v x 2 " " - - d i s a b l e - a v x 5 1 2 f " " - - d i s a b l e - a v x 5 1 2 d q " " - - d i s a b l e - a v x 5 1 2 v l " " - - d i s a b l e - f m a " " - - d i s a b l e - f m a 4 " ] ;
sandybridge = [ " - - d i s a b l e - a v x 2 " " - - d i s a b l e - a v x 5 1 2 f " " - - d i s a b l e - a v x 5 1 2 d q " " - - d i s a b l e - a v x 5 1 2 v l " " - - d i s a b l e - f m a " " - - d i s a b l e - f m a 4 " ] ;
ivybridge = [ " - - d i s a b l e - a v x 2 " " - - d i s a b l e - a v x 5 1 2 f " " - - d i s a b l e - a v x 5 1 2 d q " " - - d i s a b l e - a v x 5 1 2 v l " " - - d i s a b l e - f m a " " - - d i s a b l e - f m a 4 " ] ;
haswell = [ " - - d i s a b l e - f m a 4 " ] ;
broadwell = [ " - - d i s a b l e - f m a 4 " ] ;
skylake = [ " - - d i s a b l e - f m a 4 " ] ;
skylake-avx512 = [ " - - d i s a b l e - f m a 4 " ] ;
2019-04-21 18:06:50 +01:00
} . ${ stdenv . hostPlatform . platform . gcc . arch or " d e f a u l t " } ;
2018-08-14 07:00:54 +01:00
2018-03-07 17:45:46 +00:00
doCheck = true ;
2018-08-14 07:00:54 +01:00
2019-09-25 10:29:19 +01:00
meta = with stdenv . lib ; {
2016-10-12 08:29:48 +01:00
inherit version ;
description = '' F i n i t e F i e l d L i n e a r A l g e b r a S u b r o u t i n e s '' ;
2019-09-25 10:29:19 +01:00
license = licenses . lgpl21Plus ;
maintainers = with maintainers ; [ raskin timokau ] ;
platforms = platforms . unix ;
2020-04-01 02:11:51 +01:00
homepage = " h t t p s : / / l i n b o x - t e a m . g i t h u b . i o / f f l a s - f f p a c k / " ;
2016-10-12 08:29:48 +01:00
} ;
}