depot/third_party/nixpkgs/pkgs/tools/security/dieharder/default.nix
Default email 7e47f3658e Project import generated by Copybara.
GitOrigin-RevId: 1925c603f17fc89f4c8f6bf6f631a802ad85d784
2024-09-26 11:04:55 +00:00

37 lines
1 KiB
Nix

{ lib, stdenv, fetchurl, gsl
, testers }:
stdenv.mkDerivation (finalAttrs: {
pname = "dieharder";
version = "3.31.1";
src = fetchurl {
url = "http://webhome.phy.duke.edu/~rgb/General/dieharder/dieharder-${finalAttrs.version}.tgz";
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";
buildInputs = [ gsl ];
passthru = {
tests.version = testers.testVersion { package = finalAttrs.finalPackage; };
};
meta = with lib; {
description = "Random Number Generator test suite";
mainProgram = "dieharder";
homepage = "https://webhome.phy.duke.edu/~rgb/General/dieharder.php";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ zhaofengli ];
platforms = platforms.unix;
};
})