depot/third_party/nixpkgs/pkgs/development/libraries/xxHash/default.nix
Default email d5f4a57cbf Project import generated by Copybara.
GitOrigin-RevId: ce5e4a6ef2e59d89a971bc434ca8ca222b9c7f5e
2023-08-10 09:59:29 +02:00

43 lines
1.1 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, cmake
}:
stdenv.mkDerivation rec {
pname = "xxHash";
version = "0.8.2";
src = fetchFromGitHub {
owner = "Cyan4973";
repo = "xxHash";
rev = "v${version}";
hash = "sha256-kofPs01jb189LUjYHHt+KxDifZQWl0Hm779711mvWtI=";
};
nativeBuildInputs = [
cmake
];
# Using unofficial CMake build script to install CMake module files.
cmakeDir = "../cmake_unofficial";
cmakeFlags = [
"-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
];
meta = with lib; {
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).
'';
homepage = "https://github.com/Cyan4973/xxHash";
license = with licenses; [ bsd2 gpl2 ];
maintainers = with maintainers; [ orivej ];
platforms = platforms.all;
};
}