python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / tools / security / dieharder / default.nix
blobb85a5c39656ea1fd7dd9428e293ca575e6e39508
1 { lib, stdenv, fetchurl, gsl
2 , dieharder, testers }:
4 stdenv.mkDerivation rec {
5   pname = "dieharder";
6   version = "3.31.1";
8   src = fetchurl {
9     url = "http://webhome.phy.duke.edu/~rgb/General/dieharder/dieharder-${version}.tgz";
10     hash = "sha256-bP8P+DlMVTVJrHQzNZzPyVX7JnlCYDFGIN+l5M1Lcn8=";
11   };
13   patches = [
14     # Include missing stdint.h header
15     ./stdint.patch
16   ];
18   # Workaround build failure on -fno-common toolchains:
19   #   ld: include/dieharder/parse.h:21: multiple definition of `splitbuf';
20   #     include/dieharder/parse.h:21: first defined here
21   NIX_CFLAGS_COMPILE = "-fcommon";
23   buildInputs = [ gsl ];
25   passthru = {
26     tests.version = testers.testVersion { package = dieharder; };
27   };
29   meta = with lib; {
30     description = "A Random Number Generator test suite";
31     homepage = "https://webhome.phy.duke.edu/~rgb/General/dieharder.php";
32     license = licenses.gpl2Plus;
33     maintainers = with maintainers; [ zhaofengli ];
34     platforms = platforms.unix;
35   };