Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at netboot-syslinux-multiplatform 63 lines 1.8 kB view raw
1{ lib 2, stdenv 3, fetchFromGitHub 4, cmake 5, fetchpatch 6}: 7 8stdenv.mkDerivation rec { 9 pname = "xxHash"; 10 version = "0.8.1"; 11 12 src = fetchFromGitHub { 13 owner = "Cyan4973"; 14 repo = "xxHash"; 15 rev = "v${version}"; 16 sha256 = "sha256-2WoYCO6QRHWrbGP2mK04/sLNTyQLOuL3urVktilAwMA="; 17 }; 18 19 # CMake build fixes 20 patches = [ 21 # Merged in https://github.com/Cyan4973/xxHash/pull/649 22 # Should be present in next release 23 (fetchpatch { 24 name = "cmake-install-fix"; 25 url = "https://github.com/Cyan4973/xxHash/commit/636f966ecc713c84ddd3b7ccfde2bfb2cc7492a0.patch"; 26 sha256 = "sha256-B1PZ/0BXlOrSiPvgCPLvI/sjQvnR0n5PQHOO38LOij0="; 27 }) 28 29 # Submitted at https://github.com/Cyan4973/xxHash/pull/723 30 (fetchpatch { 31 name = "cmake-pkgconfig-fix"; 32 url = "https://github.com/Cyan4973/xxHash/commit/5db353bbd05ee5eb1f90afc08d10da9416154e55.patch"; 33 sha256 = "sha256-dElgSu9DVo2hY6TTVHLTtt0zkXmQV3nc9i/KbrDkK8s="; 34 }) 35 ]; 36 37 38 nativeBuildInputs = [ 39 cmake 40 ]; 41 42 # Using unofficial CMake build script to install CMake module files. 43 cmakeDir = "../cmake_unofficial"; 44 45 cmakeFlags = [ 46 "-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}" 47 ]; 48 49 meta = with lib; { 50 description = "Extremely fast hash algorithm"; 51 longDescription = '' 52 xxHash is an Extremely fast Hash algorithm, running at RAM speed limits. 53 It successfully completes the SMHasher test suite which evaluates 54 collision, dispersion and randomness qualities of hash functions. Code is 55 highly portable, and hashes are identical on all platforms (little / big 56 endian). 57 ''; 58 homepage = "https://github.com/Cyan4973/xxHash"; 59 license = with licenses; [ bsd2 gpl2 ]; 60 maintainers = with maintainers; [ orivej ]; 61 platforms = platforms.all; 62 }; 63}