2018-08-14 06:00:54 +00:00
{ stdenv , fetchFromGitHub , autoreconfHook , givaro , pkgconfig , blas
2018-03-07 17:45:46 +00:00
, gmpxx
} :
2016-10-12 07:29:48 +00:00
stdenv . mkDerivation rec {
pname = " f f l a s - f f p a c k " ;
2019-09-04 16:13:00 +00:00
version = " 2 . 4 . 3 " ;
2018-08-14 06:00:54 +00:00
2016-10-12 07:29:48 +00:00
src = fetchFromGitHub {
owner = " l i n b o x - t e a m " ;
2019-09-08 23:38:31 +00:00
repo = pname ;
rev = version ;
2019-09-04 16:13:00 +00: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 07:29:48 +00:00
} ;
2018-08-14 06:00:54 +00:00
2018-03-07 17:45:46 +00:00
checkInputs = [
gmpxx
] ;
2018-08-14 06:00:54 +00:00
enableParallelBuilding = true ;
2018-03-07 17:45:46 +00:00
nativeBuildInputs = [
autoreconfHook
pkgconfig
] ++ stdenv . lib . optionals doCheck checkInputs ;
2018-08-14 06:00:54 +00:00
buildInputs = [ givaro blas ] ;
2018-03-07 17:45:46 +00:00
configureFlags = [
2018-08-14 06:00:54 +00:00
" - - w i t h - b l a s - l i b s = - l ${ blas . linkName } "
" - - w i t h - l a p a c k - l i b s = - l ${ blas . linkName } "
2019-04-21 17:06:50 +00: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 09:21:43 +00: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 17:06:50 +00:00
} . ${ stdenv . hostPlatform . platform . gcc . arch or " d e f a u l t " } ;
2018-08-14 06:00:54 +00:00
2018-03-07 17:45:46 +00:00
doCheck = true ;
2018-08-14 06:00:54 +00:00
2019-09-25 09:29:19 +00:00
meta = with stdenv . lib ; {
2016-10-12 07:29:48 +00: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 09:29:19 +00:00
license = licenses . lgpl21Plus ;
maintainers = with maintainers ; [ raskin timokau ] ;
platforms = platforms . unix ;
2020-04-01 01:11:51 +00: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 07:29:48 +00:00
} ;
}