nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 21.11 59 lines 1.7 kB view raw
1{ lib, mkDerivation, fetchFromGitHub, makeWrapper, runCommand 2, python3, vapoursynth 3, qmake, qtbase, qtwebsockets 4}: 5 6let 7 unwrapped = mkDerivation rec { 8 pname = "vapoursynth-editor"; 9 version = "R19-mod-4"; 10 11 src = fetchFromGitHub { 12 owner = "YomikoR"; 13 repo = pname; 14 rev = lib.toLower version; 15 sha256 = "sha256-+/9j9DJDGXbuTvE8ZXIu6wjcof39SyatS36Q6y9hLPg="; 16 }; 17 18 nativeBuildInputs = [ qmake ]; 19 buildInputs = [ qtbase vapoursynth qtwebsockets ]; 20 21 dontWrapQtApps = true; 22 23 preConfigure = "cd pro"; 24 25 preFixup = '' 26 cd ../build/release* 27 mkdir -p $out/bin 28 for bin in vsedit{,-job-server{,-watcher}}; do 29 mv $bin $out/bin 30 wrapQtApp $out/bin/$bin 31 done 32 ''; 33 34 passthru = { inherit withPlugins; }; 35 36 meta = with lib; { 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; 42 }; 43 }; 44 45 withPlugins = plugins: let 46 vapoursynthWithPlugins = vapoursynth.withPlugins plugins; 47 in runCommand "${unwrapped.name}-with-plugins" { 48 buildInputs = [ makeWrapper ]; 49 passthru = { withPlugins = plugins': withPlugins (plugins ++ plugins'); }; 50 } '' 51 mkdir -p $out/bin 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 56 done 57 ''; 58in 59 withPlugins []