biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / tools / security / dieharder / default.nix
blobc7804f0c5f4dfc30048fc6fc3b556210bb3cb9c3
1 { lib, stdenv, fetchurl, gsl
2 , testers }:
4 stdenv.mkDerivation (finalAttrs: {
5   pname = "dieharder";
6   version = "3.31.1";
8   src = fetchurl {
9     url = "http://webhome.phy.duke.edu/~rgb/General/dieharder/dieharder-${finalAttrs.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   env.NIX_CFLAGS_COMPILE = "-fcommon";
23   buildInputs = [ gsl ];
25   passthru = {
26     tests.version = testers.testVersion { package = finalAttrs.finalPackage; };
27   };
29   meta = with lib; {
30     description = "Random Number Generator test suite";
31     mainProgram = "dieharder";
32     homepage = "https://webhome.phy.duke.edu/~rgb/General/dieharder.php";
33     license = licenses.gpl2Plus;
34     maintainers = with maintainers; [ zhaofengli ];
35     platforms = platforms.unix;
36   };