diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libdeflate')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/libdeflate/default.nix | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libdeflate/default.nix b/nixpkgs/pkgs/development/libraries/libdeflate/default.nix new file mode 100644 index 000000000000..6494f16a876c --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/libdeflate/default.nix @@ -0,0 +1,34 @@ +{ 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 ]; + }; +} |