depot/third_party/nixpkgs/pkgs/development/libraries/libdeflate/default.nix
Default email 87f9c27ba9 Project import generated by Copybara.
GitOrigin-RevId: fe2ecaf706a5907b5e54d979fbde4924d84b65fc
2023-04-12 14:48:02 +02:00

34 lines
933 B
Nix

{ lib
, stdenv
, fetchFromGitHub
, fixDarwinDylibNames
, pkgsStatic
, cmake
}:
stdenv.mkDerivation rec {
pname = "libdeflate";
version = "1.18";
src = fetchFromGitHub {
owner = "ebiggers";
repo = "libdeflate";
rev = "v${version}";
sha256 = "sha256-dWSDAYn36GDtkghmouGhHzxpa6EVwCslIPqejlLMZNM=";
};
cmakeFlags = lib.optionals stdenv.hostPlatform.isStatic [ "-DLIBDEFLATE_BUILD_SHARED_LIB=OFF" ];
nativeBuildInputs = [ cmake ]
++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
passthru.tests.static = pkgsStatic.libdeflate;
meta = with lib; {
description = "Fast DEFLATE/zlib/gzip compressor and decompressor";
license = licenses.mit;
homepage = "https://github.com/ebiggers/libdeflate";
changelog = "https://github.com/ebiggers/libdeflate/blob/v${version}/NEWS.md";
platforms = platforms.unix;
maintainers = with maintainers; [ orivej kaction ];
};
}