diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/video')
101 files changed, 1696 insertions, 887 deletions
diff --git a/nixpkgs/pkgs/applications/video/adl/default.nix b/nixpkgs/pkgs/applications/video/adl/default.nix new file mode 100644 index 000000000000..621f7246c8ab --- /dev/null +++ b/nixpkgs/pkgs/applications/video/adl/default.nix @@ -0,0 +1,43 @@ +{ lib, stdenv, fetchFromGitHub, pkgs, makeWrapper, ... }: + +stdenv.mkDerivation rec { + pname = "adl"; + version = "3.0.1"; + + src = fetchFromGitHub { + owner = "RaitaroH"; + repo = "adl"; + rev = "65f68e1dcae4c0caa52668d3a854269e7d226f7c"; + sha256 = "sha256-huGpDtkWrhZyKDNKXat8T3qtAyMjBaq8HFd1w1ThUVk="; + }; + + nativeBuildInputs = [ makeWrapper ]; + + # https://github.com/RaitaroH/adl#requirements + buildInputs = with pkgs; [ + anime-downloader + frece + fzf + mpv + perl + trackma + ueberzug + ]; + + dontBuild = true; + + installPhase = '' + mkdir -p $out/bin + cp $src/adl $out/bin + wrapProgram $out/bin/adl \ + --prefix PATH : ${lib.makeBinPath buildInputs} + ''; + + meta = with lib; { + homepage = "https://github.com/RaitaroH/adl"; + description = "popcorn anime-downloader + trackma wrapper"; + license = licenses.gpl3Plus; + platforms = platforms.linux; + maintainers = with maintainers; [ WeebSorceress ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/aegisub/default.nix b/nixpkgs/pkgs/applications/video/aegisub/default.nix index 133840e066bb..f83cbf69edb1 100644 --- a/nixpkgs/pkgs/applications/video/aegisub/default.nix +++ b/nixpkgs/pkgs/applications/video/aegisub/default.nix @@ -1,14 +1,18 @@ { lib , config , stdenv -, fetchurl -, fetchpatch +, fetchFromGitHub , boost +, cmake +, expat +, harfbuzz , ffmpeg , ffms , fftw , fontconfig , freetype +, fribidi +, glib , icu , intltool , libGL @@ -16,16 +20,24 @@ , libX11 , libass , libiconv +, libuchardet +, luajit +, pcre , pkg-config +, which , wxGTK , zlib +, CoreText +, CoreFoundation +, AppKit +, Carbon +, IOKit +, Cocoa + , spellcheckSupport ? true , hunspell ? null -, automationSupport ? true -, lua ? null - , openalSupport ? false , openal ? null @@ -37,83 +49,70 @@ , portaudioSupport ? false , portaudio ? null + +, useBundledLuaJIT ? false }: assert spellcheckSupport -> (hunspell != null); -assert automationSupport -> (lua != null); assert openalSupport -> (openal != null); assert alsaSupport -> (alsa-lib != null); assert pulseaudioSupport -> (libpulseaudio != null); assert portaudioSupport -> (portaudio != null); let + luajit52 = luajit.override { enable52Compat = true; }; inherit (lib) optional; in stdenv.mkDerivation rec { pname = "aegisub"; - version = "3.2.2"; + version = "3.3.3"; - src = fetchurl { - url = "http://ftp.aegisub.org/pub/releases/${pname}-${version}.tar.xz"; - hash = "sha256-xV4zlFuC2FE8AupueC8Ncscmrc03B+lbjAAi9hUeaIU="; + src = fetchFromGitHub { + owner = "wangqr"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-oKhLv81EFudrJaaJ2ga3pVh4W5Hd2YchpjsoYoqRm78="; }; - patches = [ - # Compatibility with ICU 59 - (fetchpatch { - url = "https://github.com/Aegisub/Aegisub/commit/dd67db47cb2203e7a14058e52549721f6ff16a49.patch"; - sha256 = "sha256-R2rN7EiyA5cuBYIAMpa0eKZJ3QZahfnRp8R4HyejGB8="; - }) - - # Compatbility with Boost 1.69 - (fetchpatch { - url = "https://github.com/Aegisub/Aegisub/commit/c3c446a8d6abc5127c9432387f50c5ad50012561.patch"; - sha256 = "sha256-7nlfojrb84A0DT82PqzxDaJfjIlg5BvWIBIgoqasHNk="; - }) - - # Compatbility with make 4.3 - (fetchpatch { - url = "https://github.com/Aegisub/Aegisub/commit/6bd3f4c26b8fc1f76a8b797fcee11e7611d59a39.patch"; - sha256 = "sha256-rG8RJokd4V4aSYOQw2utWnrWPVrkqSV3TAvnGXNhLOk="; - }) - - # Compatibility with ffms2 - (fetchpatch { - url = "https://github.com/Aegisub/Aegisub/commit/1aa9215e7fc360de05da9b7ec2cd68f1940af8b2.patch"; - sha256 = "sha256-JsuI4hQTcT0TEqHHoSsGbuiTg4hMCH3Cxp061oLk8Go="; - }) - - ./update-ffms2.patch - - # Compatibility with X11 - (fetchpatch { - url = "https://github.com/Aegisub/Aegisub/commit/7a6da26be6a830f4e1255091952cc0a1326a4520.patch"; - sha256 = "sha256-/aTcIjFlZY4N9+IyHL4nwR0hUR4HTJM7ibbdKmNxq0w="; - }) - ]; - nativeBuildInputs = [ intltool + luajit52 pkg-config + which + cmake ]; + buildInputs = [ boost + expat ffmpeg ffms fftw fontconfig freetype + fribidi + glib + harfbuzz icu libGL libGLU libX11 libass libiconv + libuchardet + pcre wxGTK zlib ] + ++ lib.optionals stdenv.isDarwin [ + CoreText + CoreFoundation + AppKit + Carbon + IOKit + Cocoa + ] ++ optional alsaSupport alsa-lib - ++ optional automationSupport lua ++ optional openalSupport openal ++ optional portaudioSupport portaudio ++ optional pulseaudioSupport libpulseaudio @@ -127,22 +126,23 @@ stdenv.mkDerivation rec { "relro" ]; - postPatch = '' - sed -i 's/-Wno-c++11-narrowing/-Wno-narrowing/' configure.ac src/Makefile - ''; - - # compat with icu61+ - # https://github.com/unicode-org/icu/blob/release-64-2/icu4c/readme.html#L554 - CXXFLAGS = [ "-DU_USING_ICU_NAMESPACE=1" ]; + patches = lib.optionals (!useBundledLuaJIT) [ + ./remove-bundled-luajit.patch + ]; - # this is fixed upstream though not yet in an officially released version, - # should be fine remove on next release (if one ever happens) - NIX_LDFLAGS = "-lpthread"; + NIX_CFLAGS_COMPILE = "-I${luajit52}/include"; + NIX_CFLAGS_LINK = "-L${luajit52}/lib"; - postInstall = "ln -s $out/bin/aegisub-* $out/bin/aegisub"; + configurePhase = '' + export FORCE_GIT_VERSION=${version} + # Workaround for a Nixpkgs bug; remove when the fix arrives + mkdir build-dir + cd build-dir + cmake -DCMAKE_INSTALL_PREFIX=$out .. + ''; meta = with lib; { - homepage = "https://github.com/Aegisub/Aegisub"; + homepage = "https://github.com/wangqr/Aegisub"; description = "An advanced subtitle editor"; longDescription = '' Aegisub is a free, cross-platform open source tool for creating and @@ -154,7 +154,6 @@ stdenv.mkDerivation rec { # softwares - so the resulting program will be GPL license = licenses.bsd3; maintainers = [ maintainers.AndersonTorres ]; - platforms = [ "i686-linux" "x86_64-linux" ]; + platforms = platforms.unix; }; } -# TODO [ AndersonTorres ]: update to fork release diff --git a/nixpkgs/pkgs/applications/video/aegisub/remove-bundled-luajit.patch b/nixpkgs/pkgs/applications/video/aegisub/remove-bundled-luajit.patch new file mode 100644 index 000000000000..d2b7dd0b5755 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/aegisub/remove-bundled-luajit.patch @@ -0,0 +1,271 @@ +diff --git a/CMakeLists.test.txt b/CMakeLists.test.txt +index 4d1a03177..62fab05c9 100644 +--- a/CMakeLists.test.txt ++++ b/CMakeLists.test.txt +@@ -2,7 +2,7 @@ if(UNIX) + add_executable(aegisub-lua EXCLUDE_FROM_ALL + automation/tests/aegisub.cpp + ) +- target_link_libraries(aegisub-lua PRIVATE libaegisub luabins luajit "Boost::locale" "ICU::in") ++ target_link_libraries(aegisub-lua PRIVATE libaegisub luabins luajit-5.1 "Boost::locale" "ICU::in") + add_custom_target(test-automation + COMMAND sh -c "$(luarocks path); ${PROJECT_BINARY_DIR}/aegisub-lua tests/busted.lua -p moon tests/modules" + VERBATIM +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ce2e355ff..4d4396451 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -13,210 +13,6 @@ if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE Release) + endif() + +-## Build bundled LuaJIT with aegisub specific patches +-add_executable(luajit-minilua vendor/luajit/src/host/minilua.c) +-if(NOT WIN32) +- target_link_libraries(luajit-minilua m) +-endif() +-if(WIN32) +- if(CMAKE_SIZEOF_VOID_P EQUAL 8) +- add_custom_command( +- OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/gen/buildvm_arch.h" +- COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/gen" +- COMMAND luajit-minilua ../dynasm/dynasm.lua -LN -D WIN -D JIT -D FFI -D P64 -o "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/gen/buildvm_arch.h" vm_x86.dasc +- WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/vendor/luajit/src +- ) +- else() +- add_custom_command( +- OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/gen/buildvm_arch.h" +- COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/gen" +- COMMAND luajit-minilua ../dynasm/dynasm.lua -LN -D WIN -D JIT -D FFI -o "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/gen/buildvm_arch.h" vm_x86.dasc +- WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/vendor/luajit/src +- ) +- endif() +-elseif(APPLE) +- if(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "arm64") +- add_custom_command( +- OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/gen/buildvm_arch.h" +- COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/gen" +- COMMAND luajit-minilua ../dynasm/dynasm.lua -D ENDIAN_LE -D P64 -D FFI -D DUALNUM -D FPU -D HFABI -D NO_UNWIND -D VER=80 -o "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/gen/buildvm_arch.h" vm_arm64.dasc +- WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/vendor/luajit/src +- ) +- else() +- add_custom_command( +- OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/gen/buildvm_arch.h" +- COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/gen" +- COMMAND luajit-minilua ../dynasm/dynasm.lua -D P64 -D JIT -D FFI -D FPU -D HFABI -D VER= -o "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/gen/buildvm_arch.h" vm_x64.dasc +- WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/vendor/luajit/src +- ) +- endif() +-else() +- if(CMAKE_SIZEOF_VOID_P EQUAL 8) +- add_custom_command( +- OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/gen/buildvm_arch.h" +- COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/gen" +- COMMAND luajit-minilua ../dynasm/dynasm.lua -D P64 -D JIT -D FFI -D FPU -D HFABI -D VER= -o "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/gen/buildvm_arch.h" vm_x86.dasc +- WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/vendor/luajit/src +- ) +- else() +- add_custom_command( +- OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/gen/buildvm_arch.h" +- COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/gen" +- COMMAND luajit-minilua ../dynasm/dynasm.lua -D JIT -D FFI -D FPU -D HFABI -D VER= -o "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/gen/buildvm_arch.h" vm_x86.dasc +- WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/vendor/luajit/src +- ) +- endif() +-endif() +- +-add_executable(luajit-buildvm +- vendor/luajit/src/host/buildvm.c +- vendor/luajit/src/host/buildvm_asm.c +- vendor/luajit/src/host/buildvm_peobj.c +- vendor/luajit/src/host/buildvm_lib.c +- vendor/luajit/src/host/buildvm_fold.c +- +- "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/gen/buildvm_arch.h" +-) +-target_compile_definitions(luajit-buildvm PRIVATE LUAJIT_ENABLE_LUA52COMPAT) +-target_include_directories(luajit-buildvm PRIVATE vendor/luajit/src "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/gen") +- +-if(APPLE) +- add_custom_command( +- OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/lj_vm.s" +- COMMAND luajit-buildvm -m machasm -o "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/lj_vm.s" +- ) +-elseif(UNIX) +- add_custom_command( +- OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/lj_vm.s" +- COMMAND luajit-buildvm -m elfasm -o "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/lj_vm.s" +- ) +-elseif(MSVC) +- add_custom_command( +- OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/lj_vm.obj" +- COMMAND luajit-buildvm -m peobj -o "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/lj_vm.obj" +- ) +-endif() +-add_custom_command( +- OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/gen/lj_ffdef.h" +- COMMAND luajit-buildvm -m ffdef -o "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/gen/lj_ffdef.h" lib_base.c lib_math.c lib_bit.c lib_string.c lib_table.c lib_io.c lib_os.c lib_package.c lib_debug.c lib_jit.c lib_ffi.c +- WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/vendor/luajit/src +-) +-add_custom_command( +- OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/gen/lj_bcdef.h" +- COMMAND luajit-buildvm -m bcdef -o "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/gen/lj_bcdef.h" lib_base.c lib_math.c lib_bit.c lib_string.c lib_table.c lib_io.c lib_os.c lib_package.c lib_debug.c lib_jit.c lib_ffi.c +- WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/vendor/luajit/src +-) +-add_custom_command( +- OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/gen/lj_folddef.h" +- COMMAND luajit-buildvm -m folddef -o "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/gen/lj_folddef.h" lj_opt_fold.c +- WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/vendor/luajit/src +-) +-add_custom_command( +- OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/gen/lj_recdef.h" +- COMMAND luajit-buildvm -m recdef -o "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/gen/lj_recdef.h" lib_base.c lib_math.c lib_bit.c lib_string.c lib_table.c lib_io.c lib_os.c lib_package.c lib_debug.c lib_jit.c lib_ffi.c +- WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/vendor/luajit/src +-) +-add_custom_command( +- OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/gen/lj_libdef.h" +- COMMAND luajit-buildvm -m libdef -o "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/gen/lj_libdef.h" lib_base.c lib_math.c lib_bit.c lib_string.c lib_table.c lib_io.c lib_os.c lib_package.c lib_debug.c lib_jit.c lib_ffi.c +- WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/vendor/luajit/src +-) +-add_custom_command( +- OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/jit/vmdef.lua" +- COMMAND luajit-buildvm -m vmdef -o "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/jit/vmdef.lua" lib_base.c lib_math.c lib_bit.c lib_string.c lib_table.c lib_io.c lib_os.c lib_package.c lib_debug.c lib_jit.c lib_ffi.c +- WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/vendor/luajit/src +-) +- +-add_library(luajit STATIC +- vendor/luajit/src/lib_base.c +- vendor/luajit/src/lib_math.c +- vendor/luajit/src/lib_bit.c +- vendor/luajit/src/lib_string.c +- vendor/luajit/src/lib_table.c +- vendor/luajit/src/lib_io.c +- vendor/luajit/src/lib_os.c +- vendor/luajit/src/lib_package.c +- vendor/luajit/src/lib_debug.c +- vendor/luajit/src/lib_jit.c +- vendor/luajit/src/lib_ffi.c +- vendor/luajit/src/lj_gc.c +- vendor/luajit/src/lj_err.c +- vendor/luajit/src/lj_char.c +- vendor/luajit/src/lj_bc.c +- vendor/luajit/src/lj_obj.c +- vendor/luajit/src/lj_buf.c +- vendor/luajit/src/lj_str.c +- vendor/luajit/src/lj_tab.c +- vendor/luajit/src/lj_func.c +- vendor/luajit/src/lj_udata.c +- vendor/luajit/src/lj_meta.c +- vendor/luajit/src/lj_debug.c +- vendor/luajit/src/lj_state.c +- vendor/luajit/src/lj_dispatch.c +- vendor/luajit/src/lj_vmevent.c +- vendor/luajit/src/lj_vmmath.c +- vendor/luajit/src/lj_strscan.c +- vendor/luajit/src/lj_strfmt.c +- vendor/luajit/src/lj_strfmt_num.c +- vendor/luajit/src/lj_api.c +- vendor/luajit/src/lj_profile.c +- vendor/luajit/src/lj_lex.c +- vendor/luajit/src/lj_parse.c +- vendor/luajit/src/lj_bcread.c +- vendor/luajit/src/lj_bcwrite.c +- vendor/luajit/src/lj_load.c +- vendor/luajit/src/lj_ir.c +- vendor/luajit/src/lj_opt_mem.c +- vendor/luajit/src/lj_opt_fold.c +- vendor/luajit/src/lj_opt_narrow.c +- vendor/luajit/src/lj_opt_dce.c +- vendor/luajit/src/lj_opt_loop.c +- vendor/luajit/src/lj_opt_split.c +- vendor/luajit/src/lj_opt_sink.c +- vendor/luajit/src/lj_mcode.c +- vendor/luajit/src/lj_snap.c +- vendor/luajit/src/lj_record.c +- vendor/luajit/src/lj_crecord.c +- vendor/luajit/src/lj_ffrecord.c +- vendor/luajit/src/lj_asm.c +- vendor/luajit/src/lj_trace.c +- vendor/luajit/src/lj_gdbjit.c +- vendor/luajit/src/lj_ctype.c +- vendor/luajit/src/lj_cdata.c +- vendor/luajit/src/lj_cconv.c +- vendor/luajit/src/lj_ccall.c +- vendor/luajit/src/lj_ccallback.c +- vendor/luajit/src/lj_carith.c +- vendor/luajit/src/lj_clib.c +- vendor/luajit/src/lj_cparse.c +- vendor/luajit/src/lj_lib.c +- vendor/luajit/src/lj_alloc.c +- vendor/luajit/src/lib_aux.c +- vendor/luajit/src/lib_init.c +- +- "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/gen/lj_ffdef.h" +- "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/gen/lj_bcdef.h" +- "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/gen/lj_folddef.h" +- "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/gen/lj_recdef.h" +- "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/gen/lj_libdef.h" +- # "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/jit/vmdef.lua" +-) +-target_compile_definitions(luajit PRIVATE LUAJIT_ENABLE_LUA52COMPAT) +-target_include_directories(luajit PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/gen" PUBLIC "vendor/luajit/src") +-if(WIN32) +- target_sources(luajit PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/lj_vm.obj") +-else() +- enable_language(ASM) +- target_sources(luajit PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/vendor/luajit/src/lj_vm.s") +- target_link_libraries(luajit ${CMAKE_DL_LIBS}) +-endif() +-if(APPLE) +- if(NOT CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "arm64") +- target_compile_definitions(luajit-buildvm PRIVATE LUAJIT_ENABLE_GC64) +- target_compile_definitions(luajit PRIVATE LUAJIT_ENABLE_GC64) +- endif() +-endif() +- + add_subdirectory(vendor/luabins) + + ## libaegisub +@@ -310,18 +106,18 @@ if(APPLE) + else() + target_precompile_headers(libaegisub PRIVATE "libaegisub/lagi_pre.h") + endif() +-target_link_libraries(libaegisub PRIVATE luajit luabins) ++target_link_libraries(libaegisub PRIVATE luajit-5.1 luabins) + + add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/src/libresrc/default_config.cpp" "${CMAKE_CURRENT_BINARY_DIR}/src/libresrc/default_config.h" + DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/src/libresrc/default_config_platform.json" +- COMMAND luajit-minilua "${PROJECT_SOURCE_DIR}/tools/respack.lua" manifest.respack default_config.cpp default_config.h ++ COMMAND luajit "${PROJECT_SOURCE_DIR}/tools/respack.lua" manifest.respack default_config.cpp default_config.h + WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/src/libresrc" + ) + + add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/src/libresrc/bitmap.cpp" "${CMAKE_CURRENT_BINARY_DIR}/src/libresrc/bitmap.h" +- COMMAND luajit-minilua ../../tools/respack.lua manifest.respack "${CMAKE_CURRENT_BINARY_DIR}/src/libresrc/bitmap.cpp" "${CMAKE_CURRENT_BINARY_DIR}/src/libresrc/bitmap.h" ++ COMMAND luajit ../../tools/respack.lua manifest.respack "${CMAKE_CURRENT_BINARY_DIR}/src/libresrc/bitmap.cpp" "${CMAKE_CURRENT_BINARY_DIR}/src/libresrc/bitmap.h" + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/src/bitmaps + ) + +@@ -496,7 +292,7 @@ add_executable(Aegisub WIN32 + src/video_slider.cpp + src/visual_feature.cpp + ) +-target_link_libraries(Aegisub PRIVATE ${CMAKE_DL_LIBS} libaegisub luajit) ++target_link_libraries(Aegisub PRIVATE ${CMAKE_DL_LIBS} libaegisub luajit-5.1) + target_compile_definitions(Aegisub PRIVATE CMAKE_BUILD) + target_include_directories(Aegisub PRIVATE "src/libresrc" "${CMAKE_CURRENT_BINARY_DIR}/src/libresrc") + if(APPLE) +diff --git a/vendor/luabins/CMakeLists.txt b/vendor/luabins/CMakeLists.txt +index 1fe1d2031..e2761527b 100644 +--- a/vendor/luabins/CMakeLists.txt ++++ b/vendor/luabins/CMakeLists.txt +@@ -36,4 +36,4 @@ add_library(luabins STATIC + src/savebuffer.c + src/write.c + ) +-target_link_libraries(luabins PRIVATE luajit) +\ No newline at end of file ++target_link_libraries(luabins PRIVATE luajit-5.1) +\ No newline at end of file diff --git a/nixpkgs/pkgs/applications/video/aegisub/update-ffms2.patch b/nixpkgs/pkgs/applications/video/aegisub/update-ffms2.patch deleted file mode 100644 index affa46365cfb..000000000000 --- a/nixpkgs/pkgs/applications/video/aegisub/update-ffms2.patch +++ /dev/null @@ -1,105 +0,0 @@ -commit 89c4e8d34ab77c3322f097b91fd9de22cbea7a37 -Author: Thomas Goyne <plorkyeran@aegisub.org> -Date: Wed Nov 21 16:41:05 2018 -0800 - - Update ffmpeg and ffms2 - -diff --git a/src/video_provider_ffmpegsource.cpp b/src/video_provider_ffmpegsource.cpp -index 8bd68fbbf..f4ed6a2f2 100644 ---- a/src/video_provider_ffmpegsource.cpp -+++ b/src/video_provider_ffmpegsource.cpp -@@ -44,6 +44,23 @@ - #include <libaegisub/make_unique.h> - - namespace { -+typedef enum AGI_ColorSpaces { -+ AGI_CS_RGB = 0, -+ AGI_CS_BT709 = 1, -+ AGI_CS_UNSPECIFIED = 2, -+ AGI_CS_FCC = 4, -+ AGI_CS_BT470BG = 5, -+ AGI_CS_SMPTE170M = 6, -+ AGI_CS_SMPTE240M = 7, -+ AGI_CS_YCOCG = 8, -+ AGI_CS_BT2020_NCL = 9, -+ AGI_CS_BT2020_CL = 10, -+ AGI_CS_SMPTE2085 = 11, -+ AGI_CS_CHROMATICITY_DERIVED_NCL = 12, -+ AGI_CS_CHROMATICITY_DERIVED_CL = 13, -+ AGI_CS_ICTCP = 14 -+} AGI_ColorSpaces; -+ - /// @class FFmpegSourceVideoProvider - /// @brief Implements video loading through the FFMS library. - class FFmpegSourceVideoProvider final : public VideoProvider, FFmpegSourceProvider { -@@ -78,7 +95,7 @@ public: - if (matrix == RealColorSpace) - FFMS_SetInputFormatV(VideoSource, CS, CR, FFMS_GetPixFmt(""), nullptr); - else if (matrix == "TV.601") -- FFMS_SetInputFormatV(VideoSource, FFMS_CS_BT470BG, CR, FFMS_GetPixFmt(""), nullptr); -+ FFMS_SetInputFormatV(VideoSource, AGI_CS_BT470BG, CR, FFMS_GetPixFmt(""), nullptr); - else - return; - ColorSpace = matrix; -@@ -103,16 +120,16 @@ std::string colormatrix_description(int cs, int cr) { - std::string str = cr == FFMS_CR_JPEG ? "PC" : "TV"; - - switch (cs) { -- case FFMS_CS_RGB: -+ case AGI_CS_RGB: - return "None"; -- case FFMS_CS_BT709: -+ case AGI_CS_BT709: - return str + ".709"; -- case FFMS_CS_FCC: -+ case AGI_CS_FCC: - return str + ".FCC"; -- case FFMS_CS_BT470BG: -- case FFMS_CS_SMPTE170M: -+ case AGI_CS_BT470BG: -+ case AGI_CS_SMPTE170M: - return str + ".601"; -- case FFMS_CS_SMPTE240M: -+ case AGI_CS_SMPTE240M: - return str + ".240M"; - default: - throw VideoOpenError("Unknown video color space"); -@@ -206,8 +223,10 @@ void FFmpegSourceVideoProvider::LoadVideo(agi::fs::path const& filename, std::st - - // set thread count - int Threads = OPT_GET("Provider/Video/FFmpegSource/Decoding Threads")->GetInt(); -+#if FFMS_VERSION < ((2 << 24) | (30 << 16) | (0 << 8) | 0) - if (FFMS_GetVersion() < ((2 << 24) | (17 << 16) | (2 << 8) | 1) && FFMS_GetSourceType(Index) == FFMS_SOURCE_LAVF) - Threads = 1; -+#endif - - // set seekmode - // TODO: give this its own option? -@@ -235,18 +254,22 @@ void FFmpegSourceVideoProvider::LoadVideo(agi::fs::path const& filename, std::st - else - DAR = double(Width) / Height; - -- CS = TempFrame->ColorSpace; -+ int VideoCS = CS = TempFrame->ColorSpace; - CR = TempFrame->ColorRange; - -- if (CS == FFMS_CS_UNSPECIFIED) -- CS = Width > 1024 || Height >= 600 ? FFMS_CS_BT709 : FFMS_CS_BT470BG; -+ if (CS == AGI_CS_UNSPECIFIED) -+ CS = Width > 1024 || Height >= 600 ? AGI_CS_BT709 : AGI_CS_BT470BG; - RealColorSpace = ColorSpace = colormatrix_description(CS, CR); - - #if FFMS_VERSION >= ((2 << 24) | (17 << 16) | (1 << 8) | 0) -- if (CS != FFMS_CS_RGB && CS != FFMS_CS_BT470BG && ColorSpace != colormatrix && (colormatrix == "TV.601" || OPT_GET("Video/Force BT.601")->GetBool())) { -- if (FFMS_SetInputFormatV(VideoSource, FFMS_CS_BT470BG, CR, FFMS_GetPixFmt(""), &ErrInfo)) -+ if (CS != AGI_CS_RGB && CS != AGI_CS_BT470BG && ColorSpace != colormatrix && (colormatrix == "TV.601" || OPT_GET("Video/Force BT.601")->GetBool())) { -+ CS = AGI_CS_BT470BG; -+ ColorSpace = colormatrix_description(AGI_CS_BT470BG, CR); -+ } -+ -+ if (CS != VideoCS) { -+ if (FFMS_SetInputFormatV(VideoSource, CS, CR, FFMS_GetPixFmt(""), &ErrInfo)) - throw VideoOpenError(std::string("Failed to set input format: ") + ErrInfo.Buffer); -- ColorSpace = colormatrix_description(FFMS_CS_BT470BG, CR); - } - #endif diff --git a/nixpkgs/pkgs/applications/video/ani-cli/default.nix b/nixpkgs/pkgs/applications/video/ani-cli/default.nix index 6883587b4b81..4e8637cf190f 100644 --- a/nixpkgs/pkgs/applications/video/ani-cli/default.nix +++ b/nixpkgs/pkgs/applications/video/ani-cli/default.nix @@ -12,13 +12,13 @@ stdenvNoCC.mkDerivation rec { pname = "ani-cli"; - version = "1.9"; + version = "3.3"; src = fetchFromGitHub { owner = "pystardust"; repo = "ani-cli"; rev = "v${version}"; - sha256 = "sha256-oYiq3Mnuhba5NELJXqVN3gY/d0RfQIqW13YtdcmYKK4="; + sha256 = "sha256-khgErF/1DmqnXmTUvTYWuyUAos6aUghImgXp3NjOZEg="; }; nativeBuildInputs = [ makeWrapper ]; diff --git a/nixpkgs/pkgs/applications/video/anime-downloader/default.nix b/nixpkgs/pkgs/applications/video/anime-downloader/default.nix new file mode 100644 index 000000000000..60e89c2fdf68 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/anime-downloader/default.nix @@ -0,0 +1,54 @@ +{ lib, python3, aria2, mpv, nodejs, qt5, fetchFromGitHub }: + +python3.pkgs.buildPythonApplication rec { + pname = "anime-downloader"; + version = "5.0.14"; + + src = fetchFromGitHub { + owner = "anime-dl"; + repo = "anime-downloader"; + rev = version; + sha256 = "sha256-Uk2mtsSrb8fCD9JCFzvLBzMEB7ViVDrKPSOKy9ALJ6o="; + }; + + nativeBuildInputs = [ qt5.wrapQtAppsHook ]; + + propagatedBuildInputs = [ + aria2 + mpv + nodejs + ] ++ (with python3.pkgs; [ + beautifulsoup4 + cfscrape + click + coloredlogs + fuzzywuzzy + jsbeautifier + pycryptodome + pySmartDL + pyqt5 + requests + requests-cache + selenium + tabulate + ]); + + preFixup = '' + wrapQtApp "$out/bin/anime" --prefix PATH : ${lib.makeBinPath propagatedBuildInputs} + ''; + + doCheck = false; + # FIXME: checks must be disabled because they are lacking the qt env. + # They fail like this, even if built and wrapped with all Qt and runtime dependencies. + # Ref.: https://github.com/NixOS/nixpkgs/blob/634141959076a8ab69ca2cca0f266852256d79ee/pkgs/applications/misc/openlp/lib.nix#L20-L23 + + passthru.updateScript = ./update.sh; + + meta = with lib; { + homepage = "https://github.com/anime-dl/anime-downloader"; + description = "A simple but powerful anime downloader and streamer"; + license = licenses.unlicense; + platforms = platforms.linux; + maintainers = with maintainers; [ WeebSorceress ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/anime-downloader/update.sh b/nixpkgs/pkgs/applications/video/anime-downloader/update.sh new file mode 100755 index 000000000000..292299298ad9 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/anime-downloader/update.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p curl jq common-updater-scripts + +set -eu -o pipefail + +version="$(curl --silent "https://api.github.com/repos/anime-dl/anime-downloader/releases" | jq '.[0].tag_name' --raw-output)" + +update-source-version anime-downloader "$version" diff --git a/nixpkgs/pkgs/applications/video/avidemux/default.nix b/nixpkgs/pkgs/applications/video/avidemux/default.nix index d6b0467fb729..35c628f8a59d 100644 --- a/nixpkgs/pkgs/applications/video/avidemux/default.nix +++ b/nixpkgs/pkgs/applications/video/avidemux/default.nix @@ -66,7 +66,6 @@ stdenv.mkDerivation rec { cd "$sourceRoot" patchPhase - export LD_LIBRARY_PATH="$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${libXext}/lib" ${stdenv.shell} bootStrap.bash \ --with-core \ ${if withQT then "--with-qt" else "--without-qt"} \ diff --git a/nixpkgs/pkgs/applications/video/byzanz/default.nix b/nixpkgs/pkgs/applications/video/byzanz/default.nix index 2919cb10ca3f..5e60bb7fd908 100644 --- a/nixpkgs/pkgs/applications/video/byzanz/default.nix +++ b/nixpkgs/pkgs/applications/video/byzanz/default.nix @@ -1,13 +1,26 @@ -{ lib, stdenv, fetchgit, wrapGAppsHook, which, gnome, glib, intltool, pkg-config, libtool, cairo, gtk3, gst_all_1, xorg }: +{ lib, stdenv +, fetchgit +, wrapGAppsHook +, cairo +, glib +, gnome +, gst_all_1 +, gtk3 +, intltool +, libtool +, pkg-config +, which +, xorg +}: stdenv.mkDerivation { - version = "0.2.3.alpha"; pname = "byzanz"; + version = "unstable-2016-03-12"; src = fetchgit { url = "https://gitlab.gnome.org/Archive/byzanz"; - rev = "1875a7f6a3903b83f6b1d666965800f47db9286a"; - sha256 = "0a72fw2mxl8vdcdnzy0bwis4jk28pd7nc8qgr4vhyw5pd48dynvh"; + rev = "81235d235d12c9687897f7fc6ec0de1feaed6623"; + hash = "sha256-3DUwXCPBAmeCRlDkiPUgwNyBa6bCvC/TLguMCK3bo4E="; }; patches = [ ./add-amflags.patch ]; @@ -16,11 +29,31 @@ stdenv.mkDerivation { ./autogen.sh --prefix=$out ''; - NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations"; + NIX_CFLAGS_COMPILE = builtins.concatStringsSep " " [ + "-Wno-error=deprecated-declarations" + "-Wno-error=incompatible-pointer-types" + ]; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ which gnome.gnome-common glib intltool libtool cairo gtk3 xorg.xwininfo xorg.libXdamage ] - ++ (with gst_all_1; [ gstreamer gst-plugins-base gst-plugins-bad gst-plugins-good gst-plugins-ugly gst-libav wrapGAppsHook ]); + buildInputs = [ + which + gnome.gnome-common + glib + intltool + libtool + cairo + gtk3 + xorg.xwininfo + xorg.libXdamage + ] ++ (with gst_all_1; [ + gstreamer + gst-plugins-base + gst-plugins-bad + gst-plugins-good + gst-plugins-ugly + gst-libav + wrapGAppsHook + ]); meta = with lib; { description = "Tool to record a running X desktop to an animation suitable for presentation in a web browser"; diff --git a/nixpkgs/pkgs/applications/video/catt/default.nix b/nixpkgs/pkgs/applications/video/catt/default.nix index 1f75997ce7bb..4a19121f34ad 100644 --- a/nixpkgs/pkgs/applications/video/catt/default.nix +++ b/nixpkgs/pkgs/applications/video/catt/default.nix @@ -39,26 +39,27 @@ with py.pkgs; buildPythonApplication rec { pname = "catt"; - version = "0.12.2"; - - disabled = python3.pythonOlder "3.4"; + version = "0.12.7"; src = fetchPypi { inherit pname version; - sha256 = "sha256-BOETKTkcbLOu5SubiejswU7D47qWS13QZ7rU9x3jf5Y="; + hash = "sha256-Q9ePWRLwuuTG+oPKFg7xn1gj4uAVlXUxegWdyH3Yd90="; }; propagatedBuildInputs = [ click ifaddr PyChromecast + protobuf requests - youtube-dl + yt-dlp ]; doCheck = false; # attempts to access various URLs - pythonImportsCheck = [ "catt" ]; + pythonImportsCheck = [ + "catt" + ]; meta = with lib; { description = "Tool to send media from online sources to Chromecast devices"; diff --git a/nixpkgs/pkgs/applications/video/ccextractor/default.nix b/nixpkgs/pkgs/applications/video/ccextractor/default.nix index 905034091a29..26954375aff5 100644 --- a/nixpkgs/pkgs/applications/video/ccextractor/default.nix +++ b/nixpkgs/pkgs/applications/video/ccextractor/default.nix @@ -36,7 +36,10 @@ stdenv.mkDerivation rec { ++ lib.optional (!stdenv.isLinux) libiconv ++ lib.optionals enableOcr [ leptonica tesseract4 ffmpeg ]; - cmakeFlags = lib.optionals enableOcr [ "-DWITH_OCR=on" "-DWITH_HARDSUBX=on" ]; + cmakeFlags = [ + # file RPATH_CHANGE could not write new RPATH: + "-DCMAKE_SKIP_BUILD_RPATH=ON" + ] ++ lib.optionals enableOcr [ "-DWITH_OCR=on" "-DWITH_HARDSUBX=on" ]; postInstall = lib.optionalString enableOcr '' wrapProgram "$out/bin/ccextractor" \ diff --git a/nixpkgs/pkgs/applications/video/celluloid/default.nix b/nixpkgs/pkgs/applications/video/celluloid/default.nix index 291b4b9ebfc6..98495ca5affb 100644 --- a/nixpkgs/pkgs/applications/video/celluloid/default.nix +++ b/nixpkgs/pkgs/applications/video/celluloid/default.nix @@ -18,13 +18,13 @@ stdenv.mkDerivation rec { pname = "celluloid"; - version = "0.22"; + version = "0.23"; src = fetchFromGitHub { owner = "celluloid-player"; repo = "celluloid"; rev = "v${version}"; - hash = "sha256-QGN8YLtyb9YVNDK2ZDQwHJVg6UTIQssfNK9lQqxMNKQ="; + hash = "sha256-YKDud/UJJx9ko5k+Oux8mUUme0MXaRMngESE14Hhxv8="; }; nativeBuildInputs = [ @@ -46,8 +46,6 @@ stdenv.mkDerivation rec { postPatch = '' patchShebangs meson-post-install.py src/generate-authors.py - # Remove this for next release - substituteInPlace meson-post-install.py --replace "gtk-update-icon-cache" "gtk4-update-icon-cache" ''; doCheck = true; diff --git a/nixpkgs/pkgs/applications/video/clapper/default.nix b/nixpkgs/pkgs/applications/video/clapper/default.nix index 0e97eab1773e..9e8e88ecfbf3 100644 --- a/nixpkgs/pkgs/applications/video/clapper/default.nix +++ b/nixpkgs/pkgs/applications/video/clapper/default.nix @@ -24,13 +24,13 @@ stdenv.mkDerivation rec { pname = "clapper"; - version = "0.4.1"; + version = "0.5.2"; src = fetchFromGitHub { owner = "Rafostar"; repo = pname; rev = version; - sha256 = "sha256-ccvg8yxPCN7OYmJvq0SPY6iyiuFuWJyiu+mRoykEzqI="; + sha256 = "sha256-s+qdTq3/pHHstwr1W3Hs2Zje++iJFHM6hQTFoZD43bY="; }; nativeBuildInputs = [ @@ -65,11 +65,6 @@ stdenv.mkDerivation rec { patchShebangs build-aux/meson/postinstall.py ''; - mesonFlags = [ - # TODO: https://github.com/NixOS/nixpkgs/issues/36468 - "-Dc_args=-I${glib.dev}/include/gio-unix-2.0" - ]; - postInstall = '' cp ${src}/data/icons/*.svg $out/share/icons/hicolor/scalable/apps/ cp ${src}/data/icons/*.svg $out/share/icons/hicolor/symbolic/apps/ diff --git a/nixpkgs/pkgs/applications/video/clickshare-csc1/default.nix b/nixpkgs/pkgs/applications/video/clickshare-csc1/default.nix deleted file mode 100644 index 09b24663080b..000000000000 --- a/nixpkgs/pkgs/applications/video/clickshare-csc1/default.nix +++ /dev/null @@ -1,124 +0,0 @@ -{ lib -, stdenv -, fetchurl -, alsa-lib -, autoPatchelfHook -, binutils-unwrapped -, gnutar -, libav_0_8 -, libnotify -, libresample -, libusb1 -, qt4 -, rpmextract -, unzip -, xorg -, usersGroup ? "clickshare" # for udev access rules -}: - - -# This fetches the latest firmware version that -# contains a linux-compatible client binary. -# Barco no longer supports linux, so updates are unlikely: -# https://www.barco.com/de/support/clickshare-csc-1/knowledge-base/KB1191 - - -stdenv.mkDerivation rec { - pname = "clickshare-csc1"; - version = "01.07.00.033"; - src = fetchurl { - name = "clickshare-csc1-${version}.zip"; - url = "https://www.barco.com/services/website/de/TdeFiles/Download?FileNumber=R33050020&TdeType=3&MajorVersion=01&MinorVersion=07&PatchVersion=00&BuildVersion=033"; - sha256 = "0h4jqidqvk4xkaky5bizi7ilz4qzl2mh68401j21y3djnzx09br3"; - }; - - nativeBuildInputs = [ - autoPatchelfHook - binutils-unwrapped - gnutar - rpmextract - unzip - ]; - buildInputs = [ - alsa-lib - libav_0_8 - libnotify - libresample - libusb1 - qt4 - xorg.libX11 - xorg.libXdamage - xorg.libXfixes - xorg.libXinerama - xorg.libXtst - ]; - sourceRoot = "."; - - # The source consists of nested archives. - # We extract them archive by archive. - # If the filename contains version numbers, - # we use a wildcard and check that there - # is actually only one file matching. - postUnpack = - let - rpmArch = - if stdenv.hostPlatform.isx86_32 then "i386" else - if stdenv.hostPlatform.isx86_64 then "x86_64" else - throw "unsupported system: ${stdenv.hostPlatform.system}"; - in - '' - ls clickshare_baseunit_*.*_all.signed_release.ipk | wc --lines | xargs test 1 = - tar --verbose --extract --one-top-level=dir1 < clickshare_baseunit_*.*_all.signed_release.ipk - mkdir dir2 - ( cd dir2 ; ar xv ../dir1/firmware.ipk ) - tar --verbose --gzip --extract --one-top-level=dir3 --exclude='dev/*' < dir2/data.tar.gz - ls dir3/clickshare/clickshare-*-*.${rpmArch}.rpm | wc --lines | xargs test 1 = - mkdir dir4 - cd dir4 - rpmextract ../dir3/clickshare/clickshare-*-*.${rpmArch}.rpm - ''; - - installPhase = '' - runHook preInstall - mkdir --verbose --parents $out - mv --verbose --target-directory=. usr/* - rmdir --verbose usr - cp --verbose --recursive --target-directory=$out * - runHook postInstall - ''; - - # Default udev rule restricts access to the - # clickshare USB dongle to the `wheel` group. - # We replace it with the group - # stated in the package arguments. - # Also, we patch executable and icon paths in .desktop files. - preFixup = '' - substituteInPlace \ - $out/lib/udev/rules.d/99-clickshare.rules \ - --replace wheel ${usersGroup} - substituteInPlace \ - $out/share/applications/clickshare.desktop \ - --replace Exec= Exec=$out/bin/ \ - --replace =/usr =$out - substituteInPlace \ - $out/etc/xdg/autostart/clickshare-launcher.desktop \ - --replace =/usr =$out - ''; - - meta = { - homepage = "https://www.barco.com/de/support/clickshare-csc-1/drivers"; - downloadPage = "https://www.barco.com/de/Support/software/R33050020"; - platforms = [ "i686-linux" "x86_64-linux" ]; - license = lib.licenses.unfree; - maintainers = [ lib.maintainers.yarny ]; - description = "Linux driver/client for Barco ClickShare CSC-1"; - longDescription = '' - Barco ClickShare is a wireless presentation system - where a USB dongle transmits to a base station - that is connected with a beamer. - The USB dongle requires proprietary software that - captures the screen and sends it to the dongle. - This package provides the necessary software for Linux. - ''; - }; -} diff --git a/nixpkgs/pkgs/applications/video/coriander/default.nix b/nixpkgs/pkgs/applications/video/coriander/default.nix index 7f57c79c5fe5..540339f05a56 100644 --- a/nixpkgs/pkgs/applications/video/coriander/default.nix +++ b/nixpkgs/pkgs/applications/video/coriander/default.nix @@ -22,6 +22,11 @@ stdenv.mkDerivation rec { sha256 = "0l6hpfgy5r4yardilmdrggsnn1fbfww516sk5a90g1740cd435x5"; }; + # Workaround build failure on -fno-common toolchains: + # ld: subtitles.o:src/coriander.h:110: multiple definition of + # `main_window'; main.o:src/coriander.h:110: first defined here + NIX_CFLAGS_COMPILE = "-fcommon"; + preConfigure = '' cp ${automake}/share/automake-*/mkinstalldirs . ''; diff --git a/nixpkgs/pkgs/applications/video/davinci-resolve/default.nix b/nixpkgs/pkgs/applications/video/davinci-resolve/default.nix new file mode 100644 index 000000000000..6ae5759f6d16 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/davinci-resolve/default.nix @@ -0,0 +1,179 @@ +{ stdenv +, lib +, cacert +, curl +, runCommandLocal +, targetPlatform +, unzip +, appimage-run +, addOpenGLRunpath +, libGLU +, xorg +, buildFHSUserEnv +, bash +, writeText +, ocl-icd +, xkeyboard_config +, glib +, libarchive +, python2 +}: + +let + davinci = ( + stdenv.mkDerivation rec { + pname = "davinci-resolve"; + version = "17.4.3"; + + nativeBuildInputs = [ unzip appimage-run addOpenGLRunpath ]; + + # Pretty sure, there are missing dependencies ... + buildInputs = [ libGLU xorg.libXxf86vm ]; + + src = runCommandLocal "${pname}-src.zip" + rec { + outputHashMode = "recursive"; + outputHashAlgo = "sha256"; + outputHash = "0hq374n26mbcds8f1z644cvnh4h2rjdrbxxxbj4p34mx9b04ab28"; + + impureEnvVars = lib.fetchers.proxyImpureEnvVars; + + nativeBuildInputs = [ curl ]; + + # ENV VARS + SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt"; + + DOWNLOADID = "5efad1a052e8471989f662338d5247f1"; + REFERID = "263d62f31cbb49e0868005059abcb0c9"; + SITEURL = "https://www.blackmagicdesign.com/api/register/us/download/${DOWNLOADID}"; + + USERAGENT = builtins.concatStringsSep " " [ + "User-Agent: Mozilla/5.0 (X11; Linux ${targetPlatform.linuxArch})" + "AppleWebKit/537.36 (KHTML, like Gecko)" + "Chrome/77.0.3865.75" + "Safari/537.36" + ]; + + REQJSON = builtins.toJSON { + "firstname" = "NixOS"; + "lastname" = "Linux"; + "email" = "someone@nixos.org"; + "phone" = "+31 71 452 5670"; + "country" = "nl"; + "state" = "Province of Utrecht"; + "city" = "Utrecht"; + "product" = "DaVinci Resolve"; + }; + + } '' + RESOLVEURL=$(curl \ + -s \ + -H 'Host: www.blackmagicdesign.com' \ + -H 'Accept: application/json, text/plain, */*' \ + -H 'Origin: https://www.blackmagicdesign.com' \ + -H "$USERAGENT" \ + -H 'Content-Type: application/json;charset=UTF-8' \ + -H "Referer: https://www.blackmagicdesign.com/support/download/$REFERID/Linux" \ + -H 'Accept-Encoding: gzip, deflate, br' \ + -H 'Accept-Language: en-US,en;q=0.9' \ + -H 'Authority: www.blackmagicdesign.com' \ + -H 'Cookie: _ga=GA1.2.1849503966.1518103294; _gid=GA1.2.953840595.1518103294' \ + --data-ascii "$REQJSON" \ + --compressed \ + "$SITEURL") + + curl \ + --retry 3 --retry-delay 3 \ + -H "Host: sw.blackmagicdesign.com" \ + -H "Upgrade-Insecure-Requests: 1" \ + -H "$USERAGENT" \ + -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8" \ + -H "Accept-Language: en-US,en;q=0.9" \ + --compressed \ + "$RESOLVEURL" \ + > $out + ''; + + # The unpack phase won't generate a directory + setSourceRoot = '' + sourceRoot=$PWD + ''; + + installPhase = '' + runHook preInstall + + export HOME=$PWD/home + mkdir -p $HOME + + mkdir -p $out + appimage-run ./DaVinci_Resolve_${version}_Linux.run -i -y -n -C $out + + mkdir -p $out/{configs,DolbyVision,easyDCP,Fairlight,GPUCache,logs,Media,"Resolve Disk Database",.crashreport,.license,.LUT} + runHook postInstall + ''; + + dontStrip = true; + + postFixup = '' + for program in $out/bin/*; do + isELF "$program" || continue + addOpenGLRunpath "$program" + done + + for program in $out/libs/*; do + isELF "$program" || continue + if [[ "$program" != *"libcudnn_cnn_infer"* ]];then + echo $program + addOpenGLRunpath "$program" + fi + done + ''; + } + ); +in +buildFHSUserEnv { + name = "davinci-resolve"; + targetPkgs = pkgs: with pkgs; [ + librsvg + libGLU + libGL + xorg.libICE + xorg.libSM + xorg.libXxf86vm + xorg.libxcb + udev + opencl-headers + alsa-lib + xorg.libX11 + xorg.libXext + expat + zlib + libuuid + bzip2 + libtool + ocl-icd + glib + libarchive + xdg-utils # xdg-open needed to open URLs + python2 + # currently they want python 3.6 which is EOL + #python3 + ]; + + runScript = "${bash}/bin/bash ${ + writeText "davinci-wrapper" + '' + export QT_XKB_CONFIG_ROOT="${xkeyboard_config}/share/X11/xkb" + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${davinci}/libs + ${davinci}/bin/resolve + '' + }"; + + meta = with lib; { + description = "Professional Video Editing, Color, Effects and Audio Post"; + homepage = "https://www.blackmagicdesign.com/products/davinciresolve/"; + license = licenses.unfree; + maintainers = with maintainers; [ jshcmpbll ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/video/entangle/default.nix b/nixpkgs/pkgs/applications/video/entangle/default.nix index 2c7563380895..761a3849c315 100644 --- a/nixpkgs/pkgs/applications/video/entangle/default.nix +++ b/nixpkgs/pkgs/applications/video/entangle/default.nix @@ -1,7 +1,8 @@ { lib , stdenv , fetchFromGitLab -, cmake +, fetchpatch +, itstool , libxml2 , meson , ninja @@ -49,10 +50,19 @@ stdenv.mkDerivation rec { sha256 = "hz2WSDOjriQSavFlDT+35x1X5MeInq80ZrSP1WR/td0="; }; + patches = [ + # Fix build with meson 0.61, can be removed on next update + # https://gitlab.com/entangle/entangle/-/issues/67 + (fetchpatch { + url = "https://gitlab.com/entangle/entangle/-/commit/54795d275a93e94331a614c8712740fcedbdd4f0.patch"; + sha256 = "iEgqGjKa0xwSdctwvNdEV361l9nx+bz53xn3fuDgtzY="; + }) + ]; + nativeBuildInputs = [ - cmake - glib.dev - libxml2.bin # for xmllint + itstool + glib + libxml2 # for xmllint meson ninja perl # for pod2man and build scripts @@ -93,8 +103,6 @@ stdenv.mkDerivation rec { libXtst ]); - dontUseCmakeConfigure = true; - # Disable building of doc/reference since it requires network connection to render XML to HTML # Patch build script shebangs postPatch = '' diff --git a/nixpkgs/pkgs/applications/video/epgstation/default.nix b/nixpkgs/pkgs/applications/video/epgstation/default.nix index 77510ae153de..1f5d23a684a8 100644 --- a/nixpkgs/pkgs/applications/video/epgstation/default.nix +++ b/nixpkgs/pkgs/applications/video/epgstation/default.nix @@ -1,8 +1,7 @@ { lib , stdenv , fetchFromGitHub -, common-updater-scripts -, genericUpdater +, gitUpdater , writers , makeWrapper , bash @@ -24,18 +23,6 @@ let sha256 = "K1cAvmqWEfS6EY4MKAtjXb388XLYHtouxNM70PWgFig="; }; - workaround-opencollective-buildfailures = stdenv.mkDerivation { - # FIXME: This should be removed when a complete fix is available - # https://github.com/svanderburg/node2nix/issues/145 - name = "workaround-opencollective-buildfailures"; - dontUnpack = true; - installPhase = '' - mkdir -p $out/bin - touch $out/bin/opencollective-postinstall - chmod +x $out/bin/opencollective-postinstall - ''; - }; - client = nodePackages.epgstation-client.override (drv: { # FIXME: remove this option if possible # @@ -50,21 +37,14 @@ let server = nodePackages.epgstation.override (drv: { inherit src; - bypassCache = false; - # This is set to false to keep devDependencies at build time. Build time # dependencies are pruned afterwards. production = false; - buildInputs = [ bash ]; - nativeBuildInputs = [ - nodejs - workaround-opencollective-buildfailures + buildInputs = (drv.buildInputs or [ ]) ++ [ bash ]; + nativeBuildInputs = (drv.nativeBuildInputs or [ ]) ++ [ makeWrapper - ] ++ (with nodePackages; [ - node-pre-gyp - node-gyp-build - ]); + ]; preRebuild = '' # Fix for not being able to connect to mysql using domain sockets. @@ -115,7 +95,7 @@ let ln -sfT /var/lib/epgstation/thumbnail thumbnail makeWrapper ${nodejs}/bin/npm $out/bin/epgstation \ - --run "cd $out/lib/node_modules/epgstation" \ + --chdir "$out/lib/node_modules/epgstation" \ --prefix PATH : ${lib.makeBinPath runtimeDeps} \ --set APP_ROOT_PATH "$out/lib/node_modules/epgstation" @@ -130,8 +110,7 @@ let inherit pname version - common-updater-scripts - genericUpdater + gitUpdater writers jq yq; diff --git a/nixpkgs/pkgs/applications/video/epgstation/update.nix b/nixpkgs/pkgs/applications/video/epgstation/update.nix index 5eb23be6c52b..387fbe0db62d 100644 --- a/nixpkgs/pkgs/applications/video/epgstation/update.nix +++ b/nixpkgs/pkgs/applications/video/epgstation/update.nix @@ -2,19 +2,17 @@ , version , homepage , lib -, common-updater-scripts -, genericUpdater +, gitUpdater , writers , jq , yq }: let - updater = genericUpdater { + updater = gitUpdater { inherit pname version; attrPath = lib.toLower pname; rev-prefix = "v"; - versionLister = "${common-updater-scripts}/bin/list-git-tags --url=${homepage}"; }; updateScript = builtins.elemAt updater 0; updateArgs = map (lib.escapeShellArg) (builtins.tail updater); diff --git a/nixpkgs/pkgs/applications/video/f1viewer/default.nix b/nixpkgs/pkgs/applications/video/f1viewer/default.nix index 7c091b425af6..2620142fb11e 100644 --- a/nixpkgs/pkgs/applications/video/f1viewer/default.nix +++ b/nixpkgs/pkgs/applications/video/f1viewer/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "f1viewer"; - version = "2.6.0"; + version = "2.7.0"; src = fetchFromGitHub { owner = "SoMuchForSubtlety"; repo = pname; rev = "v${version}"; - sha256 = "sha256-MY8xqpAzK1c4XL7w/LR83DyHFCI5X7wldosDDo7pXNI="; + sha256 = "sha256-jXC2dENXuqicNQqTHyZKsjibDvjta/npQmf3+uivjX0="; }; - vendorSha256 = "sha256-8c1+t6Lo11Q2kEDy9IWLw9bsZYtJFksE7Om3ysx7fc4="; + vendorSha256 = "sha256-UNeH3zxgssXxFpJws6nAL8EgXt0DRyAQfmlJWz/qyDg="; meta = with lib; { description = diff --git a/nixpkgs/pkgs/applications/video/ffmpeg-normalize/default.nix b/nixpkgs/pkgs/applications/video/ffmpeg-normalize/default.nix index a2f802c6e87b..606045d0b803 100644 --- a/nixpkgs/pkgs/applications/video/ffmpeg-normalize/default.nix +++ b/nixpkgs/pkgs/applications/video/ffmpeg-normalize/default.nix @@ -7,11 +7,11 @@ buildPythonApplication rec { pname = "ffmpeg-normalize"; - version = "1.22.8"; + version = "1.24.0"; src = fetchPypi { inherit pname version; - sha256 = "sha256-vxiq6q8fPh8ZLKnxYdIN591UQW73FWsoke1PvKTkko8="; + sha256 = "sha256-sQ8Qorf74ypMmpRd9b/wrqg28TZ295t6qkKosxyaG1I="; }; propagatedBuildInputs = [ ffmpeg ffmpeg-progress-yield ]; diff --git a/nixpkgs/pkgs/applications/video/filebot/default.nix b/nixpkgs/pkgs/applications/video/filebot/default.nix index df435d03d09d..45f7d099056d 100644 --- a/nixpkgs/pkgs/applications/video/filebot/default.nix +++ b/nixpkgs/pkgs/applications/video/filebot/default.nix @@ -1,13 +1,7 @@ { lib, stdenv, fetchurl, openjdk17, makeWrapper, autoPatchelfHook -, zlib, libzen, libmediainfo, curl, libmms, glib +, zlib, libzen, libmediainfo, curlWithGnuTls, libmms, glib }: -let - # FileBot requires libcurl-gnutls.so to build - curlWithGnuTls = curl.override { gnutlsSupport = true; opensslSupport = false; }; - -in - stdenv.mkDerivation rec { pname = "filebot"; version = "4.9.6"; @@ -47,6 +41,10 @@ stdenv.mkDerivation rec { ''; homepage = "https://filebot.net"; changelog = "https://www.filebot.net/forums/viewforum.php?f=7"; + sourceProvenance = with sourceTypes; [ + binaryBytecode + binaryNativeCode + ]; license = licenses.unfreeRedistributable; maintainers = with maintainers; [ gleber felschr ]; platforms = platforms.linux; diff --git a/nixpkgs/pkgs/applications/video/flirc/default.nix b/nixpkgs/pkgs/applications/video/flirc/default.nix index 6285094c461a..58de5ceab099 100644 --- a/nixpkgs/pkgs/applications/video/flirc/default.nix +++ b/nixpkgs/pkgs/applications/video/flirc/default.nix @@ -39,6 +39,7 @@ mkDerivation rec { homepage = "https://flirc.tv/more/flirc-usb"; description = "Use any Remote with your Media Center"; maintainers = with maintainers; [ aanderse ]; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; license = licenses.unfree; platforms = [ "x86_64-linux" ]; }; diff --git a/nixpkgs/pkgs/applications/video/freetube/default.nix b/nixpkgs/pkgs/applications/video/freetube/default.nix index c93be6b63834..b507c0d31947 100644 --- a/nixpkgs/pkgs/applications/video/freetube/default.nix +++ b/nixpkgs/pkgs/applications/video/freetube/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "freetube"; - version = "0.16.0"; + version = "0.17.1"; src = fetchurl { url = "https://github.com/FreeTubeApp/FreeTube/releases/download/v${version}-beta/freetube_${version}_amd64.AppImage"; - sha256 = "sha256-G4lZ1lbNN8X9ocWhcuuNZGTZm9AUzuWKVm23YgsJwig="; + sha256 = "1n5r1h2khjwdsckiviv8f2pflxibk8rs68fs08jak0kbm0kkyj18"; }; appimageContents = appimageTools.extractType2 { diff --git a/nixpkgs/pkgs/applications/video/gnome-mplayer/default.nix b/nixpkgs/pkgs/applications/video/gnome-mplayer/default.nix index de56865410ed..a63671accec4 100644 --- a/nixpkgs/pkgs/applications/video/gnome-mplayer/default.nix +++ b/nixpkgs/pkgs/applications/video/gnome-mplayer/default.nix @@ -23,6 +23,11 @@ stdenv.mkDerivation rec { }) ]; + # Workaround build failure on -fno-common toolchains: + # ld: mpris-interface.o:src/playlist.h:32: multiple definition of + # `plclose'; gui.o:src/playlist.h:32: first defined here + NIX_CFLAGS_COMPILE = "-fcommon"; + meta = with lib; { description = "Gnome MPlayer, a simple GUI for MPlayer"; homepage = "https://sites.google.com/site/kdekorte2/gnomemplayer"; diff --git a/nixpkgs/pkgs/applications/video/gpac/default.nix b/nixpkgs/pkgs/applications/video/gpac/default.nix index 6fd7a2036c56..6390558013f5 100644 --- a/nixpkgs/pkgs/applications/video/gpac/default.nix +++ b/nixpkgs/pkgs/applications/video/gpac/default.nix @@ -41,5 +41,14 @@ stdenv.mkDerivation rec { license = licenses.lgpl21; maintainers = with maintainers; [ bluescreen303 mgdelacroix ]; platforms = platforms.linux; + knownVulnerabilities = [ + "CVE-2022-1035" + "CVE-2022-1172" + "CVE-2022-1222" + "CVE-2022-1795" + "CVE-2022-2453" + "CVE-2022-2454" + "CVE-2022-2549" + ]; }; } diff --git a/nixpkgs/pkgs/applications/video/handbrake/default.nix b/nixpkgs/pkgs/applications/video/handbrake/default.nix index 841604399ed3..d20c6125beb2 100644 --- a/nixpkgs/pkgs/applications/video/handbrake/default.nix +++ b/nixpkgs/pkgs/applications/video/handbrake/default.nix @@ -11,7 +11,7 @@ , lib , fetchFromGitHub # For tests -, testVersion +, testers , runCommand , fetchurl # Main build tools @@ -206,7 +206,7 @@ let self = stdenv.mkDerivation rec { ++ optional (!useGtk) "--disable-gtk" ++ optional useFdk "--enable-fdk-aac" ++ optional stdenv.isDarwin "--disable-xcode" - ++ optional (stdenv.isx86_32 || stdenv.isx86_64) "--harden"; + ++ optional stdenv.hostPlatform.isx86 "--harden"; # NOTE: 2018-12-27: Check NixOS HandBrake test if changing NIX_LDFLAGS = [ "-lx265" ]; @@ -230,7 +230,7 @@ let self = stdenv.mkDerivation rec { HandBrakeCLI -i ${testMkv} -o test.mkv -e x264 -q 20 -B 160 test -e test.mkv ''; - version = testVersion { package = self; command = "HandBrakeCLI --version"; }; + version = testers.testVersion { package = self; command = "HandBrakeCLI --version"; }; }; meta = with lib; { diff --git a/nixpkgs/pkgs/applications/video/haruna/default.nix b/nixpkgs/pkgs/applications/video/haruna/default.nix index 5d204e8297a5..ad01eab08a46 100644 --- a/nixpkgs/pkgs/applications/video/haruna/default.nix +++ b/nixpkgs/pkgs/applications/video/haruna/default.nix @@ -6,69 +6,68 @@ , cmake , extra-cmake-modules , ffmpeg-full -, kcodecs , kconfig , kcoreaddons , kfilemetadata , ki18n , kiconthemes , kio -, kio-extras , kirigami2 , kxmlgui +, kdoctools , mpv , pkg-config +, wrapQtAppsHook , qqc2-desktop-style , qtbase , qtquickcontrols2 -, qtwayland -, youtube-dl +, yt-dlp }: mkDerivation rec { pname = "haruna"; - version = "0.7.3"; + version = "0.8.0"; src = fetchFromGitLab { owner = "multimedia"; repo = "haruna"; rev = "v${version}"; - sha256 = "sha256-pFrmTaRvsqxJw34VULzfjx2k56kJgkB96nJtai2D1wY="; + sha256 = "sha256-Lom9iQUKH3lQHrVK4dJzo+FG79xSCg0b4gY/KAevL6I="; domain = "invent.kde.org"; }; buildInputs = [ breeze-icons breeze-qt5 + qqc2-desktop-style + yt-dlp + ffmpeg-full - kcodecs kconfig kcoreaddons kfilemetadata ki18n kiconthemes kio - kio-extras kirigami2 kxmlgui + kdoctools mpv - qqc2-desktop-style qtbase qtquickcontrols2 - qtwayland - youtube-dl ]; nativeBuildInputs = [ cmake extra-cmake-modules pkg-config + wrapQtAppsHook ]; meta = with lib; { - homepage = "https://github.com/g-fb/haruna"; + homepage = "https://invent.kde.org/multimedia/haruna"; description = "Open source video player built with Qt/QML and libmpv"; - license = with licenses; [ bsd3 cc-by-40 gpl3Plus wtfpl ]; + license = with licenses; [ bsd3 cc-by-40 cc-by-sa-40 cc0 gpl2Plus gpl3Plus wtfpl ]; maintainers = with maintainers; [ jojosch ]; }; } diff --git a/nixpkgs/pkgs/applications/video/hdhomerun-config-gui/default.nix b/nixpkgs/pkgs/applications/video/hdhomerun-config-gui/default.nix index 62726dff4112..32f4267d9fcc 100644 --- a/nixpkgs/pkgs/applications/video/hdhomerun-config-gui/default.nix +++ b/nixpkgs/pkgs/applications/video/hdhomerun-config-gui/default.nix @@ -16,7 +16,9 @@ stdenv.mkDerivation rec { makeFlags = [ "SUBDIRS=src" ]; installPhase = '' - install -vDm 755 src/hdhomerun_config_gui $out/usr/bin/hdhomerun_config_gui + runHook preInstall + install -vDm 755 src/hdhomerun_config_gui $out/bin/hdhomerun_config_gui + runHook postInstall ''; meta = with lib; { diff --git a/nixpkgs/pkgs/applications/video/hyperion-ng/default.nix b/nixpkgs/pkgs/applications/video/hyperion-ng/default.nix new file mode 100644 index 000000000000..d9a1e251e4d0 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/hyperion-ng/default.nix @@ -0,0 +1,51 @@ +{ stdenv, avahi-compat, cmake, fetchFromGitHub, flatbuffers, hidapi, lib, libcec +, libusb1, libX11, libxcb, libXrandr, mbedtls, mkDerivation, protobuf, python3 +, qtbase, qtserialport, qtsvg, qtx11extras, wrapQtAppsHook }: + +mkDerivation rec { + pname = "hyperion.ng"; + version = "2.0.12"; + + src = fetchFromGitHub { + owner = "hyperion-project"; + repo = pname; + rev = version; + sha256 = "sha256-J31QaWwGNhIpnZmWN9lZEI6fC0VheY5X8fGchQqtAlQ="; + }; + + buildInputs = [ + avahi-compat + flatbuffers + hidapi + libcec + libusb1 + libX11 + libxcb + libXrandr + mbedtls + protobuf + python3 + qtbase + qtserialport + qtsvg + qtx11extras + ]; + + nativeBuildInputs = [ cmake wrapQtAppsHook ]; + + cmakeFlags = [ + "-DCMAKE_BUILD_TYPE=Release" + "-DUSE_SYSTEM_MBEDTLS_LIBS=ON" + "-DUSE_SYSTEM_FLATBUFFERS_LIBS=ON" + "-DUSE_SYSTEM_PROTO_LIBS=ON" + ]; + + meta = with lib; { + broken = (stdenv.isLinux && stdenv.isAarch64); + description = "Open Source Ambilight solution"; + homepage = "https://github.com/hyperion-project/hyperion.ng"; + license = licenses.mit; + maintainers = with maintainers; [ algram ]; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/applications/video/hypnotix/default.nix b/nixpkgs/pkgs/applications/video/hypnotix/default.nix new file mode 100644 index 000000000000..a2da839347f3 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/hypnotix/default.nix @@ -0,0 +1,87 @@ +{ lib +, stdenv +, fetchFromGitHub +, substituteAll +, cinnamon +, gettext +, gobject-introspection +, mpv +, python3 +, wrapGAppsHook +}: + +stdenv.mkDerivation rec { + pname = "hypnotix"; + version = "2.9"; + + src = fetchFromGitHub { + owner = "linuxmint"; + repo = "hypnotix"; + rev = version; + hash = "sha256-jjCyO6lyhqH4xeNp5uy/KqNr5Mvv+45pJGHFOXNi0rk="; + }; + + patches = [ + (substituteAll { + src = ./libmpv-path.patch; + libmpv = "${lib.getLib mpv}/lib/libmpv${stdenv.hostPlatform.extensions.sharedLibrary}"; + }) + ]; + + postPatch = '' + substituteInPlace usr/lib/hypnotix/hypnotix.py \ + --replace __DEB_VERSION__ ${version} \ + --replace /usr/share/hypnotix $out/share/hypnotix + ''; + + nativeBuildInputs = [ + gettext + gobject-introspection + python3.pkgs.wrapPython + wrapGAppsHook + ]; + + dontWrapGApps = true; + + buildInputs = [ + cinnamon.xapp + ]; + + pythonPath = with python3.pkgs; [ + cinemagoer + pygobject3 + requests + setproctitle + unidecode + xapp + ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out + cp -r usr/lib $out + cp -r usr/share $out + + glib-compile-schemas $out/share/glib-2.0/schemas + + runHook postInstall + ''; + + preFixup = '' + buildPythonPath "$out $pythonPath" + makeWrapper ${python3.interpreter} $out/bin/hypnotix \ + --add-flags $out/lib/hypnotix/hypnotix.py \ + --prefix PYTHONPATH : "$program_PYTHONPATH" \ + ''${gappsWrapperArgs[@]} + ''; + + meta = { + description = "IPTV streaming application"; + homepage = "https://github.com/linuxmint/hypnotix"; + changelog = "https://github.com/linuxmint/hypnotix/blob/${src.rev}/debian/changelog"; + license = lib.licenses.gpl3Plus; + maintainers = with lib.maintainers; [ dotlambda ]; + platforms = lib.platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/video/hypnotix/libmpv-path.patch b/nixpkgs/pkgs/applications/video/hypnotix/libmpv-path.patch new file mode 100644 index 000000000000..86337b4930af --- /dev/null +++ b/nixpkgs/pkgs/applications/video/hypnotix/libmpv-path.patch @@ -0,0 +1,18 @@ +diff --git a/usr/lib/hypnotix/mpv.py b/usr/lib/hypnotix/mpv.py +index f42a3be..f1fc40b 100644 +--- a/usr/lib/hypnotix/mpv.py ++++ b/usr/lib/hypnotix/mpv.py +@@ -44,12 +44,7 @@ else: + # still better than segfaulting, we are setting LC_NUMERIC to "C". + locale.setlocale(locale.LC_NUMERIC, 'C') + +- sofile = ctypes.util.find_library('mpv') +- if sofile is None: +- raise OSError("Cannot find libmpv in the usual places. Depending on your distro, you may try installing an " +- "mpv-devel or mpv-libs package. If you have libmpv around but this script can't find it, consult " +- "the documentation for ctypes.util.find_library which this script uses to look up the library " +- "filename.") ++ sofile = '@libmpv@' + backend = CDLL(sofile) + fs_enc = sys.getfilesystemencoding() + diff --git a/nixpkgs/pkgs/applications/video/iina/default.nix b/nixpkgs/pkgs/applications/video/iina/default.nix index 3adb2a926d28..bb3fd9cd5e5b 100644 --- a/nixpkgs/pkgs/applications/video/iina/default.nix +++ b/nixpkgs/pkgs/applications/video/iina/default.nix @@ -6,11 +6,11 @@ stdenv.mkDerivation rec { pname = "iina"; - version = "1.2.0"; + version = "1.3.0"; src = fetchurl { url = "https://github.com/iina/iina/releases/download/v${version}/IINA.v${version}.dmg"; - sha256 = "sha256-kbh+gAVfCXoct6jJGXnetTAzFfIGdVLL5zh/SL/EJzY="; + sha256 = "sha256-tQxBaCgAXh7sDcgGbJYe/MOJ5r4aWllVQepi1I0xo5E="; }; nativeBuildInputs = [ undmg ]; diff --git a/nixpkgs/pkgs/applications/video/jellyfin-media-player/default.nix b/nixpkgs/pkgs/applications/video/jellyfin-media-player/default.nix index 82d34d188ff6..4f2b4ef440f7 100644 --- a/nixpkgs/pkgs/applications/video/jellyfin-media-player/default.nix +++ b/nixpkgs/pkgs/applications/video/jellyfin-media-player/default.nix @@ -22,22 +22,19 @@ , qtwebchannel , qtwebengine , qtx11extras +, jellyfin-web +, withDbus ? stdenv.isLinux, dbus }: mkDerivation rec { pname = "jellyfin-media-player"; - version = "1.6.1"; + version = "1.7.1"; src = fetchFromGitHub { owner = "jellyfin"; repo = "jellyfin-media-player"; rev = "v${version}"; - sha256 = "sha256-iqwOv95JFxQ1j/9B+oBFAp7mD1/1g2EJYvvUKbrDQes="; - }; - - jmpDist = fetchzip { - url = "https://github.com/iwalton3/jellyfin-web-jmp/releases/download/jwc-10.7.3/dist.zip"; - sha256 = "sha256-P7WEYbVvpaVLwMgqC2e8QtMOaJclg0bX78J1fdGzcCU="; + sha256 = "sha256-piMqI4qxcNUSNC+0JE2KZ/cvlNgtxUOnSfrcWnBVzC0="; }; patches = [ @@ -78,12 +75,13 @@ mkDerivation rec { "-DCMAKE_BUILD_TYPE=Release" "-DQTROOT=${qtbase}" "-GNinja" + ] ++ lib.optionals (!withDbus) [ + "-DLINUX_X11POWER=ON" ]; preBuild = '' - # copy the webclient-files to the expected "dist" directory - mkdir -p dist - cp -a ${jmpDist}/* dist + # link the jellyfin-web files to the expected "dist" directory + ln -s ${jellyfin-web}/share/jellyfin-web dist ''; postInstall = lib.optionalString stdenv.isDarwin '' diff --git a/nixpkgs/pkgs/applications/video/jellyfin-mpv-shim/default.nix b/nixpkgs/pkgs/applications/video/jellyfin-mpv-shim/default.nix index 827824930cb2..da75adab7b51 100644 --- a/nixpkgs/pkgs/applications/video/jellyfin-mpv-shim/default.nix +++ b/nixpkgs/pkgs/applications/video/jellyfin-mpv-shim/default.nix @@ -13,11 +13,11 @@ buildPythonApplication rec { pname = "jellyfin-mpv-shim"; - version = "2.0.2"; + version = "2.2.0"; src = fetchPypi { inherit pname version; - sha256 = "yFFMsGbzMAKyXpD/vZelswYulTYe5WybjG5pD2RpLrk="; + sha256 = "sha256-JiSC6WjrLsWk3/m/EHq7KNXaJ6rqT2fG9TT1jPvYlK0="; }; propagatedBuildInputs = [ diff --git a/nixpkgs/pkgs/applications/video/kodi/add-KODI_WEBSERVER_EXTRA_WHITELIST.patch b/nixpkgs/pkgs/applications/video/kodi/add-KODI_WEBSERVER_EXTRA_WHITELIST.patch new file mode 100644 index 000000000000..ae221eff6045 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/kodi/add-KODI_WEBSERVER_EXTRA_WHITELIST.patch @@ -0,0 +1,88 @@ +From 620c3eb38f0dbea6e877e37e97508513e87a0732 Mon Sep 17 00:00:00 2001 +From: Jeremy Fleischman <jeremyfleischman@gmail.com> +Date: Sun, 27 Mar 2022 00:44:52 -0700 +Subject: [PATCH] Add new KODI_WEBSERVER_EXTRA_WHITELIST cmake var to allow + access to more directories + +(This is a backport of +https://github.com/xbmc/xbmc/commit/a6dedce7ba1f03bdd83b019941d1e369a06f7888 +to Kodi 19.4 Matrix) + +This is useful for NixOS, which often ends up creating a `KODI_HOME` +with symlinks to other files (including the chorus2 interface). Kodi's +webserver cautiously refuses to follow these symlinks, and you end up +getting 404s rather than the web page. + +See https://forum.kodi.tv/showthread.php?tid=366338&pid=3079493 for a +discussion of this on the Kodi forum. +--- + CMakeLists.txt | 1 + + xbmc/CompileInfo.cpp.in | 5 +++++ + xbmc/CompileInfo.h | 1 + + xbmc/utils/FileUtils.cpp | 6 +++++- + 4 files changed, 12 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2d5369798df23..d5ef6d9390ef0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -243,6 +243,7 @@ add_custom_command(OUTPUT ${CORE_BUILD_DIR}/xbmc/CompileInfo.cpp + -DAPP_BUILD_DATE=${APP_BUILD_DATE} + -DAPP_SHARED_LIBRARY_SUFFIX="${APP_SHARED_LIBRARY_SUFFIX}" + -Dprefix=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR} ++ -DKODI_WEBSERVER_EXTRA_WHITELIST="${KODI_WEBSERVER_EXTRA_WHITELIST}" + -P ${CMAKE_SOURCE_DIR}/cmake/scripts/common/GenerateVersionedFiles.cmake + DEPENDS ${CMAKE_SOURCE_DIR}/version.txt + export-files +diff --git a/xbmc/CompileInfo.cpp.in b/xbmc/CompileInfo.cpp.in +index f81fe77902236..4f19203a89cde 100644 +--- a/xbmc/CompileInfo.cpp.in ++++ b/xbmc/CompileInfo.cpp.in +@@ -105,3 +105,8 @@ std::vector<std::string> CCompileInfo::GetAvailableWindowSystems() + { + return StringUtils::Split("@CORE_PLATFORM_NAME_LC@", ' '); + } ++ ++const std::vector<std::string> CCompileInfo::GetWebserverExtraWhitelist() ++{ ++ return StringUtils::Split("@KODI_WEBSERVER_EXTRA_WHITELIST@", ','); ++} +diff --git a/xbmc/CompileInfo.h b/xbmc/CompileInfo.h +index 553a0194ee77f..e2521324e6576 100644 +--- a/xbmc/CompileInfo.h ++++ b/xbmc/CompileInfo.h +@@ -32,4 +32,5 @@ class CCompileInfo + static const char* GetVersionCode(); + static std::vector<std::string> GetAvailableWindowSystems(); + static std::vector<ADDON::RepoInfo> LoadOfficialRepoInfos(); ++ static const std::vector<std::string> GetWebserverExtraWhitelist(); + }; +diff --git a/xbmc/utils/FileUtils.cpp b/xbmc/utils/FileUtils.cpp +index e51f3d631c256..fc717c9608098 100644 +--- a/xbmc/utils/FileUtils.cpp ++++ b/xbmc/utils/FileUtils.cpp +@@ -6,6 +6,7 @@ + * See LICENSES/README.md for more information. + */ + ++#include "CompileInfo.h" + #include "FileUtils.h" + #include "ServiceBroker.h" + #include "guilib/GUIKeyboardFactory.h" +@@ -261,12 +262,15 @@ bool CFileUtils::CheckFileAccessAllowed(const std::string &filePath) + "/.ssh/", + }; + // ALLOW kodi paths +- const std::vector<std::string> whitelist = { ++ std::vector<std::string> whitelist = { + CSpecialProtocol::TranslatePath("special://home"), + CSpecialProtocol::TranslatePath("special://xbmc"), + CSpecialProtocol::TranslatePath("special://musicartistsinfo") + }; + ++ auto kodiExtraWhitelist = CCompileInfo::GetWebserverExtraWhitelist(); ++ whitelist.insert(whitelist.end(), kodiExtraWhitelist.begin(), kodiExtraWhitelist.end()); ++ + // image urls come in the form of image://... sometimes with a / appended at the end + // and can be embedded in a music or video file image://music@... + // strip this off to get the real file path diff --git a/nixpkgs/pkgs/applications/video/kodi/addons/certifi/default.nix b/nixpkgs/pkgs/applications/video/kodi/addons/certifi/default.nix index 1088f560adf9..210429c77706 100644 --- a/nixpkgs/pkgs/applications/video/kodi/addons/certifi/default.nix +++ b/nixpkgs/pkgs/applications/video/kodi/addons/certifi/default.nix @@ -2,11 +2,11 @@ buildKodiAddon rec { pname = "certifi"; namespace = "script.module.certifi"; - version = "2020.12.05+matrix.1"; + version = "2022.5.18+matrix.1"; src = fetchzip { url = "https://mirrors.kodi.tv/addons/matrix/${namespace}/${namespace}-${version}.zip"; - sha256 = "1z49b8va7wdyr714c8ixb2sldi0igffcjj3xpbmga58ph0z985vy"; + sha256 = "tk4Ven35sicLxrT7SO2yx5kQORjFP6niRuS9SMocJKY="; }; passthru = { diff --git a/nixpkgs/pkgs/applications/video/kodi/addons/idna/default.nix b/nixpkgs/pkgs/applications/video/kodi/addons/idna/default.nix index 01f16696faee..e21613dce615 100644 --- a/nixpkgs/pkgs/applications/video/kodi/addons/idna/default.nix +++ b/nixpkgs/pkgs/applications/video/kodi/addons/idna/default.nix @@ -2,11 +2,11 @@ buildKodiAddon rec { pname = "idna"; namespace = "script.module.idna"; - version = "2.10.0+matrix.1"; + version = "3.3.0+matrix.1"; src = fetchzip { url = "https://mirrors.kodi.tv/addons/matrix/${namespace}/${namespace}-${version}.zip"; - sha256 = "0pm86m8kh2p0brps3xzxcmmabvb4izkglzkj8dsn33br3vlc7cm7"; + sha256 = "gXW1BvM3CLKshVPaemjmzEoZekU0QjuxJY9zGbGwK18="; }; passthru = { diff --git a/nixpkgs/pkgs/applications/video/kodi/addons/inputstream-adaptive/default.nix b/nixpkgs/pkgs/applications/video/kodi/addons/inputstream-adaptive/default.nix index b16bab1b217a..684e73a632a4 100644 --- a/nixpkgs/pkgs/applications/video/kodi/addons/inputstream-adaptive/default.nix +++ b/nixpkgs/pkgs/applications/video/kodi/addons/inputstream-adaptive/default.nix @@ -2,13 +2,13 @@ buildKodiBinaryAddon rec { pname = "inputstream-adaptive"; namespace = "inputstream.adaptive"; - version = "19.0.3"; + version = "19.0.7"; src = fetchFromGitHub { owner = "xbmc"; repo = "inputstream.adaptive"; rev = "${version}-${rel}"; - sha256 = "sha256-YYIPPxM8zVIugqLz0YntVZt1N+dReH+7V1Lkeif2wIY="; + sha256 = "sha256-2bQVTSMznh7soeL1VJJpXrlZd4ONmP9wq9pYLnwPnZE="; }; extraNativeBuildInputs = [ gtest ]; diff --git a/nixpkgs/pkgs/applications/video/kodi/addons/inputstream-ffmpegdirect/default.nix b/nixpkgs/pkgs/applications/video/kodi/addons/inputstream-ffmpegdirect/default.nix index 78b6ea5ac1d1..520dafff0b74 100644 --- a/nixpkgs/pkgs/applications/video/kodi/addons/inputstream-ffmpegdirect/default.nix +++ b/nixpkgs/pkgs/applications/video/kodi/addons/inputstream-ffmpegdirect/default.nix @@ -3,13 +3,13 @@ buildKodiBinaryAddon rec { pname = "inputstream-ffmpegdirect"; namespace = "inputstream.ffmpegdirect"; - version = "19.0.1"; + version = "19.0.3"; src = fetchFromGitHub { owner = "xbmc"; repo = "inputstream.ffmpegdirect"; rev = "${version}-${rel}"; - sha256 = "sha256-yVMo3cRsIww1y0jGrqRag2Bc1x98+e86AHlnY1O9klE="; + sha256 = "sha256-G1+WhF0iEOhgQPXPv0LjpLSvDk3JpkryaGJYuG+5P40="; }; extraBuildInputs = [ bzip2 zlib kodi.ffmpeg ]; diff --git a/nixpkgs/pkgs/applications/video/kodi/addons/inputstreamhelper/default.nix b/nixpkgs/pkgs/applications/video/kodi/addons/inputstreamhelper/default.nix index 7698e6619d91..1319f72f4e97 100644 --- a/nixpkgs/pkgs/applications/video/kodi/addons/inputstreamhelper/default.nix +++ b/nixpkgs/pkgs/applications/video/kodi/addons/inputstreamhelper/default.nix @@ -2,11 +2,11 @@ buildKodiAddon rec { pname = "inputstreamhelper"; namespace = "script.module.inputstreamhelper"; - version = "0.5.8+matrix.1"; + version = "0.5.10+matrix.1"; src = fetchzip { url = "https://mirrors.kodi.tv/addons/matrix/${namespace}/${namespace}-${version}.zip"; - sha256 = "xdsUzmz8ji9JcYLEUFWwvXq0Oig5i08VPQD93K8R9hk="; + sha256 = "FcOktwtOT7kDM+3y9qPDk3xU1qVeCduyAdUzebtJzv4="; }; passthru = { diff --git a/nixpkgs/pkgs/applications/video/kodi/addons/invidious/default.nix b/nixpkgs/pkgs/applications/video/kodi/addons/invidious/default.nix new file mode 100644 index 000000000000..c2885ba03a0a --- /dev/null +++ b/nixpkgs/pkgs/applications/video/kodi/addons/invidious/default.nix @@ -0,0 +1,32 @@ +{ lib, buildKodiAddon, fetchpatch, fetchzip, addonUpdateScript, requests, inputstream-adaptive, inputstreamhelper }: + +buildKodiAddon rec { + pname = "invidious"; + namespace = "plugin.video.invidious"; + version = "0.1.0+matrix.1"; + + src = fetchzip { + url = "https://mirrors.kodi.tv/addons/matrix/${namespace}/${namespace}-${version}.zip"; + sha256 = "sha256-4z2/YTso5KV6JHS/DOXll2lKOoVnW1i5MnpmV6ESXbM="; + }; + + propagatedBuildInputs = [ + requests + inputstream-adaptive + inputstreamhelper + ]; + + passthru = { + pythonPath = "resources/lib"; + updateScript = addonUpdateScript { + attrPath = "kodi.packages.invidious"; + }; + }; + + meta = with lib; { + homepage = "https://github.com/TheAssassin/kodi-invidious-plugin"; + description = "A privacy-friendly way of watching YouTube content"; + license = licenses.mit; + maintainers = teams.kodi.members; + }; +} diff --git a/nixpkgs/pkgs/applications/video/kodi/addons/pvr-iptvsimple/default.nix b/nixpkgs/pkgs/applications/video/kodi/addons/pvr-iptvsimple/default.nix index 89aa3c7d3585..2e20043c162d 100644 --- a/nixpkgs/pkgs/applications/video/kodi/addons/pvr-iptvsimple/default.nix +++ b/nixpkgs/pkgs/applications/video/kodi/addons/pvr-iptvsimple/default.nix @@ -6,13 +6,13 @@ buildKodiBinaryAddon rec { pname = "pvr-iptvsimple"; namespace = "pvr.iptvsimple"; - version = "19.1.0"; + version = "19.1.1"; src = fetchFromGitHub { owner = "kodi-pvr"; repo = "pvr.iptvsimple"; rev = "${version}-${rel}"; - sha256 = "sha256-APRj/Z/GtRXNSVX5kB0o09FTa9me2ESzrZ/Q+QNrw0w="; + sha256 = "sha256-ZkB+Va9w/AHLZ+LSOJpJ93nVOw33tcNqjScbLt77zJw="; }; extraBuildInputs = [ diff --git a/nixpkgs/pkgs/applications/video/kodi/addons/requests/default.nix b/nixpkgs/pkgs/applications/video/kodi/addons/requests/default.nix index c5759fcc325b..3361a03f5d28 100644 --- a/nixpkgs/pkgs/applications/video/kodi/addons/requests/default.nix +++ b/nixpkgs/pkgs/applications/video/kodi/addons/requests/default.nix @@ -2,11 +2,11 @@ buildKodiAddon rec { pname = "requests"; namespace = "script.module.requests"; - version = "2.25.1+matrix.1"; + version = "2.27.1+matrix.1"; src = fetchzip { url = "https://mirrors.kodi.tv/addons/matrix/${namespace}/${namespace}-${version}.zip"; - sha256 = "00qhykizvspzfwgl7qz9cyxrazs54jgin40g49v5nzmjq3qf62hb"; + sha256 = "QxxVT6XaEYQtAFkZde8EaTXzGO7cjG2pApQZcA32xA0="; }; propagatedBuildInputs = [ diff --git a/nixpkgs/pkgs/applications/video/kodi/addons/urllib3/default.nix b/nixpkgs/pkgs/applications/video/kodi/addons/urllib3/default.nix index de0fbb997654..1becee357bee 100644 --- a/nixpkgs/pkgs/applications/video/kodi/addons/urllib3/default.nix +++ b/nixpkgs/pkgs/applications/video/kodi/addons/urllib3/default.nix @@ -1,12 +1,13 @@ { lib, buildKodiAddon, fetchzip, addonUpdateScript }: + buildKodiAddon rec { pname = "urllib3"; namespace = "script.module.urllib3"; - version = "1.26.4+matrix.1"; + version = "1.26.9+matrix.1"; src = fetchzip { url = "https://mirrors.kodi.tv/addons/matrix/${namespace}/${namespace}-${version}.zip"; - sha256 = "1d2k6gbsnhdadcl1xc7igz4m71z2fcnpln5ppfjv455cmkk110vf"; + sha256 = "w2HXepAHLE4NAWTXOQgY3ifr3mlI/QYF6KAKqpAmO/g="; }; passthru = { diff --git a/nixpkgs/pkgs/applications/video/kodi/unwrapped.nix b/nixpkgs/pkgs/applications/video/kodi/unwrapped.nix index 18319468eae9..a37e5c92e241 100644 --- a/nixpkgs/pkgs/applications/video/kodi/unwrapped.nix +++ b/nixpkgs/pkgs/applications/video/kodi/unwrapped.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchFromGitHub, autoconf, automake, libtool, makeWrapper -, pkg-config, cmake, gnumake, yasm, python3Packages +, pkg-config, cmake, yasm, python3Packages , libgcrypt, libgpg-error, libunistring , boost, avahi, lame , gettext, pcre-cpp, yajl, fribidi, which @@ -107,6 +107,15 @@ in stdenv.mkDerivation { src = kodi_src; + # This is a backport of + # https://github.com/xbmc/xbmc/commit/a6dedce7ba1f03bdd83b019941d1e369a06f7888 + # to Kodi 19.4 Matrix. + # This can be removed once a new release of Kodi comes out and we upgrade + # to it. + patches = [ + ./add-KODI_WEBSERVER_EXTRA_WHITELIST.patch + ]; + buildInputs = [ gnutls libidn libtasn1 nasm p11-kit libxml2 python3Packages.python @@ -160,7 +169,7 @@ in stdenv.mkDerivation { doxygen makeWrapper which - pkg-config gnumake + pkg-config autoconf automake libtool # still needed for some components. Check if that is the case with 19.0 jre_headless yasm gettext python3Packages.python flatbuffers @@ -185,6 +194,12 @@ in stdenv.mkDerivation { "-DSWIG_EXECUTABLE=${buildPackages.swig}/bin/swig" "-DFLATBUFFERS_FLATC_EXECUTABLE=${buildPackages.flatbuffers}/bin/flatc" "-DPYTHON_EXECUTABLE=${buildPackages.python3Packages.python}/bin/python" + # When wrapped KODI_HOME will likely contain symlinks to static assets + # that Kodi's built in webserver will cautiously refuse to serve up + # (because their realpaths are outside of KODI_HOME and the other + # whitelisted directories). This adds the entire nix store to the Kodi + # webserver whitelist to avoid this problem. + "-DKODI_WEBSERVER_EXTRA_WHITELIST=${builtins.storeDir}" ] ++ lib.optional waylandSupport [ "-DWAYLANDPP_SCANNER=${buildPackages.waylandpp}/bin/wayland-scanner++" ]; diff --git a/nixpkgs/pkgs/applications/video/kodi/wrapper.nix b/nixpkgs/pkgs/applications/video/kodi/wrapper.nix index 2380d0023d57..52b7679a325e 100644 --- a/nixpkgs/pkgs/applications/video/kodi/wrapper.nix +++ b/nixpkgs/pkgs/applications/video/kodi/wrapper.nix @@ -35,11 +35,5 @@ buildEnv { (lib.concatMap (plugin: plugin.extraRuntimeDependencies or []) addons)}" done - - # makeWrapper just created webinterface.default as a symlink. However, - # kodi's webserver carefully refuses to follow symlinks, so we need to copy - # these assets instead. - rm $out/share/kodi/addons/webinterface.default - cp -r ${kodi}/share/kodi/addons/webinterface.default/ $out/share/kodi/addons/webinterface.default ''; } diff --git a/nixpkgs/pkgs/applications/video/lightworks/default.nix b/nixpkgs/pkgs/applications/video/lightworks/default.nix index affc585ed351..b01af67cd68e 100644 --- a/nixpkgs/pkgs/applications/video/lightworks/default.nix +++ b/nixpkgs/pkgs/applications/video/lightworks/default.nix @@ -23,15 +23,15 @@ let ]; lightworks = stdenv.mkDerivation rec { - version = "2021.2.1"; - rev = "128456"; + version = "2022.1.1"; + rev = "132926"; pname = "lightworks"; src = if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { - url = "https://cdn.lwks.com/releases/${version}/lightworks_${lib.versions.majorMinor version}_r${rev}.deb"; - sha256 = "sha256-GkTg43IUF1NgEm/wT9CZw68Dw/R2BYBU/F4bsCxQowQ="; + url = "https://cdn.lwks.com/releases/${version}/lightworks_${version}_r${rev}.deb"; + sha256 = "sha256-f2lxfv0sFESpDnINDKlfVcR0pySAueMeOMbkgBWzz7Q="; } else throw "${pname}-${version} is not supported on ${stdenv.hostPlatform.system}"; @@ -85,6 +85,7 @@ in buildFHSUserEnv { meta = { description = "Professional Non-Linear Video Editor"; homepage = "https://www.lwks.com/"; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; license = lib.licenses.unfree; maintainers = with lib.maintainers; [ antonxy vojta001 ]; platforms = [ "x86_64-linux" ]; diff --git a/nixpkgs/pkgs/applications/video/losslesscut-bin/appimage.nix b/nixpkgs/pkgs/applications/video/losslesscut-bin/appimage.nix index e6be6f54e1dc..87518479db4b 100644 --- a/nixpkgs/pkgs/applications/video/losslesscut-bin/appimage.nix +++ b/nixpkgs/pkgs/applications/video/losslesscut-bin/appimage.nix @@ -1,4 +1,4 @@ -{ appimageTools, lib, fetchurl, gtk3, gsettings-desktop-schemas, version, sha256 }: +{ appimageTools, lib, fetchurl, version, sha256 }: let pname = "losslesscut"; @@ -21,7 +21,6 @@ in appimageTools.wrapType2 { profile = '' export LC_ALL=C.UTF-8 - export XDG_DATA_DIRS=${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_DATA_DIRS ''; extraPkgs = ps: appimageTools.defaultFhsEnvArgs.multiPkgs ps; diff --git a/nixpkgs/pkgs/applications/video/lxdvdrip/default.nix b/nixpkgs/pkgs/applications/video/lxdvdrip/default.nix index 60604a4b8abf..a374d7b9b328 100644 --- a/nixpkgs/pkgs/applications/video/lxdvdrip/default.nix +++ b/nixpkgs/pkgs/applications/video/lxdvdrip/default.nix @@ -22,6 +22,7 @@ stdenv.mkDerivation rec { buildInputs = [ libdvdread ]; meta = { + broken = (stdenv.isLinux && stdenv.isAarch64); description = "Command line tool to make a copy from a video DVD for private use"; homepage = "https://sourceforge.net/projects/lxdvdrip"; license = lib.licenses.gpl2; diff --git a/nixpkgs/pkgs/applications/video/makemkv/default.nix b/nixpkgs/pkgs/applications/video/makemkv/default.nix index 712ccacd7a0c..c3d758268917 100644 --- a/nixpkgs/pkgs/applications/video/makemkv/default.nix +++ b/nixpkgs/pkgs/applications/video/makemkv/default.nix @@ -55,7 +55,7 @@ in mkDerivation { installPhase = '' runHook preInstall - install -Dm555 -t $out/bin out/makemkv ../makemkv-bin-${version}/bin/amd64/makemkvcon + install -Dm555 -t $out/bin out/makemkv out/mmccextr ../makemkv-bin-${version}/bin/amd64/makemkvcon install -D -t $out/lib out/lib{driveio,makemkv,mmbd}.so.* install -D -t $out/share/MakeMKV ../makemkv-bin-${version}/src/share/* install -Dm444 -t $out/share/applications ../makemkv-oss-${version}/makemkvgui/share/makemkv.desktop @@ -79,6 +79,7 @@ in mkDerivation { can always download the latest version from makemkv.com that will reset the expiration date. ''; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; license = licenses.unfree; homepage = "http://makemkv.com"; platforms = [ "x86_64-linux" ]; diff --git a/nixpkgs/pkgs/applications/video/manim/default.nix b/nixpkgs/pkgs/applications/video/manim/default.nix index 5da81eff50e6..67a406d134e9 100644 --- a/nixpkgs/pkgs/applications/video/manim/default.nix +++ b/nixpkgs/pkgs/applications/video/manim/default.nix @@ -1,64 +1,134 @@ -{ lib, buildPythonApplication, fetchFromGitHub, pythonOlder, file, fetchpatch -, cairo, ffmpeg, sox, xdg-utils, texlive -, colour, numpy, pillow, progressbar, scipy, tqdm, opencv , pycairo, pydub -, pbr, fetchPypi +{ lib +, fetchFromGitHub + +, cairo +, ffmpeg +, texlive + +, python3 }: -buildPythonApplication rec { + +let + # According to ManimCommunity documentation manim uses tex-packages packaged + # in a custom distribution called "manim-latex", + # + # https://community.chocolatey.org/packages/manim-latex#files + # + # which includes another cutom distribution called tinytex, for which the + # package list can be found at + # + # https://github.com/yihui/tinytex/blob/master/tools/pkgs-custom.txt + # + # these two combined add up to: + manim-tinytex = { + inherit (texlive) + + # tinytex + scheme-infraonly amsfonts amsmath atbegshi atveryend auxhook babel bibtex + bigintcalc bitset booktabs cm dehyph dvipdfmx dvips ec epstopdf-pkg etex + etexcmds etoolbox euenc everyshi fancyvrb filehook firstaid float fontspec + framed geometry gettitlestring glyphlist graphics graphics-cfg graphics-def + grffile helvetic hycolor hyperref hyph-utf8 iftex inconsolata infwarerr + intcalc knuth-lib kvdefinekeys kvoptions kvsetkeys l3backend l3kernel + l3packages latex latex-amsmath-dev latex-bin latex-fonts latex-tools-dev + latexconfig latexmk letltxmacro lm lm-math ltxcmds lua-alt-getopt luahbtex + lualatex-math lualibs luaotfload luatex mdwtools metafont mfware natbib + pdfescape pdftex pdftexcmds plain psnfss refcount rerunfilecheck stringenc + tex tex-ini-files times tipa tools unicode-data unicode-math uniquecounter + url xcolor xetex xetexconfig xkeyval xunicode zapfding + + # manim-latex + standalone everysel preview doublestroke ms setspace rsfs relsize ragged2e + fundus-calligra microtype wasysym physics dvisvgm jknapltx wasy cm-super + babel-english gnu-freefont mathastext cbfonts-fd; + }; +in python3.pkgs.buildPythonApplication rec { pname = "manim"; - version = "0.1.10"; + format = "pyproject"; + version = "0.16.0"; + disabled = python3.pythonOlder "3.8"; - src = fetchPypi { - pname = "manimlib"; - inherit version; - sha256 = "0vg9b3rwypq5zir74pi0pmj47yqlcg7hrvscwrpjzjbqq2yihn49"; + src = fetchFromGitHub { + owner = "ManimCommunity"; + repo = pname; + rev = "refs/tags/v${version}"; + sha256 = "sha256-NQI+kJV0Mu2O/DlwwLYQw2jjJk/TmR7avBX9Fe7zmdk="; }; - patches = [ ./remove-dependency-constraints.patch ]; + nativeBuildInputs = [ + python3.pkgs.poetry-core + ]; - nativeBuildInputs = [ pbr ]; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace "--no-cov-on-fail --cov=manim --cov-report xml --cov-report term" "" \ + --replace 'cloup = "^0.13.0"' 'cloup = "*"' \ + --replace 'mapbox-earcut = "^0.12.10"' 'mapbox-earcut = "*"' \ + ''; - propagatedBuildInputs = [ + buildInputs = [ cairo ]; + + propagatedBuildInputs = with python3.pkgs; [ + click + click-default-group + cloup colour + grpcio + grpcio-tools + importlib-metadata + isosurfaces + jupyterlab + manimpango + mapbox-earcut + moderngl + moderngl-window + networkx numpy pillow - progressbar - scipy - tqdm - opencv pycairo pydub + pygments + pysrt + rich + scipy + screeninfo + skia-pathops + srt + tqdm + watchdog + ]; - cairo sox ffmpeg xdg-utils + makeWrapperArgs = [ + "--prefix" "PATH" ":" (lib.makeBinPath [ + ffmpeg + (texlive.combine manim-tinytex) + ]) ]; - # Test with texlive to see whether it works but don't propagate - # because it's huge and optional - # TODO: Use smaller TexLive distribution - # Doesn't need everything but it's hard to figure out what it needs - checkInputs = [ cairo sox ffmpeg xdg-utils texlive.combined.scheme-full ]; - - # Simple test and complex test with LaTeX - checkPhase = '' - for scene in SquareToCircle OpeningManimExample - do - python3 manim.py example_scenes.py $scene -l - tail -n 20 files/Tex/*.log # Print potential LaTeX erorrs - ${file}/bin/file videos/example_scenes/480p15/$scene.mp4 \ - | tee | grep -F "ISO Media, MP4 Base Media v1 [ISO 14496-12:2003]" - done - ''; - disabled = pythonOlder "3.7"; + checkInputs = [ + python3.pkgs.pytest-xdist + python3.pkgs.pytestCheckHook + + ffmpeg + (texlive.combine manim-tinytex) + ]; + + # about 55 of ~600 tests failing mostly due to demand for display + disabledTests = import ./failing_tests.nix; + + pythonImportsCheck = [ "manim" ]; - meta = { - description = "Animation engine for explanatory math videos"; + meta = with lib; { + description = "Animation engine for explanatory math videos - Community version"; longDescription = '' Manim is an animation engine for explanatory math videos. It's used to create precise animations programmatically, as seen in the videos of - 3Blue1Brown on YouTube. + 3Blue1Brown on YouTube. This is the community maintained version of + manim. ''; - homepage = "https://github.com/3b1b/manim"; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ johnazoidberg ]; + homepage = "https://github.com/ManimCommunity/manim"; + license = licenses.mit; + maintainers = with maintainers; [ friedelino ]; }; } diff --git a/nixpkgs/pkgs/applications/video/manim/failing_tests.nix b/nixpkgs/pkgs/applications/video/manim/failing_tests.nix new file mode 100644 index 000000000000..a1f82a98dc16 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/manim/failing_tests.nix @@ -0,0 +1,74 @@ +# reason for failure: tests try to open display +[ + "test_background_color" + "test_scene_add_remove" + "test_Circle" + "test_wait_skip" + "test_basic_scene_with_default_values" + "test_dry_run_with_png_format" + "test_dry_run_with_png_format_skipped_animations" + "test_FixedMobjects3D" + "test_basic_scene_l_flag" + "test_n_flag" + "test_s_flag_opengl_renderer" + "test_s_flag_no_animations" + "test_image_output_for_static_scene" + "test_no_image_output_with_interactive_embed" + "test_no_default_image_output_with_non_static_scene" + "test_image_output_for_static_scene_with_write_to_movie" + "test_s_flag" + "test_r_flag" + "test_play_skip" + "test_write_to_movie_disables_window" + "test_a_flag" + "test_pixel_coords_to_space_coords" + "test_t_values" + "test_custom_folders" + "test_t_values[15]" + "test_t_values[30]" + "test_t_values[60]" + "test_dash_as_filename" + "test_images_are_created_when_png_format_set_for_opengl" + "test_t_values_with_skip_animations" + "test_static_wait_detection" + "test_non_static_wait_detection" + "test_frozen_frame" + "test_gif_format_output" + "test_animate_with_changed_custom_attribute" + "test_images_are_zero_padded_when_zero_pad_set_for_opengl" + "test_mp4_format_output" + "test_videos_not_created_when_png_format_set" + "test_images_are_created_when_png_format_set" + "test_images_are_zero_padded_when_zero_pad_set" + "test_webm_format_output" + "test_default_format_output_for_transparent_flag" + "test_mov_can_be_set_as_output_format" + "test_force_window_opengl_render_with_format" + "test_get_frame_with_preview_disabled" + "test_get_frame_with_preview_enabled" +] ++ + +# reason for failure: tests try to reach network +[ + "test_logging_to_file" + "test_plugin_function_like" + "test_plugin_no_all" + "test_plugin_with_all" +] ++ + +# failing with: +# E AssertionError: +# E Not equal to tolerance rtol=1e-07, atol=1.01 +# E Frame no -1. You can use --show_diff to visually show the difference. +# E Mismatched elements: 18525 / 1639680 (1.13%) +# E Max absolute difference: 255 +# E Max relative difference: 255. +[ + "test_Text2Color" +] ++ + +# failing with: +# TypeError: __init__() got an unexpected keyword argument 'msg' - maybe you meant pytest.mark.skipif? +[ + "test_force_window_opengl_render_with_movies" +] diff --git a/nixpkgs/pkgs/applications/video/manim/remove-dependency-constraints.patch b/nixpkgs/pkgs/applications/video/manim/remove-dependency-constraints.patch deleted file mode 100644 index 4a7da45d0f57..000000000000 --- a/nixpkgs/pkgs/applications/video/manim/remove-dependency-constraints.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git i/requirements.txt w/requirements.txt -index 556122ad..11fd49d5 100644 ---- i/requirements.txt -+++ w/requirements.txt -@@ -1,11 +1,10 @@ --argparse==1.4.0 --colour==0.1.5 --numpy==1.15.0 --Pillow==5.2.0 --progressbar==2.5 --scipy==1.1.0 --tqdm==4.24.0 --opencv-python==3.4.2.17 --pycairo==1.17.1; sys_platform == 'linux' --pycairo>=1.18.0; sys_platform == 'win32' --pydub==0.23.0 -+colour -+numpy -+Pillow -+progressbar -+scipy -+tqdm -+pycairo -+pycairo>=1.18.1; sys_platform == 'win32' -+pydub -+pyreadline==2.1; sys_platform == 'win32' diff --git a/nixpkgs/pkgs/applications/video/media-downloader/default.nix b/nixpkgs/pkgs/applications/video/media-downloader/default.nix new file mode 100644 index 000000000000..332f8ef78eea --- /dev/null +++ b/nixpkgs/pkgs/applications/video/media-downloader/default.nix @@ -0,0 +1,39 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, qt5 +, ffmpeg-full +, aria2 +, yt-dlp +, python3 +}: + +stdenv.mkDerivation rec { + pname = "media-downloader"; + version = "2.4.0"; + + src = fetchFromGitHub { + owner = "mhogomchungu"; + repo = pname; + rev = "${version}"; + sha256 = "sha256-EyfhomwBtdAt6HGRwnpiijm2D1LfaCAoG5qk3orDG98="; + }; + + nativeBuildInputs = [ cmake qt5.wrapQtAppsHook ]; + + preFixup = '' + qtWrapperArgs+=( + --prefix PATH : "${lib.makeBinPath [ ffmpeg-full aria2 yt-dlp python3 ]}" + ) + ''; + + meta = with lib; { + description = "A Qt/C++ GUI front end to youtube-dl"; + homepage = "https://github.com/mhogomchungu/media-downloader"; + license = licenses.gpl2Plus; + broken = stdenv.isDarwin; + platforms = platforms.unix; + maintainers = with maintainers; [ zendo ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/mediathekview/default.nix b/nixpkgs/pkgs/applications/video/mediathekview/default.nix index 7f36fd232e97..5ad81bc0a768 100644 --- a/nixpkgs/pkgs/applications/video/mediathekview/default.nix +++ b/nixpkgs/pkgs/applications/video/mediathekview/default.nix @@ -35,6 +35,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Offers access to the Mediathek of different tv stations (ARD, ZDF, Arte, etc.)"; homepage = "https://mediathekview.de/"; + sourceProvenance = with sourceTypes; [ binaryBytecode ]; license = licenses.gpl3Plus; maintainers = with maintainers; [ moredread ]; platforms = platforms.all; diff --git a/nixpkgs/pkgs/applications/video/mirakurun/default.nix b/nixpkgs/pkgs/applications/video/mirakurun/default.nix index 3987e1252844..d0d52ade25ad 100644 --- a/nixpkgs/pkgs/applications/video/mirakurun/default.nix +++ b/nixpkgs/pkgs/applications/video/mirakurun/default.nix @@ -6,9 +6,8 @@ { lib , stdenvNoCC , bash -, common-updater-scripts , fetchFromGitHub -, genericUpdater +, gitUpdater , jq , makeWrapper , mkYarnPackage @@ -61,7 +60,7 @@ stdenvNoCC.mkDerivation rec { mkdir -p $out/bin makeWrapper ${mirakurun}/bin/mirakurun-epgdump $out/bin/mirakurun-epgdump \ - --run "cd ${mirakurun}/libexec/mirakurun/node_modules/mirakurun" \ + --chdir "${mirakurun}/libexec/mirakurun/node_modules/mirakurun" \ --prefix PATH : ${lib.makeBinPath runtimeDeps} # XXX: The original mirakurun command uses PM2 to manage the Mirakurun @@ -70,7 +69,7 @@ stdenvNoCC.mkDerivation rec { # unique to PM2 is currently being used. makeWrapper ${yarn}/bin/yarn $out/bin/mirakurun-start \ --add-flags "start" \ - --run "cd ${mirakurun}/libexec/mirakurun/node_modules/mirakurun" \ + --chdir "${mirakurun}/libexec/mirakurun/node_modules/mirakurun" \ --prefix PATH : ${lib.makeBinPath runtimeDeps} ''; @@ -80,8 +79,7 @@ stdenvNoCC.mkDerivation rec { inherit pname version - common-updater-scripts - genericUpdater + gitUpdater writers jq yarn diff --git a/nixpkgs/pkgs/applications/video/mirakurun/update.nix b/nixpkgs/pkgs/applications/video/mirakurun/update.nix index 18a4d0ab2562..6fd13f81b87a 100644 --- a/nixpkgs/pkgs/applications/video/mirakurun/update.nix +++ b/nixpkgs/pkgs/applications/video/mirakurun/update.nix @@ -2,8 +2,7 @@ , version , homepage , lib -, common-updater-scripts -, genericUpdater +, gitUpdater , writers , jq , yarn @@ -11,15 +10,12 @@ }: let - updater = genericUpdater { + updater = gitUpdater { inherit pname version; attrPath = lib.toLower pname; # exclude prerelease versions - versionLister = writers.writeBash "list-mirakurun-versions" '' - ${common-updater-scripts}/bin/list-git-tags --url=${homepage} \ - | grep '^[0-9]\+\.[0-9]\+\.[0-9]\+$' - ''; + ignoredVersions = "-"; }; updateScript = builtins.elemAt updater 0; updateArgs = map (lib.escapeShellArg) (builtins.tail updater); diff --git a/nixpkgs/pkgs/applications/video/mkvtoolnix/default.nix b/nixpkgs/pkgs/applications/video/mkvtoolnix/default.nix index 137731312b0e..32c1e4a9f637 100644 --- a/nixpkgs/pkgs/applications/video/mkvtoolnix/default.nix +++ b/nixpkgs/pkgs/applications/video/mkvtoolnix/default.nix @@ -47,13 +47,13 @@ let in stdenv.mkDerivation rec { pname = "mkvtoolnix"; - version = "66.0.0"; + version = "70.0.0"; src = fetchFromGitLab { owner = "mbunkus"; repo = "mkvtoolnix"; rev = "release-${version}"; - sha256 = "sha256-JTPayZhV3Z+o1v+TbHp9SGMAZk1oEzMdNhk67BYB75A="; + sha256 = "sha256-7ryLf/SKM5m7MdOd2K2XhJEdLF2H8xjV1aZMKUjm+Ok="; }; nativeBuildInputs = [ @@ -117,9 +117,6 @@ stdenv.mkDerivation rec { checkPhase = phase "Check" "tests:run_unit"; - CXXFLAGS = optional stdenv.cc.isClang "-std=c++17"; - LDFLAGS = optional stdenv.cc.isClang "-lc++fs"; - dontWrapQtApps = true; postFixup = optionalString withGUI '' diff --git a/nixpkgs/pkgs/applications/video/mpc-qt/default.nix b/nixpkgs/pkgs/applications/video/mpc-qt/default.nix index 7c4126bb37c6..9f91cc0c3c08 100644 --- a/nixpkgs/pkgs/applications/video/mpc-qt/default.nix +++ b/nixpkgs/pkgs/applications/video/mpc-qt/default.nix @@ -1,23 +1,16 @@ -{ lib, stdenv, mkDerivation, fetchFromGitLab, fetchpatch, pkg-config, qmake, qtx11extras, qttools, mpv }: +{ lib, stdenv, mkDerivation, fetchFromGitHub, pkg-config, qmake, qtx11extras, qttools, mpv }: mkDerivation rec { pname = "mpc-qt"; - version = "2019-06-09"; + version = "22.02"; - src = fetchFromGitLab { + src = fetchFromGitHub { owner = "mpc-qt"; repo = "mpc-qt"; - rev = "2abe6e7fc643068d50522468fe75d614861555ad"; - sha256 = "1cis8dl9pm91mpnp696zvwsfp96gkwr8jgs45anbwd7ldw78w4x5"; + rev = "v${version}"; + sha256 = "sha256-DRbNDrWnaTT4A0dRFAv9MX/MDwV/rXIw+R8fQJmVN+g="; }; - patches = [ - (fetchpatch { - url = "https://gitlab.com/mpc-qt/mpc-qt/-/commit/02f2bc7a22e863a89ba322b9acb61cf1aef23ba0.diff"; - sha256 = "0khld55i194zgi18d0wch5459lfzzkbfdbl1im8akvq8ks5xijis"; - }) - ]; - nativeBuildInputs = [ pkg-config qmake qttools ]; buildInputs = [ mpv qtx11extras ]; @@ -26,7 +19,7 @@ mkDerivation rec { meta = with lib; { description = "Media Player Classic Qute Theater"; - homepage = "https://gitlab.com/mpc-qt/mpc-qt"; + homepage = "https://mpc-qt.github.io"; license = licenses.gpl2; platforms = platforms.unix; broken = stdenv.isDarwin; diff --git a/nixpkgs/pkgs/applications/video/mplayer/default.nix b/nixpkgs/pkgs/applications/video/mplayer/default.nix index 0c435bfbe158..6d280e71b861 100644 --- a/nixpkgs/pkgs/applications/video/mplayer/default.nix +++ b/nixpkgs/pkgs/applications/video/mplayer/default.nix @@ -1,60 +1,37 @@ { config, lib, stdenv, fetchurl, fetchsvn, pkg-config, freetype, yasm, ffmpeg -, aalibSupport ? true, aalib ? null -, fontconfigSupport ? true, fontconfig ? null, freefont_ttf ? null -, fribidiSupport ? true, fribidi ? null -, x11Support ? true, libX11 ? null, libXext ? null, libGLU, libGL ? null -, xineramaSupport ? true, libXinerama ? null -, xvSupport ? true, libXv ? null -, alsaSupport ? stdenv.isLinux, alsa-lib ? null -, screenSaverSupport ? true, libXScrnSaver ? null -, vdpauSupport ? false, libvdpau ? null -, cddaSupport ? !stdenv.isDarwin, cdparanoia ? null -, dvdnavSupport ? !stdenv.isDarwin, libdvdnav ? null -, dvdreadSupport ? true, libdvdread ? null -, bluraySupport ? true, libbluray ? null -, amrSupport ? false, amrnb ? null, amrwb ? null -, cacaSupport ? true, libcaca ? null -, lameSupport ? true, lame ? null -, speexSupport ? true, speex ? null -, theoraSupport ? true, libtheora ? null -, x264Support ? false, x264 ? null -, jackaudioSupport ? false, libjack2 ? null -, pulseSupport ? config.pulseaudio or false, libpulseaudio ? null -, bs2bSupport ? false, libbs2b ? null -, v4lSupport ? false, libv4l ? null +, aalibSupport ? true, aalib +, fontconfigSupport ? true, fontconfig, freefont_ttf +, fribidiSupport ? true, fribidi +, x11Support ? true, libX11, libXext, libGLU, libGL +, xineramaSupport ? true, libXinerama +, xvSupport ? true, libXv +, alsaSupport ? stdenv.isLinux, alsa-lib +, screenSaverSupport ? true, libXScrnSaver +, vdpauSupport ? false, libvdpau +, cddaSupport ? !stdenv.isDarwin, cdparanoia +, dvdnavSupport ? !stdenv.isDarwin, libdvdnav +, dvdreadSupport ? true, libdvdread +, bluraySupport ? true, libbluray +, amrSupport ? false, amrnb, amrwb +, cacaSupport ? true, libcaca +, lameSupport ? true, lame +, speexSupport ? true, speex +, theoraSupport ? true, libtheora +, x264Support ? false, x264 +, jackaudioSupport ? false, libjack2 +, pulseSupport ? config.pulseaudio or false, libpulseaudio +, bs2bSupport ? false, libbs2b +, v4lSupport ? false, libv4l # For screenshots -, libpngSupport ? true, libpng ? null -, libjpegSupport ? true, libjpeg ? null +, libpngSupport ? true, libpng +, libjpegSupport ? true, libjpeg , useUnfreeCodecs ? false -, darwin ? null +, darwin , buildPackages }: -assert fontconfigSupport -> (fontconfig != null); -assert (!fontconfigSupport) -> (freefont_ttf != null); -assert fribidiSupport -> (fribidi != null); -assert x11Support -> (libX11 != null && libXext != null && libGLU != null && libGL != null); -assert xineramaSupport -> (libXinerama != null && x11Support); -assert xvSupport -> (libXv != null && x11Support); -assert alsaSupport -> alsa-lib != null; -assert screenSaverSupport -> libXScrnSaver != null; -assert vdpauSupport -> libvdpau != null; -assert cddaSupport -> cdparanoia != null; -assert dvdnavSupport -> libdvdnav != null; -assert dvdreadSupport -> libdvdread != null; -assert bluraySupport -> libbluray != null; -assert amrSupport -> (amrnb != null && amrwb != null); -assert cacaSupport -> libcaca != null; -assert lameSupport -> lame != null; -assert speexSupport -> speex != null; -assert theoraSupport -> libtheora != null; -assert x264Support -> x264 != null; -assert jackaudioSupport -> libjack2 != null; -assert pulseSupport -> libpulseaudio != null; -assert bs2bSupport -> libbs2b != null; -assert libpngSupport -> libpng != null; -assert libjpegSupport -> libjpeg != null; -assert v4lSupport -> libv4l != null; +assert xineramaSupport -> x11Support; +assert xvSupport -> x11Support; let diff --git a/nixpkgs/pkgs/applications/video/mpv/default.nix b/nixpkgs/pkgs/applications/video/mpv/default.nix index 3ceda57fb899..cf81c0e0446c 100644 --- a/nixpkgs/pkgs/applications/video/mpv/default.nix +++ b/nixpkgs/pkgs/applications/video/mpv/default.nix @@ -32,6 +32,7 @@ , libXext , libXxf86vm , libXrandr + , libXpresent , cddaSupport ? false , libcdio @@ -160,7 +161,7 @@ in stdenv.mkDerivation rec { ++ lib.optionals vdpauSupport [ libvdpau ] ++ lib.optionals vulkanSupport [ libplacebo shaderc vulkan-headers vulkan-loader ] ++ lib.optionals waylandSupport [ wayland wayland-protocols libxkbcommon ] - ++ lib.optionals x11Support [ libX11 libXext libGLU libGL libXxf86vm libXrandr ] + ++ lib.optionals x11Support [ libX11 libXext libGLU libGL libXxf86vm libXrandr libXpresent ] ++ lib.optionals xineramaSupport [ libXinerama ] ++ lib.optionals xvSupport [ libXv ] ++ lib.optionals zimgSupport [ zimg ] diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/autocrop.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/autocrop.nix new file mode 100644 index 000000000000..645a4dd16899 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/mpv/scripts/autocrop.nix @@ -0,0 +1,19 @@ +{ stdenvNoCC, mpv-unwrapped, lib }: + +stdenvNoCC.mkDerivation rec { + pname = "mpv-autocrop"; + version = mpv-unwrapped.version; + src = "${mpv-unwrapped.src.outPath}/TOOLS/lua/autocrop.lua"; + dontBuild = true; + dontUnpack = true; + installPhase = '' + install -Dm644 ${src} $out/share/mpv/scripts/autocrop.lua + ''; + passthru.scriptName = "autocrop.lua"; + + meta = { + description = "This script uses the lavfi cropdetect filter to automatically insert a crop filter with appropriate parameters for the currently playing video."; + homepage = "https://github.com/mpv-player/mpv/blob/master/TOOLS/lua/autocrop.lua"; + license = lib.licenses.gpl2Plus; + }; +} diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/autodeint.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/autodeint.nix new file mode 100644 index 000000000000..b5369b748faf --- /dev/null +++ b/nixpkgs/pkgs/applications/video/mpv/scripts/autodeint.nix @@ -0,0 +1,19 @@ +{ stdenvNoCC, mpv-unwrapped, lib }: + +stdenvNoCC.mkDerivation rec { + pname = "mpv-autodeint"; + version = mpv-unwrapped.version; + src = "${mpv-unwrapped.src.outPath}/TOOLS/lua/autodeint.lua"; + dontBuild = true; + dontUnpack = true; + installPhase = '' + install -Dm644 ${src} $out/share/mpv/scripts/autodeint.lua + ''; + passthru.scriptName = "autodeint.lua"; + + meta = { + description = "This script uses the lavfi idet filter to automatically insert the appropriate deinterlacing filter based on a short section of the currently playing video."; + homepage = "https://github.com/mpv-player/mpv/blob/master/TOOLS/lua/autodeint.lua"; + license = lib.licenses.gpl2Plus; + }; +} diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/mpris.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/mpris.nix index 1b5404fede11..89458e4925b0 100644 --- a/nixpkgs/pkgs/applications/video/mpv/scripts/mpris.nix +++ b/nixpkgs/pkgs/applications/video/mpv/scripts/mpris.nix @@ -1,22 +1,15 @@ -{ lib, stdenv, fetchpatch, fetchFromGitHub, pkg-config, glib, mpv-unwrapped }: +{ lib, stdenv, fetchFromGitHub, pkg-config, glib, mpv-unwrapped }: stdenv.mkDerivation rec { pname = "mpv-mpris"; - version = "0.5"; + version = "0.8.1"; src = fetchFromGitHub { owner = "hoyon"; repo = "mpv-mpris"; rev = version; - sha256 = "07p6li5z38pkfd40029ag2jqx917vyl3ng5p2i4v5a0af14slcnk"; + sha256 = "ugEiQZA1vQCVwyv3ViM84Qz8lhRvy17vcxjayYevTAs="; }; - patches = [ - # Enables to "make SCRIPTS_DIR=... install" https://github.com/hoyon/mpv-mpris/pull/38 - (fetchpatch { - url = "https://github.com/hoyon/mpv-mpris/commit/f1482350868bf20e4575f923943ec998469b255e.patch"; - sha256 = "1lqy867wpmj6hv3zgi6g679a7x3dv5skpw24hwd05b28galnyd4l"; - }) - ]; nativeBuildInputs = [ pkg-config ]; diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/mpvacious.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/mpvacious.nix index 9ddd6e308c3b..071f762ff4a7 100644 --- a/nixpkgs/pkgs/applications/video/mpv/scripts/mpvacious.nix +++ b/nixpkgs/pkgs/applications/video/mpv/scripts/mpvacious.nix @@ -18,10 +18,7 @@ stdenvNoCC.mkDerivation rec { }; postPatch = '' - # 'require' replaced with 'dofile' to work around - # https://github.com/mpv-player/mpv/issues/7399 until fixed in mpvacious substituteInPlace subs2srs.lua \ - --replace "require('osd_styler')" "dofile('"$out/share/mpv/scripts/mpvacious/osd_styler.lua"')" \ --replace "'curl'" "'${curl}/bin/curl'" \ --replace "'wl-copy'" "'${wl-clipboard}/bin/wl-copy'" \ --replace "xclip" "${xclip}/bin/xclip" @@ -36,7 +33,7 @@ stdenvNoCC.mkDerivation rec { runHook postInstall ''; - passthru.scriptName = "mpvacious/subs2srs.lua"; + passthru.scriptName = "mpvacious"; meta = with lib; { description = "Adds mpv keybindings to create Anki cards from movies and TV shows"; diff --git a/nixpkgs/pkgs/applications/video/mpv/scripts/thumbnail.nix b/nixpkgs/pkgs/applications/video/mpv/scripts/thumbnail.nix index 4bee220f4c98..5de9f5b0c6b2 100644 --- a/nixpkgs/pkgs/applications/video/mpv/scripts/thumbnail.nix +++ b/nixpkgs/pkgs/applications/video/mpv/scripts/thumbnail.nix @@ -1,13 +1,13 @@ -{ fetchFromGitHub, lib, python3, stdenvNoCC }: +{ lib, stdenvNoCC, fetchFromGitHub, python3 }: stdenvNoCC.mkDerivation rec { pname = "mpv_thumbnail_script"; - version = "unstable-2020-01-16"; + version = "0.4.9"; src = fetchFromGitHub { - owner = "theamm"; + owner = "marzzzello"; repo = pname; - rev = "682becf5b5115c2a206b4f0bdee413d4be8b5bef"; + rev = version; sha256 = "0dgfrb8ypc5vlq35kzn423fm6l6348ivl85vb6j3ccc9a51xprw3"; }; @@ -28,7 +28,7 @@ stdenvNoCC.mkDerivation rec { meta = with lib; { description = "A lua script to show preview thumbnails in mpv's OSC seekbar"; - homepage = "https://github.com/theamm/mpv_thumbnail_script"; + homepage = "https://github.com/marzzzello/mpv_thumbnail_script"; license = licenses.gpl3Plus; platforms = platforms.all; maintainers = with maintainers; [ figsoda ]; diff --git a/nixpkgs/pkgs/applications/video/mpv/wrapper.nix b/nixpkgs/pkgs/applications/video/mpv/wrapper.nix index 28414c3756d9..e9be744ed01c 100644 --- a/nixpkgs/pkgs/applications/video/mpv/wrapper.nix +++ b/nixpkgs/pkgs/applications/video/mpv/wrapper.nix @@ -32,7 +32,7 @@ let # All arguments besides the input and output binaries (${mpv}/bin/mpv and # $out/bin/mpv). These are used by the darwin specific makeWrapper call # used to wrap $out/Applications/mpv.app/Contents/MacOS/mpv as well. - mostMakeWrapperArgs = lib.strings.escapeShellArgs ([ "--argv0" "'$0'" + mostMakeWrapperArgs = lib.strings.escapeShellArgs ([ "--inherit-argv0" # These are always needed (TODO: Explain why) "--prefix" "LUA_CPATH" ";" "${mpv.luaEnv}/lib/lua/${mpv.lua.luaversion}/?.so" "--prefix" "LUA_PATH" ";" "${mpv.luaEnv}/share/lua/${mpv.lua.luaversion}/?.lua" @@ -53,7 +53,7 @@ let )) ++ extraMakeWrapperArgs) ; umpvWrapperArgs = lib.strings.escapeShellArgs ([ - "--argv0" "'$0'" + "--inherit-argv0" "--set" "MPV" "${placeholder "out"}/bin/mpv" ] ++ extraUmpvWrapperArgs) ; @@ -64,7 +64,7 @@ let # TODO: don't link all mpv outputs and convert package to mpv-unwrapped? paths = [ mpv.all ]; - buildInputs = [ makeWrapper ]; + nativeBuildInputs = [ makeWrapper ]; passthru.unwrapped = mpv; diff --git a/nixpkgs/pkgs/applications/video/obs-studio/default.nix b/nixpkgs/pkgs/applications/video/obs-studio/default.nix index 22c206dfe037..044967b2e526 100644 --- a/nixpkgs/pkgs/applications/video/obs-studio/default.nix +++ b/nixpkgs/pkgs/applications/video/obs-studio/default.nix @@ -46,13 +46,13 @@ let in mkDerivation rec { pname = "obs-studio"; - version = "27.2.1"; + version = "27.2.4"; src = fetchFromGitHub { owner = "obsproject"; repo = "obs-studio"; rev = version; - sha256 = "sha256-RHPzSw7wjnAHk90N7g53LyIH3ozO/hyZV5hVZpZe+Ow="; + sha256 = "sha256-OiSejQovSmhItrnrQlcVp9PCDRgAhuxTinSpXbH8bo0="; fetchSubmodules = true; }; @@ -140,7 +140,7 @@ mkDerivation rec { video content, efficiently ''; homepage = "https://obsproject.com"; - maintainers = with maintainers; [ jb55 MP2E V ]; + maintainers = with maintainers; [ jb55 MP2E V miangraham ]; license = licenses.gpl2Plus; platforms = [ "x86_64-linux" "i686-linux" "aarch64-linux" ]; mainProgram = "obs"; diff --git a/nixpkgs/pkgs/applications/video/obs-studio/plugins/default.nix b/nixpkgs/pkgs/applications/video/obs-studio/plugins/default.nix index 95b41c1c86f1..9b46ae4de357 100644 --- a/nixpkgs/pkgs/applications/video/obs-studio/plugins/default.nix +++ b/nixpkgs/pkgs/applications/video/obs-studio/plugins/default.nix @@ -9,4 +9,6 @@ wlrobs = callPackage ./wlrobs.nix {}; looking-glass-obs = callPackage ./looking-glass-obs.nix {}; obs-nvfbc = callPackage ./obs-nvfbc.nix {}; + obs-pipewire-audio-capture = callPackage ./obs-pipewire-audio-capture.nix {}; + obs-vkcapture = callPackage ./obs-vkcapture.nix {}; } diff --git a/nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-gstreamer.nix b/nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-gstreamer.nix index d21d78c42b2a..014a7ef2fbaa 100644 --- a/nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-gstreamer.nix +++ b/nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-gstreamer.nix @@ -10,22 +10,41 @@ stdenv.mkDerivation rec { pname = "obs-gstreamer"; - version = "0.2.1"; + version = "0.3.4"; src = fetchFromGitHub { owner = "fzwoch"; repo = "obs-gstreamer"; rev = "v${version}"; - sha256 = "1fdpwr8br8x9cnrhr3j4f0l81df26n3bj2ibi3cg96rl86054nid"; + hash = "sha256-CDtWe4bx1M06nfqvVmIZaLQoKAsXFnG0Xy/mhiSbMgU="; }; nativeBuildInputs = [ pkg-config meson ninja ]; - buildInputs = [ gst_all_1.gstreamermm obs-studio ]; + buildInputs = with gst_all_1; [ gstreamer gst-plugins-base obs-studio ]; + + # - We need "getLib" instead of default derivation, otherwise it brings gstreamer-bin; + # - without gst-plugins-base it won't even show proper errors in logs; + # - Without gst-plugins-bad it won't find element "h264parse"; + # - gst-vaapi adds "VA-API" to "Encoder type"; + # - gst-plugins-ugly adds "x264" to "Encoder type"; + # Tip: "could not link appsrc to videoconvert1" can mean a lot of things, enable GST_DEBUG=2 for help. + passthru.obsWrapperArguments = + let + gstreamerHook = package: "--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : ${lib.getLib package}/lib/gstreamer-1.0"; + in + with gst_all_1; builtins.map gstreamerHook [ + gstreamer + gst-plugins-base + gst-plugins-bad + + gst-plugins-ugly + gst-vaapi + ]; meta = with lib; { description = "An OBS Studio source, encoder and video filter plugin to use GStreamer elements/pipelines in OBS Studio"; - homepage = "https://github.com/fswoch/obs-gstreamer"; - maintainers = with maintainers; [ ahuzik ]; + homepage = "https://github.com/fzwoch/obs-gstreamer"; + maintainers = with maintainers; [ ahuzik pedrohlc ]; license = licenses.gpl2Plus; platforms = [ "x86_64-linux" "i686-linux" ]; }; diff --git a/nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-nvfbc.nix b/nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-nvfbc.nix index 936f418191af..4d8ffb831a67 100644 --- a/nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-nvfbc.nix +++ b/nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-nvfbc.nix @@ -4,13 +4,13 @@ stdenv.mkDerivation rec { pname = "obs-nvfbc"; - version = "0.0.5"; + version = "0.0.6"; src = fetchFromGitLab { owner = "fzwoch"; repo = "obs-nvfbc"; rev = "v${version}"; - sha256 = "sha256-Si+TGYWpNPtUUFT+M571lCYslPyeYX92MdYV9EGgcyQ="; + sha256 = "sha256-WoqtppgIcjE0n9atsvAZrXvBVi2rWCIIFDXTgblQK9I="; }; nativeBuildInputs = [ meson pkg-config ninja ]; @@ -18,6 +18,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "OBS Studio source plugin for NVIDIA FBC API"; + homepage = "https://gitlab.com/fzwoch/obs-nvfbc"; license = licenses.gpl2Only; maintainers = with maintainers; [ babbaj ]; platforms = [ "x86_64-linux" ]; diff --git a/nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-pipewire-audio-capture.nix b/nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-pipewire-audio-capture.nix new file mode 100644 index 000000000000..150e7e602536 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-pipewire-audio-capture.nix @@ -0,0 +1,32 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, ninja +, obs-studio +, pipewire +, pkg-config +}: + +stdenv.mkDerivation rec { + pname = "obs-pipewire-audio-capture"; + version = "1.0.4"; + + src = fetchFromGitHub { + owner = "dimtpap"; + repo = pname; + rev = "${version}"; + sha256 = "OX27NTUsceEC8kHqlM+oeGjPxguake6lwaXFYsoEqKU="; + }; + + nativeBuildInputs = [ cmake ninja pkg-config ]; + buildInputs = [ obs-studio pipewire ]; + + meta = with lib; { + description = " Audio device and application capture for OBS Studio using PipeWire "; + homepage = "https://github.com/dimtpap/obs-pipewire-audio-capture"; + maintainers = with maintainers; [ Elinvention ]; + license = licenses.gpl2; + platforms = [ "x86_64-linux" "i686-linux" ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-vkcapture.nix b/nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-vkcapture.nix new file mode 100644 index 000000000000..e3710828cb34 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/obs-studio/plugins/obs-vkcapture.nix @@ -0,0 +1,35 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, ninja +, wayland +, obs-studio +, libX11 +, vulkan-headers +, vulkan-loader +, libGL +}: + +stdenv.mkDerivation rec { + pname = "obs-vkcapture"; + version = "1.1.6"; + + src = fetchFromGitHub { + owner = "nowrep"; + repo = pname; + rev = "v${version}"; + hash = "sha256-TNXoeNktMde7GfFhZRHXlARdnkJTY4oNZTKA4hu7e3Q="; + }; + + nativeBuildInputs = [ cmake ninja ]; + buildInputs = [ libGL libX11 obs-studio vulkan-headers vulkan-loader wayland ]; + + meta = with lib; { + description = "OBS Linux Vulkan/OpenGL game capture"; + homepage = "https://github.com/nowrep/obs-vkcapture"; + maintainers = with maintainers; [ atila ]; + license = licenses.gpl2Only; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/video/obs-studio/wrapper.nix b/nixpkgs/pkgs/applications/video/obs-studio/wrapper.nix index 3871151bbb28..28efefbd0042 100644 --- a/nixpkgs/pkgs/applications/video/obs-studio/wrapper.nix +++ b/nixpkgs/pkgs/applications/video/obs-studio/wrapper.nix @@ -1,4 +1,4 @@ -{ obs-studio, symlinkJoin, makeWrapper }: +{ lib, obs-studio, symlinkJoin, makeWrapper }: { plugins ? [] }: @@ -6,13 +6,26 @@ symlinkJoin { name = "wrapped-${obs-studio.name}"; nativeBuildInputs = [ makeWrapper ]; - paths = [ obs-studio ] ++ plugins; + paths = [ obs-studio ]; - postBuild = '' - wrapProgram $out/bin/obs \ - --set OBS_PLUGINS_PATH "$out/lib/obs-plugins" \ - --set OBS_PLUGINS_DATA_PATH "$out/share/obs/obs-plugins" - ''; + postBuild = with lib; + let + # Some plugins needs extra environment, see obs-gstreamer for an example. + pluginArguments = + lists.concatMap (plugin: plugin.obsWrapperArguments or []) plugins; + + pluginsJoined = symlinkJoin { + name = "obs-studio-plugins"; + paths = plugins; + }; + + wrapCommand = [ + "wrapProgram" + "$out/bin/obs" + ''--set OBS_PLUGINS_PATH "${pluginsJoined}/lib/obs-plugins"'' + ''--set OBS_PLUGINS_DATA_PATH "${pluginsJoined}/share/obs/obs-plugins"'' + ] ++ pluginArguments; + in concatStringsSep " " wrapCommand; inherit (obs-studio) meta; passthru = obs-studio.passthru // { diff --git a/nixpkgs/pkgs/applications/video/ogmtools/default.nix b/nixpkgs/pkgs/applications/video/ogmtools/default.nix index 9f7e08a9ddf4..48f1b98f6e53 100644 --- a/nixpkgs/pkgs/applications/video/ogmtools/default.nix +++ b/nixpkgs/pkgs/applications/video/ogmtools/default.nix @@ -11,6 +11,8 @@ stdenv.mkDerivation rec { buildInputs = [ libogg libvorbis libdvdread ]; + NIX_CFLAGS_COMPILE = [ "-std=c++14" ]; + meta = { description = "Tools for modifying and inspecting OGG media streams"; longDescription = '' diff --git a/nixpkgs/pkgs/applications/video/olive-editor/default.nix b/nixpkgs/pkgs/applications/video/olive-editor/default.nix index c63011eebc00..c9e1c8343c29 100644 --- a/nixpkgs/pkgs/applications/video/olive-editor/default.nix +++ b/nixpkgs/pkgs/applications/video/olive-editor/default.nix @@ -1,8 +1,8 @@ -{ lib, stdenv, fetchFromGitHub, pkg-config, which, qmake, mkDerivation, - qtmultimedia, wrapQtAppsHook, frei0r, opencolorio_1, ffmpeg-full, - CoreFoundation }: +{ lib, stdenv, fetchFromGitHub +, pkg-config, which, qmake, wrapQtAppsHook +, qtmultimedia, frei0r, opencolorio_1, ffmpeg-full, CoreFoundation }: -mkDerivation rec { +stdenv.mkDerivation rec { pname = "olive-editor"; version = "0.1.2"; diff --git a/nixpkgs/pkgs/applications/video/peek/default.nix b/nixpkgs/pkgs/applications/video/peek/default.nix index 27064077a9f8..c39363ee3635 100644 --- a/nixpkgs/pkgs/applications/video/peek/default.nix +++ b/nixpkgs/pkgs/applications/video/peek/default.nix @@ -10,7 +10,6 @@ , appstream-glib , pkg-config , txt2man -, gzip , vala , wrapGAppsHook , gsettings-desktop-schemas @@ -50,7 +49,6 @@ stdenv.mkDerivation rec { appstream-glib desktop-file-utils gettext - gzip meson ninja libxml2 diff --git a/nixpkgs/pkgs/applications/video/pitivi/default.nix b/nixpkgs/pkgs/applications/video/pitivi/default.nix index 7ae463b98730..5406b7dfa8a8 100644 --- a/nixpkgs/pkgs/applications/video/pitivi/default.nix +++ b/nixpkgs/pkgs/applications/video/pitivi/default.nix @@ -5,14 +5,12 @@ , itstool , python3 , wrapGAppsHook -, python3Packages , gst_all_1 , gtk3 , gobject-introspection , libpeas , librsvg , gnome -, gnome-desktop , libnotify , gsound , meson @@ -20,15 +18,15 @@ , gsettings-desktop-schemas }: -python3Packages.buildPythonApplication rec { +python3.pkgs.buildPythonApplication rec { pname = "pitivi"; - version = "2021.05"; + version = "2022.06"; format = "other"; src = fetchurl { url = "mirror://gnome/sources/pitivi/${lib.versions.major version}/${pname}-${version}.tar.xz"; - sha256 = "z1aTxGxCqw2hSi5Zv89LyIBgS0HpzTqo0uvcYIJ7dcc="; + sha256 = "Uz0448bSEcK9DpXiuWsPCDO98NXUd6zgffYRWDUGyDg="; }; patches = [ @@ -53,9 +51,7 @@ python3Packages.buildPythonApplication rec { gtk3 libpeas librsvg - gnome-desktop gsound - gnome.adwaita-icon-theme gsettings-desktop-schemas libnotify ] ++ (with gst_all_1; [ @@ -69,14 +65,13 @@ python3Packages.buildPythonApplication rec { gst-devtools ]); - pythonPath = with python3Packages; [ + pythonPath = with python3.pkgs; [ pygobject3 gst-python - pyxdg numpy pycairo matplotlib - dbus-python + librosa ]; postPatch = '' diff --git a/nixpkgs/pkgs/applications/video/pyca/default.nix b/nixpkgs/pkgs/applications/video/pyca/default.nix index d7e1e03733c2..decba42dd5f4 100644 --- a/nixpkgs/pkgs/applications/video/pyca/default.nix +++ b/nixpkgs/pkgs/applications/video/pyca/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonApplication, fetchFromGitHub, pycurl, python-dateutil, configobj, sqlalchemy, sdnotify, flask }: +{ stdenv, lib, buildPythonApplication, fetchFromGitHub, pycurl, python-dateutil, configobj, sqlalchemy, sdnotify, flask }: buildPythonApplication rec { pname = "pyca"; @@ -21,6 +21,7 @@ buildPythonApplication rec { ]; meta = with lib; { + broken = stdenv.isDarwin; description = "A fully functional Opencast capture agent written in Python"; homepage = "https://github.com/opencast/pyCA"; license = licenses.lgpl3; diff --git a/nixpkgs/pkgs/applications/video/qarte/default.nix b/nixpkgs/pkgs/applications/video/qarte/default.nix index 5fc62912c24a..dd2a7dadc2f7 100644 --- a/nixpkgs/pkgs/applications/video/qarte/default.nix +++ b/nixpkgs/pkgs/applications/video/qarte/default.nix @@ -1,15 +1,15 @@ { mkDerivation, lib, fetchbzr, python3, rtmpdump }: let - pythonEnv = python3.withPackages (ps: with ps; [ pyqt5_with_qtmultimedia ]); + pythonEnv = python3.withPackages (ps: with ps; [ m3u8 pyqt5_with_qtmultimedia ]); in mkDerivation { pname = "qarte"; - version = "4.15.1"; + version = "4.17.1"; src = fetchbzr { url = "http://bazaar.launchpad.net/~vincent-vandevyvre/qarte/qarte-4"; - rev = "67"; - sha256 = "sha256:0ajvrvpyqyyxnq9nv69p3sr6c1kplphvrpph75k76yl0av94j2s3"; + rev = "74"; + sha256 = "sha256:18ky9qwfvbifd0xrbmnfm3cm2vyy5jgf9rrca2hby46sjf2745h4"; }; buildInputs = [ pythonEnv ]; diff --git a/nixpkgs/pkgs/applications/video/qmplay2/default.nix b/nixpkgs/pkgs/applications/video/qmplay2/default.nix index 12864d3b40af..d51b32bbb19c 100644 --- a/nixpkgs/pkgs/applications/video/qmplay2/default.nix +++ b/nixpkgs/pkgs/applications/video/qmplay2/default.nix @@ -22,13 +22,13 @@ }: stdenv.mkDerivation rec { pname = "qmplay2"; - version = "22.03.19"; + version = "22.06.16"; src = fetchFromGitHub { owner = "zaps166"; repo = "QMPlay2"; rev = version; - sha256 = "sha256-+EIv74dMm0zxZcCfa5wR6FJNJl5Xaes+/dCRQEBqFeo="; + sha256 = "sha256-nSlmbBCfN+yZlCcgTujBSkZc1uOO0wYpMPUwgLudJEY="; fetchSubmodules = true; }; diff --git a/nixpkgs/pkgs/applications/video/quvi/library.nix b/nixpkgs/pkgs/applications/video/quvi/library.nix index 071e67a17211..548b3d7f9724 100644 --- a/nixpkgs/pkgs/applications/video/quvi/library.nix +++ b/nixpkgs/pkgs/applications/video/quvi/library.nix @@ -18,5 +18,6 @@ stdenv.mkDerivation rec { license = lib.licenses.lgpl21Plus; platforms = lib.platforms.linux; maintainers = [ ]; + broken = true; # missing glibc-2.34 support, no upstream activity }; } diff --git a/nixpkgs/pkgs/applications/video/quvi/scripts.nix b/nixpkgs/pkgs/applications/video/quvi/scripts.nix index 676d073900c5..a31ef6e72ae6 100644 --- a/nixpkgs/pkgs/applications/video/quvi/scripts.nix +++ b/nixpkgs/pkgs/applications/video/quvi/scripts.nix @@ -17,5 +17,6 @@ stdenv.mkDerivation rec { license = lib.licenses.lgpl21Plus; platforms = lib.platforms.linux; maintainers = [ ]; + broken = true; # missing glibc-2.34 support, no upstream activity }; } diff --git a/nixpkgs/pkgs/applications/video/quvi/tool.nix b/nixpkgs/pkgs/applications/video/quvi/tool.nix index 87c8066a976c..ad6233cbd001 100644 --- a/nixpkgs/pkgs/applications/video/quvi/tool.nix +++ b/nixpkgs/pkgs/applications/video/quvi/tool.nix @@ -21,5 +21,6 @@ stdenv.mkDerivation rec { license = lib.licenses.lgpl21Plus; platforms = lib.platforms.linux; maintainers = [ ]; + broken = true; # missing glibc-2.34 support, no upstream activity }; } diff --git a/nixpkgs/pkgs/applications/video/rtabmap/default.nix b/nixpkgs/pkgs/applications/video/rtabmap/default.nix index c6429b093486..3dce0123d1be 100644 --- a/nixpkgs/pkgs/applications/video/rtabmap/default.nix +++ b/nixpkgs/pkgs/applications/video/rtabmap/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { ]; # Disable warnings that are irrelevant to us as packagers - cmakeFlags = "-Wno-dev"; + cmakeFlags = [ "-Wno-dev" ]; # We run one of the executables we build while the build is # still running (and patchelf hasn't been invoked) which means diff --git a/nixpkgs/pkgs/applications/video/screenkey/default.nix b/nixpkgs/pkgs/applications/video/screenkey/default.nix index 4377b255fd99..f854054b3b64 100644 --- a/nixpkgs/pkgs/applications/video/screenkey/default.nix +++ b/nixpkgs/pkgs/applications/video/screenkey/default.nix @@ -31,7 +31,7 @@ python3.pkgs.buildPythonApplication rec { ]; propagatedBuildInputs = with python3.pkgs; [ - Babel + babel pycairo pygobject3 ]; diff --git a/nixpkgs/pkgs/applications/video/showmethekey/default.nix b/nixpkgs/pkgs/applications/video/showmethekey/default.nix new file mode 100644 index 000000000000..219010eeb393 --- /dev/null +++ b/nixpkgs/pkgs/applications/video/showmethekey/default.nix @@ -0,0 +1,53 @@ +{ lib +, stdenv +, fetchFromGitHub +, glib +, meson +, ninja +, libevdev +, json-glib +, cairo +, pango +, libinput +, gtk4 +, wrapGAppsHook +, libxkbcommon +, pkg-config +}: +stdenv.mkDerivation rec { + pname = "showmethekey"; + version = "1.7.3"; + + src = fetchFromGitHub { + owner = "AlynxZhou"; + repo = "showmethekey"; + rev = "v${version}"; + sha256 = "sha256-hq4X4dG25YauMjsNXC6Flco9pEpVj3EM2JiFWbRrPaA="; + }; + + nativeBuildInputs = [ + glib + meson + ninja + cairo + pango + json-glib + pkg-config + libevdev + libinput + libxkbcommon + wrapGAppsHook + ]; + + buildInputs = [ + gtk4 + ]; + + meta = with lib; { + homepage = "https://showmethekey.alynx.one/"; + description = "Show keys you typed on screen"; + license = licenses.asl20; + platforms = platforms.linux; + maintainers = with maintainers; [ ocfox ]; + }; +} diff --git a/nixpkgs/pkgs/applications/video/smplayer/default.nix b/nixpkgs/pkgs/applications/video/smplayer/default.nix index eecb3a6b9749..9ed563a69038 100644 --- a/nixpkgs/pkgs/applications/video/smplayer/default.nix +++ b/nixpkgs/pkgs/applications/video/smplayer/default.nix @@ -8,13 +8,13 @@ stdenv.mkDerivation rec { pname = "smplayer"; - version = "22.2.0"; + version = "22.7.0"; src = fetchFromGitHub { owner = "smplayer-dev"; repo = pname; rev = "v${version}"; - hash = "sha256-7DMvIqW3vzjVzJPyjbXuHHcf1T6EFcf/a/mVYqa3XS8="; + hash = "sha256-vU+M5aCCGSA+IwJXTLMYvno/Qei+5Hwck3Q/Ah7N09s="; }; nativeBuildInputs = [ diff --git a/nixpkgs/pkgs/applications/video/streamlink-twitch-gui/bin.nix b/nixpkgs/pkgs/applications/video/streamlink-twitch-gui/bin.nix index 395da881ea9f..7459d08d5953 100644 --- a/nixpkgs/pkgs/applications/video/streamlink-twitch-gui/bin.nix +++ b/nixpkgs/pkgs/applications/video/streamlink-twitch-gui/bin.nix @@ -124,6 +124,7 @@ stdenv.mkDerivation rec { longDescription = "Browse Twitch.tv and watch streams in your videoplayer of choice"; homepage = "https://streamlink.github.io/streamlink-twitch-gui/"; downloadPage = "https://github.com/streamlink/streamlink-twitch-gui/releases"; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; license = licenses.mit; maintainers = with maintainers; [ rileyinman ]; platforms = [ "x86_64-linux" "i686-linux" ]; diff --git a/nixpkgs/pkgs/applications/video/ustreamer/default.nix b/nixpkgs/pkgs/applications/video/ustreamer/default.nix index f2753affa563..6be729a37468 100644 --- a/nixpkgs/pkgs/applications/video/ustreamer/default.nix +++ b/nixpkgs/pkgs/applications/video/ustreamer/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "ustreamer"; - version = "4.11"; + version = "5.17"; src = fetchFromGitHub { owner = "pikvm"; repo = "ustreamer"; rev = "v${version}"; - sha256 = "sha256-MTzlhnnDVZzS3lnYe3P/Hi6pi6f4B0+ejmDwV0f9juI="; + sha256 = "sha256-l0O7iuqXJTGcODPk0BzWXr8GbJJOcAeAHyo147WMnjk="; }; buildInputs = [ libbsd libevent libjpeg ]; diff --git a/nixpkgs/pkgs/applications/video/vdr/plugins.nix b/nixpkgs/pkgs/applications/video/vdr/plugins.nix index f7eb5f201e85..e8675263720c 100644 --- a/nixpkgs/pkgs/applications/video/vdr/plugins.nix +++ b/nixpkgs/pkgs/applications/video/vdr/plugins.nix @@ -238,94 +238,19 @@ in { }; }; - fritzbox = let - libconvpp = stdenv.mkDerivation { - name = "jowi24-libconv++-20130216"; - propagatedBuildInputs = [ libiconv ]; - CXXFLAGS = "-std=gnu++11 -Os"; - src = fetchFromGitHub { - owner = "jowi24"; - repo = "libconvpp"; - rev = "90769b2216bc66c5ea5e41a929236c20d367c63b"; - sha256 = "0bf0dwxrzd42l84p8nxcsjdk1gvzlhad93nsbn97z6kr61n4cr33"; - }; - installPhase = '' - mkdir -p $out/lib $out/include/libconv++ - cp source.a $out/lib/libconv++.a - cp *.h $out/include/libconv++ - ''; - }; - - liblogpp = stdenv.mkDerivation { - name = "jowi24-liblogpp-20130216"; - CXXFLAGS = "-std=gnu++11 -Os"; - src = fetchFromGitHub { - owner = "jowi24"; - repo = "liblogpp"; - rev = "eee4046d2ae440974bcc8ceec00b069f0a2c62b9"; - sha256 = "01aqvwmwh5kk3mncqpim8llwha9gj5qq0c4cvqfn4h8wqi3d9l3p"; - }; - installPhase = '' - mkdir -p $out/lib $out/include/liblog++ - cp source.a $out/lib/liblog++.a - cp *.h $out/include/liblog++ - ''; - }; - - libnetpp = stdenv.mkDerivation { - name = "jowi24-libnet++-20180628"; - CXXFLAGS = "-std=gnu++11 -Os"; - src = fetchFromGitHub { - owner = "jowi24"; - repo = "libnetpp"; - rev = "212847f0efaeffee8422059b8e202d844174aaf3"; - sha256 = "0vjl6ld6aj25rzxm26yjv3h2gy7gp7qnbinpw6sf1shg2xim9x0b"; - }; - installPhase = '' - mkdir -p $out/lib $out/include/libnet++ - cp source.a $out/lib/libnet++.a - cp *.h $out/include/libnet++ - ''; - buildInputs = [ boost liblogpp libconvpp ]; - }; - - libfritzpp = stdenv.mkDerivation { - name = "jowi24-libfritzpp-20131201"; - CXXFLAGS = "-std=gnu++11 -Os"; - src = fetchFromGitHub { - owner = "jowi24"; - repo = "libfritzpp"; - rev = "ca19013c9451cbac7a90155b486ea9959ced0f67"; - sha256 = "0jk93zm3qzl9z96gfs6xl1c8ip8lckgbzibf7jay7dbgkg9kyjfg"; - }; - installPhase = '' - mkdir -p $out/lib $out/include/libfritz++ - cp source.a $out/lib/libfritz++.a - cp *.h $out/include/libfritz++ - ''; - propagatedBuildInputs = [ libgcrypt ]; - buildInputs = [ boost liblogpp libconvpp libnetpp ]; - }; - - in stdenv.mkDerivation rec { + fritzbox = stdenv.mkDerivation rec { pname = "vdr-fritzbox"; - version = "1.5.3"; + version = "1.5.4"; src = fetchFromGitHub { owner = "jowi24"; repo = "vdr-fritz"; rev = version; - sha256 = "0wab1kyma9jzhm6j33cv9hd2a5d1334ghgdi2051nmr1bdcfcsw8"; + sha256 = "sha256-DGD73i+ZHFgtCo+pMj5JaMovvb5vS1x20hmc5t29//o="; + fetchSubmodules = true; }; - postUnpack = '' - cp ${libfritzpp}/lib/* $sourceRoot/libfritz++ - cp ${liblogpp}/lib/* $sourceRoot/liblog++ - cp ${libnetpp}/lib/* $sourceRoot/libnet++ - cp ${libconvpp}/lib/* $sourceRoot/libconv++ - ''; - - buildInputs = [ vdr boost libconvpp libfritzpp libnetpp liblogpp ]; + buildInputs = [ vdr boost libgcrypt ]; installFlags = [ "DESTDIR=$(out)" ]; diff --git a/nixpkgs/pkgs/applications/video/vdr/wrapper.nix b/nixpkgs/pkgs/applications/video/vdr/wrapper.nix index 04984212b249..431d2dae4f04 100644 --- a/nixpkgs/pkgs/applications/video/vdr/wrapper.nix +++ b/nixpkgs/pkgs/applications/video/vdr/wrapper.nix @@ -17,7 +17,7 @@ in symlinkJoin { postBuild = '' wrapProgram $out/bin/vdr \ --add-flags "-L $out/lib/vdr --localedir=$out/share/locale" \ - --prefix XINE_PLUGIN_PATH ":" ${makeXinePluginPath requiredXinePlugins} + --prefix XINE_PLUGIN_PATH ":" ${lib.escapeShellArg (makeXinePluginPath requiredXinePlugins)} ''; meta = with vdr.meta; { diff --git a/nixpkgs/pkgs/applications/video/vlc/default.nix b/nixpkgs/pkgs/applications/video/vlc/default.nix index c19b8fa15cd1..e870b8572d8d 100644 --- a/nixpkgs/pkgs/applications/video/vlc/default.nix +++ b/nixpkgs/pkgs/applications/video/vlc/default.nix @@ -31,9 +31,11 @@ , libkate , libmad , libmatroska +, libmodplug , libmtp , liboggz , libopus +, libplacebo , libpulseaudio , libraw1394 , librsvg @@ -78,15 +80,14 @@ let inherit (lib) optionalString optional optionals; - hostIsAarch = stdenv.hostPlatform.isAarch32 || stdenv.hostPlatform.isAarch64; in stdenv.mkDerivation rec { pname = "${optionalString onlyLibVLC "lib"}vlc"; - version = "3.0.17"; + version = "3.0.17.3"; src = fetchurl { url = "http://get.videolan.org/vlc/${version}/vlc-${version}.tar.xz"; - sha256 = "sha256-SL2b8zeqEHoVJOulfFLcSpHin1qX+97pL2pNupA4PNA="; + sha256 = "sha256-b36Q74lz0x2W3mTbgXFz40UVCClxepQISxu4MhzeIBQ="; }; # VLC uses a *ton* of libraries for various pieces of functionality, many of @@ -121,8 +122,10 @@ stdenv.mkDerivation rec { libmad libmatroska libmtp + libmodplug liboggz libopus + libplacebo libpulseaudio libraw1394 librsvg @@ -155,7 +158,7 @@ stdenv.mkDerivation rec { xcbutilkeysyms xlibsWrapper ]) - ++ optional (!hostIsAarch && !onlyLibVLC) live555 + ++ optional (!stdenv.hostPlatform.isAarch && !onlyLibVLC) live555 ++ optional jackSupport libjack2 ++ optionals chromecastSupport [ libmicrodns protobuf ] ++ optionals skins2Support (with xorg; [ @@ -180,7 +183,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - LIVE555_PREFIX = if hostIsAarch then null else live555; + LIVE555_PREFIX = if stdenv.hostPlatform.isAarch then null else live555; # vlc depends on a c11-gcc wrapper script which we don't have so we need to # set the path to the compiler diff --git a/nixpkgs/pkgs/applications/video/vokoscreen/default.nix b/nixpkgs/pkgs/applications/video/vokoscreen/default.nix index aeea52a4ff5a..2bb9437f1b06 100644 --- a/nixpkgs/pkgs/applications/video/vokoscreen/default.nix +++ b/nixpkgs/pkgs/applications/video/vokoscreen/default.nix @@ -30,6 +30,10 @@ mkDerivation rec { ./ffmpeg-out-of-box.patch ]; + # Workaround build failure on -fno-common toolchains: + # ld: alsa_device.o:(.bss+0x8): multiple definition of `rc'; QvkAlsaDevice.o:(.bss+0x8): first defined here + NIX_CFLAGS_COMPILE = "-fcommon"; + preConfigure = '' sed -i 's/lrelease-qt5/lrelease/g' vokoscreen.pro ''; diff --git a/nixpkgs/pkgs/applications/video/w_scan/default.nix b/nixpkgs/pkgs/applications/video/w_scan/default.nix index 7cbc2b0f8159..9c07eb1a6368 100644 --- a/nixpkgs/pkgs/applications/video/w_scan/default.nix +++ b/nixpkgs/pkgs/applications/video/w_scan/default.nix @@ -9,6 +9,11 @@ stdenv.mkDerivation rec { sha256 = "1zkgnj2sfvckix360wwk1v5s43g69snm45m0drnzyv7hgf5g7q1q"; }; + # Workaround build failure on -fno-common toolchains: + # ld: char-coding.o:/build/w_scan-20170107/si_types.h:117: multiple definition of + # `service_t'; countries.o:/build/w_scan-20170107/si_types.h:117: first defined here + NIX_CFLAGS_COMPILE = "-fcommon"; + meta = { description = "Small CLI utility to scan DVB and ATSC transmissions"; homepage = "http://wirbel.htpc-forum.de/w_scan/index_en.html"; diff --git a/nixpkgs/pkgs/applications/video/webcamoid/default.nix b/nixpkgs/pkgs/applications/video/webcamoid/default.nix index 63f1e885af30..b9c21b7ad7d1 100644 --- a/nixpkgs/pkgs/applications/video/webcamoid/default.nix +++ b/nixpkgs/pkgs/applications/video/webcamoid/default.nix @@ -1,13 +1,13 @@ -{ lib, fetchFromGitHub, pkg-config, libxcb, mkDerivation, qmake +{ lib, fetchFromGitHub, pkg-config, libxcb, mkDerivation, cmake , qtbase, qtdeclarative, qtquickcontrols, qtquickcontrols2 , ffmpeg-full, gst_all_1, libpulseaudio, alsa-lib, jack2 , v4l-utils }: mkDerivation rec { pname = "webcamoid"; - version = "8.8.0"; + version = "9.0.0"; src = fetchFromGitHub { - sha256 = "0a8M9GQ6Ea9jBCyfbORVyB6HC/O6jdcIZruQZj9Aai4="; + sha256 = "sha256-NV1BmG+fgy+ZcvHl+05VX5J1BAz8PxKiZ3z9BxjhMU0="; rev = version; repo = "webcamoid"; owner = "webcamoid"; @@ -22,12 +22,7 @@ mkDerivation rec { v4l-utils ]; - nativeBuildInputs = [ pkg-config qmake ]; - - qmakeFlags = [ - "Webcamoid.pro" - "INSTALLQMLDIR=${placeholder "out"}/lib/qt/qml" - ]; + nativeBuildInputs = [ pkg-config cmake ]; meta = with lib; { description = "Webcam Capture Software"; diff --git a/nixpkgs/pkgs/applications/video/webtorrent_desktop/default.nix b/nixpkgs/pkgs/applications/video/webtorrent_desktop/default.nix index b4f8af61fca5..8f1353fa83e4 100644 --- a/nixpkgs/pkgs/applications/video/webtorrent_desktop/default.nix +++ b/nixpkgs/pkgs/applications/video/webtorrent_desktop/default.nix @@ -1,95 +1,76 @@ +## FIXME: see ../../../servers/code-server/ for a proper yarn packaging +## - export ELECTRON_SKIP_BINARY_DOWNLOAD=1 +## - jq "del(.scripts.preinstall)" node_modules/shellcheck/package.json | sponge node_modules/shellcheck/package.json { - alsa-lib, atk, cairo, cups, dbus, dpkg, expat, fetchurl, fetchzip, fontconfig, freetype, - gdk-pixbuf, glib, gtk3, libX11, libXScrnSaver, libXcomposite, libXcursor, - libXdamage, libXext, libXfixes, libXi, libXrandr, libXrender, libXtst, - libxcb, nspr, nss, lib, stdenv, udev, libuuid, pango, at-spi2-atk, at-spi2-core + lib, stdenv, buildFHSUserEnvBubblewrap, runCommand, writeScript, fetchurl, fetchzip }: +let + pname = "webtorrent-desktop"; + version = "0.21.0"; +in +runCommand "${pname}-${version}" rec { + inherit (stdenv) shell; + inherit pname version; + src = + if stdenv.hostPlatform.system == "x86_64-linux" then + fetchzip { + url = "https://github.com/webtorrent/webtorrent-desktop/releases/download/v${version}/WebTorrent-v${version}-linux.zip"; + sha256 = "13gd8isq2l10kibsc1bsc15dbgpnwa7nw4cwcamycgx6pfz9a852"; + } + else + throw "Webtorrent is not currently supported on ${stdenv.hostPlatform.system}"; - let - rpath = lib.makeLibraryPath ([ - alsa-lib - atk - at-spi2-core - at-spi2-atk - cairo - cups - dbus - expat - fontconfig - freetype - gdk-pixbuf - glib - gtk3 - pango - libuuid - libX11 - libXScrnSaver - libXcomposite - libXcursor - libXdamage - libXext - libXfixes - libXi - libXrandr - libXrender - libXtst - libxcb - nspr - nss - stdenv.cc.cc - udev - ]); - in stdenv.mkDerivation rec { - pname = "webtorrent-desktop"; - version = "0.21.0"; + fhs = buildFHSUserEnvBubblewrap rec { + name = "fhsEnterWebTorrent"; + runScript = "${src}/WebTorrent"; + ## use the trampoline, if you need to shell into the fhsenv + # runScript = writeScript "trampoline" '' + # #!/bin/sh + # exec "$@" + # ''; + targetPkgs = pkgs: with pkgs; with xorg; [ + alsa-lib atk at-spi2-core at-spi2-atk cairo cups dbus expat + fontconfig freetype gdk-pixbuf glib gtk3 pango libuuid libX11 + libXScrnSaver libXcomposite libXcursor libXdamage libXext + libXfixes libXi libXrandr libXrender libXtst libxcb nspr nss + stdenv.cc.cc udev + ]; + # extraBwrapArgs = [ + # "--ro-bind /run/user/$(id -u)/pulse /run/user/$(id -u)/pulse" + # ]; + }; - src = - if stdenv.hostPlatform.system == "x86_64-linux" then - fetchzip { - url = "https://github.com/webtorrent/webtorrent-desktop/releases/download/v${version}/WebTorrent-v${version}-linux.zip"; - sha256 = "13gd8isq2l10kibsc1bsc15dbgpnwa7nw4cwcamycgx6pfz9a852"; - } - else - throw "Webtorrent is not currently supported on ${stdenv.hostPlatform.system}"; - desktopFile = fetchurl { - url = "https://raw.githubusercontent.com/webtorrent/webtorrent-desktop/v${version}/static/linux/share/applications/webtorrent-desktop.desktop"; - sha256 = "1v16dqbxqds3cqg3xkzxsa5fyd8ssddvjhy9g3i3lz90n47916ca"; - }; - icon256File = fetchurl { - url = "https://raw.githubusercontent.com/webtorrent/webtorrent-desktop/v${version}/static/linux/share/icons/hicolor/256x256/apps/webtorrent-desktop.png"; - sha256 = "1dapxvvp7cx52zhyaby4bxm4rll9xc7x3wk8k0il4g3mc7zzn3yk"; - }; - icon48File = fetchurl { - url = "https://raw.githubusercontent.com/webtorrent/webtorrent-desktop/v${version}/static/linux/share/icons/hicolor/48x48/apps/webtorrent-desktop.png"; - sha256 = "00y96w9shbbrdbf6xcjlahqd08154kkrxmqraik7qshiwcqpw7p4"; - }; - nativeBuildInputs = [ dpkg ]; - installPhase = '' - mkdir -p $out/share/{applications,icons/hicolor/{48x48,256x256}/apps} - cp -R . $out/libexec + desktopFile = fetchurl { + url = "https://raw.githubusercontent.com/webtorrent/webtorrent-desktop/v${version}/static/linux/share/applications/webtorrent-desktop.desktop"; + sha256 = "1v16dqbxqds3cqg3xkzxsa5fyd8ssddvjhy9g3i3lz90n47916ca"; + }; + icon256File = fetchurl { + url = "https://raw.githubusercontent.com/webtorrent/webtorrent-desktop/v${version}/static/linux/share/icons/hicolor/256x256/apps/webtorrent-desktop.png"; + sha256 = "1dapxvvp7cx52zhyaby4bxm4rll9xc7x3wk8k0il4g3mc7zzn3yk"; + }; + icon48File = fetchurl { + url = "https://raw.githubusercontent.com/webtorrent/webtorrent-desktop/v${version}/static/linux/share/icons/hicolor/48x48/apps/webtorrent-desktop.png"; + sha256 = "00y96w9shbbrdbf6xcjlahqd08154kkrxmqraik7qshiwcqpw7p4"; + }; - # Patch WebTorrent - patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath ${rpath}:$out/libexec $out/libexec/WebTorrent + meta = with lib; { + description = "Streaming torrent app for Mac, Windows, and Linux"; + homepage = "https://webtorrent.io/desktop"; + license = licenses.mit; + maintainers = [ maintainers.flokli maintainers.bendlas ]; + platforms = [ + "x86_64-linux" + ]; + }; - # Symlink to bin - mkdir -p $out/bin - ln -s $out/libexec/WebTorrent $out/bin/WebTorrent +} '' + mkdir -p $out/{bin,share/{applications,icons/hicolor/{48x48,256x256}/apps}} - cp $icon48File $out/share/icons/hicolor/48x48/apps/webtorrent-desktop.png - cp $icon256File $out/share/icons/hicolor/256x256/apps/webtorrent-desktop.png - ## Fix the desktop link - substitute $desktopFile $out/share/applications/webtorrent-desktop.desktop \ - --replace /opt/webtorrent-desktop $out/libexec - ''; + cp $fhs/bin/fhsEnterWebTorrent $out/bin/WebTorrent - meta = with lib; { - description = "Streaming torrent app for Mac, Windows, and Linux"; - homepage = "https://webtorrent.io/desktop"; - license = licenses.mit; - maintainers = [ maintainers.flokli ]; - platforms = [ - "x86_64-linux" - ]; - }; - } + cp $icon48File $out/share/icons/hicolor/48x48/apps/webtorrent-desktop.png + cp $icon256File $out/share/icons/hicolor/256x256/apps/webtorrent-desktop.png + ## Fix the desktop link + substitute $desktopFile $out/share/applications/webtorrent-desktop.desktop \ + --replace /opt/webtorrent-desktop $out/libexec +'' diff --git a/nixpkgs/pkgs/applications/video/wf-recorder/default.nix b/nixpkgs/pkgs/applications/video/wf-recorder/default.nix index 18b35c0d398b..0b16c478aebf 100644 --- a/nixpkgs/pkgs/applications/video/wf-recorder/default.nix +++ b/nixpkgs/pkgs/applications/video/wf-recorder/default.nix @@ -5,13 +5,13 @@ stdenv.mkDerivation rec { pname = "wf-recorder"; - version = "0.2.1"; + version = "0.3.0"; src = fetchFromGitHub { owner = "ammen99"; repo = pname; rev = "v${version}"; - sha256 = "1cw6kpcbl33wh95pvy32xrsrm6kkk1awccr3phyh885xjs3b3iim"; + sha256 = "sha256-othFp97rUrdUoAXkup8VvpcyPHs5iYNFyRE3h3rcmqE="; }; nativeBuildInputs = [ meson ninja pkg-config wayland-scanner scdoc ]; @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { inherit (src.meta) homepage; changelog = "https://github.com/ammen99/wf-recorder/releases/tag/v${version}"; license = licenses.mit; - maintainers = with maintainers; [ primeos CrazedProgrammer ]; + maintainers = with maintainers; [ yuka ]; platforms = platforms.linux; }; } diff --git a/nixpkgs/pkgs/applications/video/wxcam/default.nix b/nixpkgs/pkgs/applications/video/wxcam/default.nix deleted file mode 100644 index 5a6c6ff524e3..000000000000 --- a/nixpkgs/pkgs/applications/video/wxcam/default.nix +++ /dev/null @@ -1,51 +0,0 @@ -{ lib, stdenv, fetchurl -, pkg-config -, intltool -, libX11, libXv, libSM -, gtk, libglade -, wxGTK -, perlPackages -, xvidcore -, mjpegtools -, alsa-lib -, libv4l -, cimg }: - -stdenv.mkDerivation rec { - - pname = "wxcam"; - version = "1.1"; - - src = fetchurl { - url = "mirror://sourceforge/project/wxcam/wxcam/${version}/${pname}-${version}.tar.gz"; - sha256 = "1765bvc65fpzn9ycnnj5hais9xkx9v0sm6a878d35x54bpanr859"; - }; - - buildInputs = with lib; - [ pkg-config intltool libX11 libXv libSM gtk libglade wxGTK perlPackages.XMLParser xvidcore mjpegtools alsa-lib libv4l cimg ]; - - NIX_CFLAGS_COMPILE="-I ${cimg}/include/cimg"; - - postUnpack = '' - sed -ie 's|/usr/share/|'"$out/share/"'|g' $sourceRoot/Makefile.in - ''; - - installPhase = '' - make install prefix="$out" wxcamdocdir="$out/share/doc/wxcam" - ''; - - meta = with lib; { - description = "An open-source, wxGTK-based webcam app for Linux"; - longDescription = '' - wxCam is a webcam application for linux. It supports video recording - (avi uncompressed and Xvid formats), snapshot taking, and some special - commands for philips webcams, so you can also use it for astronomy purposes. - It supports both video4linux 1 and 2 drivers, - so it should work on a very large number of devices. - ''; - homepage = "http://wxcam.sourceforge.net/"; - license = licenses.gpl3Plus; - maintainers = [ maintainers.AndersonTorres ]; - platforms = platforms.linux; - }; -} diff --git a/nixpkgs/pkgs/applications/video/xplayer/default.nix b/nixpkgs/pkgs/applications/video/xplayer/default.nix index 9d6a5e18ad5d..c75635b44b31 100644 --- a/nixpkgs/pkgs/applications/video/xplayer/default.nix +++ b/nixpkgs/pkgs/applications/video/xplayer/default.nix @@ -22,7 +22,7 @@ , pkg-config , python3 , wrapGAppsHook -, xapps +, xapp , yelp-tools }: let @@ -34,13 +34,13 @@ in stdenv.mkDerivation rec { pname = "xplayer"; - version = "2.4.2"; + version = "2.4.4"; src = fetchFromGitHub { owner = "linuxmint"; repo = pname; rev = version; - sha256 = "sha256-qoBJKY0CZyhp9foUehq5hInEENRGZuy1D6jAMjbjYhA="; + sha256 = "sha256-o2vLNIELd1EYWG26t5gOpnamJrBJeg4P6fcLirkcmfM="; }; # configure wants to find gst-inspect-1.0 via pkgconfig but @@ -83,7 +83,7 @@ stdenv.mkDerivation rec { libxml2 libxplayer-plparser pythonenv - xapps + xapp # to satisfy configure script pythonenv.pkgs.pygobject3 ]; |