vapoursynth-editor: allow adding plugins without rebuilding
This commit is contained in:
parent
c373e6ddb2
commit
b6f3c4d075
@ -1,9 +1,10 @@
|
||||
{ lib, mkDerivation, fetchFromBitbucket
|
||||
{ lib, stdenv, mkDerivation, fetchFromBitbucket, makeWrapper, runCommand
|
||||
, python3, vapoursynth
|
||||
, qmake, qtbase, qtwebsockets
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
let
|
||||
unwrapped = mkDerivation rec {
|
||||
pname = "vapoursynth-editor";
|
||||
version = "R19";
|
||||
|
||||
@ -26,13 +27,12 @@ mkDerivation rec {
|
||||
mkdir -p $out/bin
|
||||
for bin in vsedit{,-job-server{,-watcher}}; do
|
||||
mv $bin $out/bin
|
||||
|
||||
wrapQtApp $out/bin/$bin \
|
||||
--prefix PYTHONPATH : ${vapoursynth}/${python3.sitePackages} \
|
||||
--prefix LD_LIBRARY_PATH : ${vapoursynth}/lib
|
||||
wrapQtApp $out/bin/$bin
|
||||
done
|
||||
'';
|
||||
|
||||
passthru = { inherit withPlugins; };
|
||||
|
||||
meta = with lib; {
|
||||
description = "Cross-platform editor for VapourSynth scripts";
|
||||
homepage = "https://bitbucket.org/mystery_keeper/vapoursynth-editor";
|
||||
@ -40,4 +40,20 @@ mkDerivation rec {
|
||||
maintainers = with maintainers; [ tadeokondrak ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
withPlugins = plugins: let
|
||||
vapoursynthWithPlugins = vapoursynth.withPlugins plugins;
|
||||
in runCommand "${unwrapped.name}-with-plugins" {
|
||||
buildInputs = [ makeWrapper ];
|
||||
passthru = { withPlugins = plugins': withPlugins (plugins ++ plugins'); };
|
||||
} ''
|
||||
mkdir -p $out/bin
|
||||
for bin in vsedit{,-job-server{,-watcher}}; do
|
||||
makeWrapper ${unwrapped}/bin/$bin $out/bin/$bin \
|
||||
--prefix PYTHONPATH : ${vapoursynthWithPlugins}/${python3.sitePackages} \
|
||||
--prefix LD_LIBRARY_PATH : ${vapoursynthWithPlugins}/lib
|
||||
done
|
||||
'';
|
||||
in
|
||||
withPlugins []
|
||||
|
Loading…
x
Reference in New Issue
Block a user