about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/misc/ent
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/misc/ent')
-rw-r--r--nixpkgs/pkgs/tools/misc/ent/default.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/misc/ent/default.nix b/nixpkgs/pkgs/tools/misc/ent/default.nix
new file mode 100644
index 000000000000..b0dc4f1e3df9
--- /dev/null
+++ b/nixpkgs/pkgs/tools/misc/ent/default.nix
@@ -0,0 +1,30 @@
+{lib, stdenv, fetchurl, unzip}:
+
+stdenv.mkDerivation {
+  name = "ent-1.1";
+
+  src = fetchurl {
+    url = "https://www.fourmilab.ch/random/random.zip";
+    sha256 = "1v39jlj3lzr5f99avzs2j2z6anqqd64bzm1pdf6q84a5n8nxckn1";
+  };
+
+  # Work around the "unpacker appears to have produced no directories"
+  # case that happens when the archive doesn't have a subdirectory.
+  setSourceRoot = "sourceRoot=`pwd`";
+
+  nativeBuildInputs = [ unzip ];
+
+  buildFlags = lib.optional stdenv.cc.isClang "CC=clang";
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp ent $out/bin/
+  '';
+
+  meta = with lib; {
+    description = "Pseudorandom Number Sequence Test Program";
+    homepage = "http://www.fourmilab.ch/random/";
+    platforms = platforms.all;
+    license = licenses.publicDomain;
+  };
+}