nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenv, fetchzip }:
2
3stdenv.mkDerivation rec {
4 version = "0.94";
5 pname = "pcg-c";
6
7 src = fetchzip {
8 url = "http://www.pcg-random.org/downloads/${pname}-${version}.zip";
9 sha256 = "0smm811xbvs03a5nc2668zd0178wnyri2h023pqffy767bpy1vlv";
10 };
11
12 enableParallelBuilding = true;
13
14 patches = [
15 ./prefix-variable.patch
16 ];
17
18 preInstall = ''
19 sed -i s,/usr/local,$out, Makefile
20 mkdir -p $out/lib $out/include
21 '';
22
23 meta = {
24 description = "A family of better random number generators";
25 homepage = "https://www.pcg-random.org/";
26 license = lib.licenses.asl20;
27 longDescription = ''
28 PCG is a family of simple fast space-efficient statistically good
29 algorithms for random number generation. Unlike many general-purpose RNGs,
30 they are also hard to predict.
31 '';
32 platforms = lib.platforms.unix;
33 maintainers = [ lib.maintainers.linus ];
34 broken = stdenv.isi686; # https://github.com/imneme/pcg-c/issues/11
35 };
36}