2022-05-18 14:49:53 +00:00
|
|
|
{ lib, stdenv, fetchurl, gsl
|
|
|
|
, dieharder, testers }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "dieharder";
|
|
|
|
version = "3.31.1";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://webhome.phy.duke.edu/~rgb/General/dieharder/dieharder-${version}.tgz";
|
|
|
|
hash = "sha256-bP8P+DlMVTVJrHQzNZzPyVX7JnlCYDFGIN+l5M1Lcn8=";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
# Include missing stdint.h header
|
|
|
|
./stdint.patch
|
|
|
|
];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
# Workaround build failure on -fno-common toolchains:
|
|
|
|
# ld: include/dieharder/parse.h:21: multiple definition of `splitbuf';
|
|
|
|
# include/dieharder/parse.h:21: first defined here
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = "-fcommon";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
buildInputs = [ gsl ];
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
tests.version = testers.testVersion { package = dieharder; };
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A Random Number Generator test suite";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "dieharder";
|
2022-05-18 14:49:53 +00:00
|
|
|
homepage = "https://webhome.phy.duke.edu/~rgb/General/dieharder.php";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ zhaofengli ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|