about summary refs log tree commit diff
path: root/pkgs/applications/video/flowblade/default.nix
blob: fff387881ccad51e0f183265686d222ee1c9de3d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{ lib, fetchFromGitHub, stdenv
, ffmpeg, frei0r, sox, gtk3, python3, ladspaPlugins
, gobject-introspection, makeWrapper, wrapGAppsHook3
}:

stdenv.mkDerivation rec {
  pname = "flowblade";
  version = "2.14.0.2";

  src = fetchFromGitHub {
    owner = "jliljebl";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-M+M6qkgYD5zM8IOFwQsuQlK7qQsvmSjR+CXVpTW+O8k=";
  };

  buildInputs = [
    ffmpeg frei0r sox gtk3 ladspaPlugins
    (python3.withPackages (ps: with ps; [ mlt pygobject3 dbus-python numpy pillow libusb1 ]))
  ];

  nativeBuildInputs = [ gobject-introspection makeWrapper wrapGAppsHook3 ];

  installPhase = ''
    runHook preInstall

    mkdir -p $out
    cp -a ${src}/flowblade-trunk $out/flowblade

    makeWrapper $out/flowblade/flowblade $out/bin/flowblade \
      --set FREI0R_PATH ${frei0r}/lib/frei0r-1 \
      --set LADSPA_PATH ${ladspaPlugins}/lib/ladspa \
      --prefix PATH : "${lib.makeBinPath [ ffmpeg ]}" \
      ''${gappsWrapperArgs[@]}

    runHook postInstall
  '';

  meta = with lib; {
    description = "Multitrack Non-Linear Video Editor";
    homepage = "https://jliljebl.github.io/flowblade/";
    license = with licenses; [ gpl3Plus ];
    platforms = platforms.linux;
    maintainers = with maintainers; [ polygon ];
    mainProgram = "flowblade";
  };
}