2018-08-18 12:37:48 +01:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2020-01-02 16:24:11 +00:00
|
|
|
, fetchgit
|
|
|
|
, autoreconfHook
|
2018-08-18 12:37:48 +01:00
|
|
|
, optimize ? false # impure hardware optimizations
|
|
|
|
}:
|
2016-10-10 15:21:23 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "gf2x";
|
2020-01-02 16:24:11 +00:00
|
|
|
version = "1.3.0";
|
2017-03-02 22:21:47 +00:00
|
|
|
|
2020-01-02 16:24:11 +00:00
|
|
|
# upstream has plans to move to gitlab:
|
|
|
|
# https://github.com/NixOS/nixpkgs/pull/45299#issuecomment-564477936
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://scm.gforge.inria.fr/anonscm/git/gf2x/gf2x.git";
|
|
|
|
rev = "gf2x-${version}";
|
|
|
|
sha256 = "04g5jg0i4vz46b4w2dvbmahwzi3k6b8g515mfw7im1inc78s14id";
|
2016-10-10 15:21:23 +01:00
|
|
|
};
|
2017-03-02 22:21:47 +00:00
|
|
|
|
2020-01-02 16:24:11 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
];
|
|
|
|
|
2018-08-18 12:37:48 +01: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; {
|
2021-01-16 04:20:42 +00:00
|
|
|
description = "Routines for fast arithmetic in GF(2)[x]";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://gf2x.gforge.inria.fr";
|
2018-07-08 21:52:33 +01:00
|
|
|
license = licenses.gpl2Plus;
|
2020-11-18 20:29:24 +00:00
|
|
|
maintainers = teams.sage.members;
|
2018-08-13 22:36:18 +01:00
|
|
|
platforms = platforms.unix;
|
2016-10-10 15:21:23 +01:00
|
|
|
};
|
|
|
|
}
|