nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchurl,
5 unzip,
6}:
7
8stdenv.mkDerivation {
9 pname = "ent";
10 version = "1.1";
11
12 src = fetchurl {
13 url = "https://www.fourmilab.ch/random/random.zip";
14 sha256 = "1v39jlj3lzr5f99avzs2j2z6anqqd64bzm1pdf6q84a5n8nxckn1";
15 };
16
17 # Work around the "unpacker appears to have produced no directories"
18 # case that happens when the archive doesn't have a subdirectory.
19 sourceRoot = ".";
20
21 nativeBuildInputs = [ unzip ];
22
23 buildFlags = lib.optional stdenv.cc.isClang "CC=clang";
24
25 installPhase = ''
26 mkdir -p $out/bin
27 cp ent $out/bin/
28 '';
29
30 meta = with lib; {
31 description = "Pseudorandom Number Sequence Test Program";
32 homepage = "https://www.fourmilab.ch/random/";
33 platforms = platforms.all;
34 license = licenses.publicDomain;
35 mainProgram = "ent";
36 };
37}