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 "
2020-08-05 03:32:41 +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)
2020-08-05 03:32:41 +01: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 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 ;
2020-11-18 20:29:24 +00:00
maintainers = teams . sage . members ;
2019-09-25 10:29:19 +01:00
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
} ;
}