Merge pull request #144903 from AndersonTorres/new-openshot

Openshot update
This commit is contained in:
Anderson Torres
2021-11-06 14:21:09 -03:00
committed by GitHub
3 changed files with 118 additions and 53 deletions
@@ -1,7 +1,14 @@
{ lib, stdenv, mkDerivationWith, fetchFromGitHub, fetchpatch
, doxygen, python3Packages, libopenshot
, wrapGAppsHook, gtk3
, qtsvg }:
{ lib
, stdenv
, mkDerivationWith
, fetchFromGitHub
, doxygen
, gtk3
, libopenshot
, python3Packages
, qtsvg
, wrapGAppsHook
}:
mkDerivationWith python3Packages.buildPythonApplication rec {
pname = "openshot-qt";
@@ -14,11 +21,23 @@ mkDerivationWith python3Packages.buildPythonApplication rec {
sha256 = "0pa8iwl217503bjlqg2zlrw5lxyq5hvxrf5apxrh3843hj1w1myv";
};
nativeBuildInputs = [ doxygen wrapGAppsHook ];
nativeBuildInputs = [
doxygen
wrapGAppsHook
];
buildInputs = [ gtk3 ];
buildInputs = [
gtk3
];
propagatedBuildInputs = with python3Packages; [ libopenshot pyqt5_with_qtwebkit requests sip_4 httplib2 pyzmq ];
propagatedBuildInputs = with python3Packages; [
httplib2
libopenshot
pyqt5_with_qtwebkit
pyzmq
requests
sip_4
];
dontWrapGApps = true;
dontWrapQtApps = true;
@@ -56,4 +75,9 @@ mkDerivationWith python3Packages.buildPythonApplication rec {
maintainers = with maintainers; [ AndersonTorres ];
platforms = with platforms; unix;
};
passthru = {
inherit libopenshot;
inherit (libopenshot) libopenshot-audio;
};
}
@@ -1,34 +1,58 @@
{ lib, stdenv, fetchFromGitHub, pkg-config, cmake, doxygen
, alsa-lib, libX11, libXft, libXrandr, libXinerama, libXext, libXcursor
, zlib, AGL, Cocoa, Foundation
{ lib
, stdenv
, fetchFromGitHub
, alsa-lib
, cmake
, doxygen
, libX11
, libXcursor
, libXext
, libXft
, libXinerama
, libXrandr
, pkg-config
, zlib
, AGL
, Cocoa
, Foundation
}:
with lib;
stdenv.mkDerivation rec {
pname = "libopenshot-audio";
version = "0.2.0";
version = "0.2.2";
src = fetchFromGitHub {
owner = "OpenShot";
repo = "libopenshot-audio";
rev = "v${version}";
sha256 = "13if0m5mvlqly8gmbhschzb9papkgp3yqivklhb949dhy16m8zgf";
sha256 = "sha256-XtwTZsj/L/sw/28E7Qr5UyghGlBFFXvbmZLGXBB8vg0=";
};
nativeBuildInputs =
[ pkg-config cmake doxygen ];
nativeBuildInputs = [
cmake
doxygen
pkg-config
];
buildInputs =
optionals stdenv.isLinux [ alsa-lib ]
++ (if stdenv.isDarwin then
[ zlib AGL Cocoa Foundation ]
else
[ libX11 libXft libXrandr libXinerama libXext libXcursor ])
;
buildInputs = lib.optionals stdenv.isLinux [
alsa-lib
] ++ (if stdenv.isDarwin then [
AGL
Cocoa
Foundation
zlib
] else [
libX11
libXcursor
libXext
libXft
libXinerama
libXrandr
]);
doCheck = false;
meta = {
meta = with lib; {
homepage = "http://openshot.org/";
description = "High-quality sound editing library";
longDescription = ''
@@ -1,56 +1,69 @@
{ lib, stdenv, fetchFromGitHub, fetchpatch
, pkg-config, cmake, doxygen
, libopenshot-audio, imagemagick, ffmpeg
, swig, python3, jsoncpp
, cppzmq, zeromq
, qtbase, qtmultimedia
{ lib
, stdenv
, fetchFromGitHub
, alsa-lib
, cmake
, cppzmq
, doxygen
, ffmpeg
, imagemagick
, jsoncpp
, libopenshot-audio
, llvmPackages
, pkg-config
, python3
, qtbase
, qtmultimedia
, swig
, zeromq
}:
with lib;
stdenv.mkDerivation rec {
pname = "libopenshot";
version = "0.2.5";
version = "0.2.7";
src = fetchFromGitHub {
owner = "OpenShot";
repo = "libopenshot";
rev = "v${version}";
sha256 = "1mxjkgjmjzgf628y3rscc6rqf55hxgjpmvwxlncfk1216i5xskwp";
sha256 = "sha256-aF8wrPxFIjCy5gw72e/WyL/Wcx9tUGDkrqHS+ZDVK0U=";
};
patches = [
# Fix build with GCC 10.
(fetchpatch {
name = "fix-build-with-gcc-10.patch";
url = "https://github.com/OpenShot/libopenshot/commit/13290364e7bea54164ab83d973951f2898ad9e23.diff";
sha256 = "0i7rpdsr8y9dphil8yq75qbh20vfqjc2hp5ahv0ws58z9wj6ngnz";
})
];
postPatch = ''
sed -i 's/{UNITTEST++_INCLUDE_DIR}/ENV{UNITTEST++_INCLUDE_DIR}/g' tests/CMakeLists.txt
sed -i 's/{_REL_PYTHON_MODULE_PATH}/ENV{_REL_PYTHON_MODULE_PATH}/g' src/bindings/python/CMakeLists.txt
sed -i 's/{_REL_PYTHON_MODULE_PATH}/ENV{_REL_PYTHON_MODULE_PATH}/g' bindings/python/CMakeLists.txt
export _REL_PYTHON_MODULE_PATH=$(toPythonPath $out)
'';
nativeBuildInputs = [ pkg-config cmake doxygen swig ];
nativeBuildInputs = [
alsa-lib
cmake
doxygen
pkg-config
swig
];
buildInputs =
[ imagemagick ffmpeg python3 jsoncpp
cppzmq zeromq qtbase qtmultimedia ]
++ optional stdenv.isDarwin llvmPackages.openmp
;
buildInputs = [
cppzmq
ffmpeg
imagemagick
jsoncpp
libopenshot-audio
python3
qtbase
qtmultimedia
zeromq
] ++ lib.optionals stdenv.isDarwin [
llvmPackages.openmp
];
dontWrapQtApps = true;
LIBOPENSHOT_AUDIO_DIR = libopenshot-audio;
doCheck = false;
cmakeFlags = [ "-DENABLE_RUBY=OFF" ];
meta = {
meta = with lib; {
homepage = "http://openshot.org/";
description = "Free, open-source video editor library";
longDescription = ''
@@ -58,8 +71,12 @@ stdenv.mkDerivation rec {
delivering high quality video editing, animation, and playback solutions
to the world. API currently supports C++, Python, and Ruby.
'';
license = with licenses; gpl3Plus;
license = licenses.gpl3Plus;
maintainers = with maintainers; [ AndersonTorres ];
platforms = with platforms; unix;
platforms = platforms.unix;
};
passthru = {
inherit libopenshot-audio;
};
}