nixpkgs/pkgs/tools/security/dieharder/default.nix

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

38 lines
1.0 KiB
Nix
Raw Normal View History

2022-05-06 07:22:46 +00:00
{ lib, stdenv, fetchurl, gsl
2024-09-17 01:32:56 +00:00
, testers }:
2022-05-06 07:22:46 +00:00
2024-09-17 01:32:56 +00:00
stdenv.mkDerivation (finalAttrs: {
2022-05-06 07:22:46 +00:00
pname = "dieharder";
version = "3.31.1";
src = fetchurl {
2024-09-17 01:32:56 +00:00
url = "http://webhome.phy.duke.edu/~rgb/General/dieharder/dieharder-${finalAttrs.version}.tgz";
2022-05-06 07:22:46 +00:00
hash = "sha256-bP8P+DlMVTVJrHQzNZzPyVX7JnlCYDFGIN+l5M1Lcn8=";
};
patches = [
# Include missing stdint.h header
./stdint.patch
];
# 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
env.NIX_CFLAGS_COMPILE = "-fcommon";
2022-05-06 07:22:46 +00:00
buildInputs = [ gsl ];
passthru = {
2024-09-17 01:32:56 +00:00
tests.version = testers.testVersion { package = finalAttrs.finalPackage; };
2022-05-06 07:22:46 +00:00
};
meta = with lib; {
description = "Random Number Generator test suite";
mainProgram = "dieharder";
2022-05-06 07:22:46 +00:00
homepage = "https://webhome.phy.duke.edu/~rgb/General/dieharder.php";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ zhaofengli ];
platforms = platforms.unix;
};
2024-09-17 01:32:56 +00:00
})