Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, stdenv 3, fetchFromGitHub 4, fixDarwinDylibNames 5, pkgsStatic 6, cmake 7}: 8stdenv.mkDerivation rec { 9 pname = "libdeflate"; 10 version = "1.18"; 11 12 src = fetchFromGitHub { 13 owner = "ebiggers"; 14 repo = "libdeflate"; 15 rev = "v${version}"; 16 sha256 = "sha256-dWSDAYn36GDtkghmouGhHzxpa6EVwCslIPqejlLMZNM="; 17 }; 18 19 cmakeFlags = lib.optionals stdenv.hostPlatform.isStatic [ "-DLIBDEFLATE_BUILD_SHARED_LIB=OFF" ]; 20 21 nativeBuildInputs = [ cmake ] 22 ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; 23 24 passthru.tests.static = pkgsStatic.libdeflate; 25 26 meta = with lib; { 27 description = "Fast DEFLATE/zlib/gzip compressor and decompressor"; 28 license = licenses.mit; 29 homepage = "https://github.com/ebiggers/libdeflate"; 30 changelog = "https://github.com/ebiggers/libdeflate/blob/v${version}/NEWS.md"; 31 platforms = platforms.unix; 32 maintainers = with maintainers; [ orivej kaction ]; 33 }; 34}