Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at flake-libs 93 lines 1.9 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 alsa-lib, 6 cmake, 7 cppzmq, 8 doxygen, 9 ffmpeg, 10 imagemagick, 11 jsoncpp, 12 libopenshot-audio, 13 llvmPackages, 14 pkg-config, 15 python3, 16 qtbase, 17 qtmultimedia, 18 swig, 19 zeromq, 20}: 21 22stdenv.mkDerivation (finalAttrs: { 23 pname = "libopenshot"; 24 version = "0.4.0"; 25 26 src = fetchFromGitHub { 27 owner = "OpenShot"; 28 repo = "libopenshot"; 29 rev = "v${finalAttrs.version}"; 30 hash = "sha256-zroTnJRYIIglhha6jQvaVNTgnIV6kUWcu7s5zEvgH6Q="; 31 }; 32 33 patches = lib.optionals stdenv.hostPlatform.isDarwin [ 34 # Darwin requires both Magick++ and MagickCore for a successful linkage 35 ./0001-link-magickcore.diff 36 ]; 37 38 nativeBuildInputs = [ 39 cmake 40 doxygen 41 pkg-config 42 swig 43 ]; 44 45 buildInputs = 46 [ 47 cppzmq 48 ffmpeg 49 imagemagick 50 jsoncpp 51 libopenshot-audio 52 python3 53 qtbase 54 qtmultimedia 55 zeromq 56 ] 57 ++ lib.optionals stdenv.hostPlatform.isLinux [ 58 alsa-lib 59 ] 60 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 61 llvmPackages.openmp 62 ]; 63 64 strictDeps = true; 65 66 dontWrapQtApps = true; 67 68 doCheck = true; 69 70 cmakeFlags = [ 71 (lib.cmakeBool "ENABLE_RUBY" false) 72 (lib.cmakeBool "ENABLE_PYTHON" true) 73 (lib.cmakeOptionType "filepath" "PYTHON_EXECUTABLE" (lib.getExe python3)) 74 (lib.cmakeOptionType "filepath" "PYTHON_MODULE_PATH" python3.sitePackages) 75 ]; 76 77 passthru = { 78 inherit libopenshot-audio; 79 }; 80 81 meta = { 82 homepage = "http://openshot.org/"; 83 description = "Free, open-source video editor library"; 84 longDescription = '' 85 OpenShot Library (libopenshot) is an open-source project dedicated to 86 delivering high quality video editing, animation, and playback solutions 87 to the world. API currently supports C++, Python, and Ruby. 88 ''; 89 license = with lib.licenses; [ gpl3Plus ]; 90 maintainers = with lib.maintainers; [ ]; 91 platforms = lib.platforms.unix; 92 }; 93})