libwebm: init at 1.0.0.31

+74
+25
pkgs/by-name/li/libwebm/0001-cmake-exports.patch
··· 1 + diff --git a/CMakeLists.txt b/CMakeLists.txt 2 + index b0089ee..eb1b1c6 100644 3 + --- a/CMakeLists.txt 4 + +++ b/CMakeLists.txt 5 + @@ -459,13 +459,20 @@ endif() 6 + # webm_parser headers are rooted at webm/. 7 + set_target_properties(webm PROPERTIES PUBLIC_HEADER 8 + "${webm_parser_public_headers}") 9 + +target_include_directories(webm INTERFACE $<INSTALL_INTERFACE:include/webm>) 10 + install( 11 + TARGETS webm 12 + + EXPORT webmConfig 13 + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} 14 + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} 15 + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} 16 + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/webm) 17 + 18 + +install(EXPORT webmConfig 19 + + FILE webmConfig.cmake 20 + + NAMESPACE webm:: 21 + + DESTINATION lib/cmake/webm) 22 + + 23 + # Install common headers into a subdirectory to avoid breaking nested includes. 24 + install(FILES ${libwebm_common_public_headers} 25 + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/webm/common)
+49
pkgs/by-name/li/libwebm/package.nix
··· 1 + { 2 + lib, 3 + stdenv, 4 + fetchFromGitHub, 5 + cmake, 6 + nix-update-script, 7 + }: 8 + 9 + stdenv.mkDerivation (finalAttrs: { 10 + pname = "libwebm"; 11 + version = "1.0.0.31"; 12 + 13 + src = fetchFromGitHub { 14 + owner = "webmproject"; 15 + repo = "libwebm"; 16 + rev = "refs/tags/libwebm-${finalAttrs.version}"; 17 + hash = "sha256-+ayX33rcX/jkewsW8WrGalTe9X44qFBHOrIYTteOQzc="; 18 + }; 19 + 20 + patches = [ 21 + # libwebm does not generate cmake exports by default, 22 + # which are necessary to find and use it as build-dependency 23 + # in other packages 24 + ./0001-cmake-exports.patch 25 + ]; 26 + 27 + nativeBuildInputs = [ 28 + cmake 29 + ]; 30 + 31 + outputs = [ 32 + "dev" 33 + "out" 34 + ]; 35 + 36 + cmakeFlags = [ 37 + "-DBUILD_SHARED_LIBS=ON" 38 + ]; 39 + 40 + passthru.updateScript = nix-update-script { }; 41 + 42 + meta = { 43 + description = "WebM file parser"; 44 + homepage = "https://www.webmproject.org/code/"; 45 + license = lib.licenses.bsd3; 46 + maintainers = with lib.maintainers; [ niklaskorz ]; 47 + platforms = lib.platforms.all; 48 + }; 49 + })