nixpkgs/pkgs/development/libraries/gf2x/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

51 lines
1.2 KiB
Nix
Raw Normal View History

{ stdenv
, lib
2023-09-03 10:47:19 +00:00
, fetchFromGitLab
2023-11-03 17:36:58 +00:00
, fetchpatch
, autoreconfHook
2022-12-29 08:11:38 +00:00
, buildPackages
, optimize ? false # impure hardware optimizations
}:
2016-10-10 14:21:23 +00:00
stdenv.mkDerivation rec {
pname = "gf2x";
version = "1.3.0";
2023-09-03 10:47:19 +00:00
src = fetchFromGitLab {
domain = "gitlab.inria.fr";
owner = "gf2x";
repo = pname;
rev = "${pname}-${version}";
sha256 = "04g5jg0i4vz46b4w2dvbmahwzi3k6b8g515mfw7im1inc78s14id";
2016-10-10 14:21:23 +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 ];
nativeBuildInputs = [
autoreconfHook
];
# 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; {
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;
maintainers = teams.sage.members;
2018-08-13 21:36:18 +00:00
platforms = platforms.unix;
2016-10-10 14:21:23 +00:00
};
}