2018-08-18 11:37:48 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2023-09-03 10:47:19 +00:00
|
|
|
, fetchFromGitLab
|
2023-11-03 17:36:58 +00:00
|
|
|
, fetchpatch
|
2020-01-02 16:24:11 +00:00
|
|
|
, autoreconfHook
|
2022-12-29 08:11:38 +00:00
|
|
|
, buildPackages
|
2018-08-18 11:37:48 +00:00
|
|
|
, 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";
|
2020-01-02 16:24:11 +00:00
|
|
|
version = "1.3.0";
|
2017-03-02 22:21:47 +00:00
|
|
|
|
2023-09-03 10:47:19 +00:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.inria.fr";
|
|
|
|
owner = "gf2x";
|
|
|
|
repo = pname;
|
|
|
|
rev = "${pname}-${version}";
|
2020-01-02 16:24:11 +00:00
|
|
|
sha256 = "04g5jg0i4vz46b4w2dvbmahwzi3k6b8g515mfw7im1inc78s14id";
|
2016-10-10 14:21:23 +00:00
|
|
|
};
|
2017-03-02 22:21:47 +00:00
|
|
|
|
2023-11-03 17:36:58 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "gf2x-1.3.0-configure-clang16.patch";
|
|
|
|
url = "https://gitlab.inria.fr/gf2x/gf2x/-/commit/a2f0fd388c12ca0b9f4525c6cfbc515418dcbaf8.diff";
|
|
|
|
hash = "sha256-Aj2KzWZMR24S04IbPOBPwacCU4rEiB+FFWxtRuF50LA=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2022-12-29 08:11:38 +00:00
|
|
|
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
|
|
|
|
2020-01-02 16:24:11 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
];
|
|
|
|
|
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; {
|
2021-01-16 04:20:42 +00:00
|
|
|
description = "Routines for fast arithmetic in GF(2)[x]";
|
2021-12-28 17:04:33 +00:00
|
|
|
homepage = "https://gitlab.inria.fr/gf2x/gf2x/";
|
2018-07-08 20:52:33 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2020-11-18 20:29:24 +00:00
|
|
|
maintainers = teams.sage.members;
|
2018-08-13 21:36:18 +00:00
|
|
|
platforms = platforms.unix;
|
2016-10-10 14:21:23 +00:00
|
|
|
};
|
|
|
|
}
|