forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request NixOS#45299 from timokau/gf2x-purity
gf2x: disable hardware-specific code
- Loading branch information
Showing
1 changed file
with
19 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,33 @@ | ||
{stdenv, fetchurl}: | ||
{ stdenv | ||
, lib | ||
, fetchurl | ||
, optimize ? false # impure hardware optimizations | ||
}: | ||
stdenv.mkDerivation rec { | ||
name = "gf2x-${version}"; | ||
version = "1.2"; | ||
version = "1.2"; # remember to also update the url | ||
|
||
src = fetchurl { | ||
# find link to latest version (with file id) here: https://gforge.inria.fr/projects/gf2x/ | ||
url = "https://gforge.inria.fr/frs/download.php/file/36934/gf2x-1.2.tar.gz"; | ||
# 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"; | ||
sha256 = "0d6vh1mxskvv3bxl6byp7gxxw3zzpkldrxnyajhnl05m0gx7yhk1"; | ||
}; | ||
|
||
meta = with stdenv.lib; { | ||
# 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]''; | ||
homepage = http://gf2x.gforge.inria.fr; | ||
license = licenses.gpl2Plus; | ||
maintainers = with maintainers; [ raskin ]; | ||
maintainers = with maintainers; [ raskin timokau ]; | ||
platforms = platforms.unix; | ||
}; | ||
} |