nixpkgs/pkgs/development/libraries/xxHash/default.nix

40 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub }:
2017-10-20 04:57:45 +00:00
stdenv.mkDerivation rec {
pname = "xxHash";
2020-07-28 11:28:51 +00:00
version = "0.8.0";
2017-10-20 04:57:45 +00:00
src = fetchFromGitHub {
owner = "Cyan4973";
2019-02-24 19:19:08 +00:00
repo = "xxHash";
rev = "v${version}";
2020-07-28 11:28:51 +00:00
sha256 = "0hpbzdd6kfki5f61g103vp7pfczqkdj0js63avl0ss552jfb8h96";
2017-10-20 04:57:45 +00:00
};
# Upstream Makefile does not anticipate that user may not want to
# build .so library.
postPatch = lib.optionalString stdenv.hostPlatform.isStatic ''
sed -i 's/lib: libxxhash.a libxxhash/lib: libxxhash.a/' Makefile
sed -i '/LIBXXH) $(DESTDIR/ d' Makefile
'';
2017-10-20 04:57:45 +00:00
outputs = [ "out" "dev" ];
2020-07-28 11:28:51 +00:00
makeFlags = [ "PREFIX=$(dev)" "EXEC_PREFIX=$(out)" ];
2017-10-20 04:57:45 +00:00
meta = with lib; {
2017-10-20 04:57:45 +00:00
description = "Extremely fast hash algorithm";
longDescription = ''
xxHash is an Extremely fast Hash algorithm, running at RAM speed limits.
It successfully completes the SMHasher test suite which evaluates
collision, dispersion and randomness qualities of hash functions. Code is
highly portable, and hashes are identical on all platforms (little / big
endian).
'';
2020-03-06 02:26:57 +00:00
homepage = "https://github.com/Cyan4973/xxHash";
2017-10-20 04:57:45 +00:00
license = with licenses; [ bsd2 gpl2 ];
2019-03-15 20:10:37 +00:00
maintainers = with maintainers; [ orivej ];
2017-10-20 04:57:45 +00:00
platforms = platforms.unix;
};
}