2018-08-18 11:37:48 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchurl
|
|
|
|
, optimize ? false # impure hardware optimizations
|
|
|
|
}:
|
2016-10-10 14:21:23 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "gf2x";
|
2018-08-18 11:37:48 +00:00
|
|
|
version = "1.2"; # remember to also update the url
|
2017-03-02 22:21:47 +00:00
|
|
|
|
2016-10-10 14:21:23 +00:00
|
|
|
src = fetchurl {
|
2018-07-08 20:52:33 +00:00
|
|
|
# find link to latest version (with file id) here: https://gforge.inria.fr/projects/gf2x/
|
2018-08-18 11:37:48 +00: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 20:52:33 +00:00
|
|
|
sha256 = "0d6vh1mxskvv3bxl6byp7gxxw3zzpkldrxnyajhnl05m0gx7yhk1";
|
2016-10-10 14:21:23 +00:00
|
|
|
};
|
2017-03-02 22:21:47 +00:00
|
|
|
|
2018-08-18 11:37:48 +00: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 14:21:23 +00:00
|
|
|
description = ''Routines for fast arithmetic in GF(2)[x]'';
|
2018-07-08 20:52:33 +00:00
|
|
|
homepage = http://gf2x.gforge.inria.fr;
|
|
|
|
license = licenses.gpl2Plus;
|
2018-08-18 11:37:48 +00:00
|
|
|
maintainers = with maintainers; [ raskin timokau ];
|
2018-08-13 21:36:18 +00:00
|
|
|
platforms = platforms.unix;
|
2016-10-10 14:21:23 +00:00
|
|
|
};
|
|
|
|
}
|