diff options
author | Arseniy Seroka <jagajaga@users.noreply.github.com> | 2015-04-27 00:57:59 +0300 |
---|---|---|
committer | Arseniy Seroka <jagajaga@users.noreply.github.com> | 2015-04-27 00:57:59 +0300 |
commit | f14242e9aaa784f7bdee3eaea26d758428dfdaa2 (patch) | |
tree | 879782ffe6d456c4ada3ec47b0aad13732f14a27 /pkgs | |
parent | 2cb3dc68120701406ac48d7a4da5ff097b092f85 (diff) | |
parent | e216a63c7d732035a4127b7ed8061318ff9fb1df (diff) | |
download | nixlib-f14242e9aaa784f7bdee3eaea26d758428dfdaa2.tar nixlib-f14242e9aaa784f7bdee3eaea26d758428dfdaa2.tar.gz nixlib-f14242e9aaa784f7bdee3eaea26d758428dfdaa2.tar.bz2 nixlib-f14242e9aaa784f7bdee3eaea26d758428dfdaa2.tar.lz nixlib-f14242e9aaa784f7bdee3eaea26d758428dfdaa2.tar.xz nixlib-f14242e9aaa784f7bdee3eaea26d758428dfdaa2.tar.zst nixlib-f14242e9aaa784f7bdee3eaea26d758428dfdaa2.zip |
Merge pull request #7576 from listx/pcg-c
pcg-c rng library
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/libraries/pcg-c/default.nix | 38 | ||||
-rw-r--r-- | pkgs/development/libraries/pcg-c/prefix-variable.patch | 15 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
3 files changed, 55 insertions, 0 deletions
diff --git a/pkgs/development/libraries/pcg-c/default.nix b/pkgs/development/libraries/pcg-c/default.nix new file mode 100644 index 000000000000..4b8cedd90c73 --- /dev/null +++ b/pkgs/development/libraries/pcg-c/default.nix @@ -0,0 +1,38 @@ +{ stdenv, fetchzip }: + +with stdenv.lib; + +stdenv.mkDerivation rec { + version = "0.94"; + name = "pcg-c-${version}"; + + src = fetchzip { + url = "http://www.pcg-random.org/downloads/${name}.zip"; + sha256 = "0smm811xbvs03a5nc2668zd0178wnyri2h023pqffy767bpy1vlv"; + }; + + enableParallelBuilding = true; + + patches = [ + ./prefix-variable.patch + ]; + + preInstall = '' + sed -i s,/usr/local,$out, Makefile + mkdir -p $out/lib $out/include + ''; + + meta = { + description = "A family of better random number generators"; + homepage = "http://www.pcg-random.org/"; + license = stdenv.lib.licenses.asl20; + longDescription = '' + PCG is a family of simple fast space-efficient statistically good + algorithms for random number generation. Unlike many general-purpose RNGs, + they are also hard to predict. + ''; + platforms = platforms.unix; + maintainers = [ maintainers.linus ]; + repositories.git = git://github.com/imneme/pcg-c.git; + }; +} diff --git a/pkgs/development/libraries/pcg-c/prefix-variable.patch b/pkgs/development/libraries/pcg-c/prefix-variable.patch new file mode 100644 index 000000000000..bfdcdfa7b17e --- /dev/null +++ b/pkgs/development/libraries/pcg-c/prefix-variable.patch @@ -0,0 +1,15 @@ +diff --git a/Makefile b/Makefile +index dddea44..fdb9401 100644 +--- a/Makefile ++++ b/Makefile +@@ -30,8 +30,8 @@ all: + PREFIX = /usr/local + + install: all +- install src/libpcg_random.a $PREFIX/lib +- install -m 0644 include/pcg_variants.h $PREFIX/include ++ install src/libpcg_random.a ${PREFIX}/lib ++ install -m 0644 include/pcg_variants.h ${PREFIX}/include + + test: all + cd test-low; $(MAKE) test diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 247e5db85469..c06e3ba114dc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7261,6 +7261,8 @@ let pangoxsl = callPackage ../development/libraries/pangoxsl { }; + pcg_c = callPackage ../development/libraries/pcg-c { }; + pcl = callPackage ../development/libraries/pcl { vtk = vtkWithQt4; }; |