1 { lib, mkDerivation, fetchFromGitHub, makeWrapper, runCommand
3 , qmake, qtbase, qtwebsockets
7 unwrapped = mkDerivation rec {
8 pname = "vapoursynth-editor";
11 src = fetchFromGitHub {
14 rev = lib.toLower version;
15 sha256 = "sha256-+/9j9DJDGXbuTvE8ZXIu6wjcof39SyatS36Q6y9hLPg=";
18 nativeBuildInputs = [ qmake ];
19 buildInputs = [ qtbase vapoursynth qtwebsockets ];
21 dontWrapQtApps = true;
23 preConfigure = "cd pro";
28 for bin in vsedit{,-job-server{,-watcher}}; do
30 wrapQtApp $out/bin/$bin
34 passthru = { inherit withPlugins; };
37 description = "Cross-platform editor for VapourSynth scripts";
38 homepage = "https://github.com/YomikoR/VapourSynth-Editor";
39 license = licenses.mit;
40 maintainers = with maintainers; [ tadeokondrak ];
41 platforms = platforms.all;
45 withPlugins = plugins: let
46 vapoursynthWithPlugins = vapoursynth.withPlugins plugins;
47 in runCommand "${unwrapped.name}-with-plugins" {
48 nativeBuildInputs = [ makeWrapper ];
49 passthru = { withPlugins = plugins': withPlugins (plugins ++ plugins'); };
52 for bin in vsedit{,-job-server{,-watcher}}; do
53 makeWrapper ${unwrapped}/bin/$bin $out/bin/$bin \
54 --prefix PYTHONPATH : ${vapoursynthWithPlugins}/${python3.sitePackages} \
55 --prefix LD_LIBRARY_PATH : ${vapoursynthWithPlugins}/lib