depot/third_party/nixpkgs/pkgs/development/libraries/xxHash/default.nix
Default email 60f07311b9 Project import generated by Copybara.
GitOrigin-RevId: f8e2ebd66d097614d51a56a755450d4ae1632df1
2024-02-06 17:22:34 -08:00

44 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 ];
mainProgram = "xxhsum";
maintainers = with maintainers; [ orivej ];
platforms = platforms.all;
};
}