2018-08-18 13:37:48 +02:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchurl
|
|
|
|
, optimize ? false # impure hardware optimizations
|
|
|
|
}:
|
2016-10-10 16:21:23 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "gf2x";
|
2018-08-18 13:37:48 +02:00
|
|
|
version = "1.2"; # remember to also update the url
|
2017-03-02 23:21:47 +01:00
|
|
|
|
2016-10-10 16:21:23 +02:00
|
|
|
src = fetchurl {
|
2018-07-08 22:52:33 +02:00
|
|
|
# find link to latest version (with file id) here: https://gforge.inria.fr/projects/gf2x/
|
2018-08-18 13:37:48 +02:00
|
|
|
# Requested a predictable link:
|
|
|
|
# https://gforge.inria.fr/tracker/index.php?func=detail&aid=21704&group_id=1874&atid=6982
|
|
|
|
url = "https://gforge.inria.fr/frs/download.php/file/36934/gf2x-${version}.tar.gz";
|
2018-07-08 22:52:33 +02:00
|
|
|
sha256 = "0d6vh1mxskvv3bxl6byp7gxxw3zzpkldrxnyajhnl05m0gx7yhk1";
|
2016-10-10 16:21:23 +02:00
|
|
|
};
|
2017-03-02 23:21:47 +01:00
|
|
|
|
2018-08-18 13:37:48 +02:00
|
|
|
# no actual checks present yet (as of 1.2), but can't hurt trying
|
|
|
|
# for an indirect test, run ntl's test suite
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
configureFlags = lib.optionals (!optimize) [
|
|
|
|
"--disable-hardware-specific-code"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2016-10-10 16:21:23 +02:00
|
|
|
description = ''Routines for fast arithmetic in GF(2)[x]'';
|
2018-07-08 22:52:33 +02:00
|
|
|
homepage = http://gf2x.gforge.inria.fr;
|
|
|
|
license = licenses.gpl2Plus;
|
2018-08-18 13:37:48 +02:00
|
|
|
maintainers = with maintainers; [ raskin timokau ];
|
2018-08-13 23:36:18 +02:00
|
|
|
platforms = platforms.unix;
|
2016-10-10 16:21:23 +02:00
|
|
|
};
|
|
|
|
}
|