nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05-pre 39 lines 1.3 kB view raw
1{ lib, stdenv, fetchFromGitHub }: 2 3stdenv.mkDerivation rec { 4 pname = "xxHash"; 5 version = "0.8.0"; 6 7 src = fetchFromGitHub { 8 owner = "Cyan4973"; 9 repo = "xxHash"; 10 rev = "v${version}"; 11 sha256 = "0hpbzdd6kfki5f61g103vp7pfczqkdj0js63avl0ss552jfb8h96"; 12 }; 13 14 # Upstream Makefile does not anticipate that user may not want to 15 # build .so library. 16 postPatch = lib.optionalString stdenv.hostPlatform.isStatic '' 17 sed -i 's/lib: libxxhash.a libxxhash/lib: libxxhash.a/' Makefile 18 sed -i '/LIBXXH) $(DESTDIR/ d' Makefile 19 ''; 20 21 outputs = [ "out" "dev" ]; 22 23 makeFlags = [ "PREFIX=$(dev)" "EXEC_PREFIX=$(out)" ]; 24 25 meta = with lib; { 26 description = "Extremely fast hash algorithm"; 27 longDescription = '' 28 xxHash is an Extremely fast Hash algorithm, running at RAM speed limits. 29 It successfully completes the SMHasher test suite which evaluates 30 collision, dispersion and randomness qualities of hash functions. Code is 31 highly portable, and hashes are identical on all platforms (little / big 32 endian). 33 ''; 34 homepage = "https://github.com/Cyan4973/xxHash"; 35 license = with licenses; [ bsd2 gpl2 ]; 36 maintainers = with maintainers; [ orivej ]; 37 platforms = platforms.unix; 38 }; 39}