2020-03-27 11:50:45 -07:00
{ stdenv , fetchFromGitHub , autoreconfHook , givaro , pkgconfig , blas , lapack
2018-03-07 09:45:46 -08:00
, gmpxx
} :
2020-03-27 11:50:45 -07:00
2020-04-20 13:50:55 -07:00
assert ( ! blas . isILP64 ) && ( ! lapack . isILP64 ) ;
2020-03-27 11:50:45 -07:00
2016-10-12 00:29:48 -07:00
stdenv . mkDerivation rec {
pname = " f f l a s - f f p a c k " ;
2019-09-04 09:13:00 -07:00
version = " 2 . 4 . 3 " ;
2018-08-13 23:00:54 -07:00
2016-10-12 00:29:48 -07:00
src = fetchFromGitHub {
owner = " l i n b o x - t e a m " ;
2019-09-08 16:38:31 -07:00
repo = pname ;
rev = version ;
2019-09-04 09:13:00 -07: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 00:29:48 -07:00
} ;
2018-08-13 23:00:54 -07:00
2018-03-07 09:45:46 -08:00
checkInputs = [
gmpxx
] ;
2018-08-13 23:00:54 -07:00
enableParallelBuilding = true ;
2018-03-07 09:45:46 -08:00
nativeBuildInputs = [
autoreconfHook
pkgconfig
] ++ stdenv . lib . optionals doCheck checkInputs ;
2018-08-13 23:00:54 -07:00
2020-03-27 11:50:45 -07:00
buildInputs = [ givaro blas lapack ] ;
2018-08-13 23:00:54 -07:00
2018-03-07 09:45:46 -08:00
configureFlags = [
2020-03-27 11:50:45 -07: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 "
2020-08-04 19:32:41 -07:00
] ++ stdenv . lib . optionals stdenv . isx86_64 [
2018-03-07 09:45:46 -08:00
# disable SIMD instructions (which are enabled *when available* by default)
2019-09-25 02:21:43 -07: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)
2020-08-04 19:32:41 -07:00
" - - ${ if stdenv . hostPlatform . sse3Support then " e n a b l e " else " d i s a b l e " } - s s e 3 "
" - - ${ if stdenv . hostPlatform . ssse3Support then " e n a b l e " else " d i s a b l e " } - s s s e 3 "
" - - ${ if stdenv . hostPlatform . sse4_1Support then " e n a b l e " else " d i s a b l e " } - s s e 4 1 "
" - - ${ if stdenv . hostPlatform . sse4_2Support then " e n a b l e " else " d i s a b l e " } - s s e 4 2 "
" - - ${ if stdenv . hostPlatform . avxSupport then " e n a b l e " else " d i s a b l e " } - a v x "
" - - ${ if stdenv . hostPlatform . avx2Support then " e n a b l e " else " d i s a b l e " } - a v x 2 "
" - - ${ if stdenv . hostPlatform . avx512Support then " e n a b l e " else " d i s a b l e " } - a v x 5 1 2 f "
" - - ${ if stdenv . hostPlatform . avx512Support then " e n a b l e " else " d i s a b l e " } - a v x 5 1 2 d q "
" - - ${ if stdenv . hostPlatform . avx512Support then " e n a b l e " else " d i s a b l e " } - a v x 5 1 2 v l "
" - - ${ if stdenv . hostPlatform . fmaSupport then " e n a b l e " else " d i s a b l e " } - f m a "
" - - ${ if stdenv . hostPlatform . fma4Support then " e n a b l e " else " d i s a b l e " } - f m a 4 "
] ;
2018-03-07 09:45:46 -08:00
doCheck = true ;
2018-08-13 23:00:54 -07:00
2019-09-25 02:29:19 -07:00
meta = with stdenv . lib ; {
2016-10-12 00:29:48 -07: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 02:29:19 -07:00
license = licenses . lgpl21Plus ;
2020-11-18 12:29:24 -08:00
maintainers = teams . sage . members ;
2019-09-25 02:29:19 -07:00
platforms = platforms . unix ;
2020-03-31 18:11:51 -07: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 00:29:48 -07:00
} ;
}