From 0040b158a7990fb8577f81800bfd7879e8e54217 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Sun, 16 May 2021 12:25:37 +0200 Subject: [PATCH] vapoursynthPlugins.lvsfunc: init at unstable-2021-05-15 --- default.nix | 1 + plugins/lvsfunc/default.nix | 65 +++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 plugins/lvsfunc/default.nix diff --git a/default.nix b/default.nix index ae52fcc..49ce956 100644 --- a/default.nix +++ b/default.nix @@ -67,6 +67,7 @@ in fvsfunc = callPythonPackage ./plugins/fvsfunc { }; havsfunc = callPythonPackage ./plugins/havsfunc { }; kagefunc = callPythonPackage ./plugins/kagefunc { }; + lvsfunc = callPythonPackage ./plugins/lvsfunc { }; muvsfunc = callPythonPackage ./plugins/muvsfunc { }; mvsfunc = callPythonPackage ./plugins/mvsfunc { }; vardefunc = callPythonPackage ./plugins/vardefunc { }; diff --git a/plugins/lvsfunc/default.nix b/plugins/lvsfunc/default.nix new file mode 100644 index 0000000..e1d359b --- /dev/null +++ b/plugins/lvsfunc/default.nix @@ -0,0 +1,65 @@ +{ lib, vapoursynthPlugins, buildPythonPackage, fetchFromGitHub, rich, toolz, vapoursynth }: +let + propagatedBinaryPlugins = with vapoursynthPlugins; [ + adaptivegrain + combmask + continuityfixer + d2vsource + descale + eedi3m + fmtconv + knlmeanscl + nnedi3 + readmpls + retinex + #rgsf + tcanny + znedi3 + ]; +in +buildPythonPackage rec { + pname = "lvsfunc"; + version = "unstable-2021-05-15"; + + src = fetchFromGitHub { + owner = "Irrational-Encoding-Wizardry"; + repo = pname; + rev = "76bddb75bc014a47064958beecb13143b8206fa6"; + sha256 = "0gvpz9d0lbjvpk8spkfxbmi4s8pqqyjqi8jjvfhfdf3m906v1wh1"; + }; + + postPatch = '' + # This does not depend on vapoursynth (since this is used from within + # vapoursynth). + substituteInPlace requirements.txt \ + --replace "VapourSynth>=51" "" \ + + # TODO: remove when python 3.9 is default in nixpkgs + substituteInPlace setup.py \ + --replace "python_requires='>=3.9'" "python_requires='>=3.8'" \ + ''; + + propagatedBuildInputs = [ + rich + toolz + ] ++ (with vapoursynthPlugins; [ + debandshit + edi_rpow2 + havsfunc + kagefunc + mvsfunc + vsTAAmbk + vsutil + ]); + + checkInputs = [ (vapoursynth.withPlugins propagatedBinaryPlugins) ]; + pythonImportsCheck = [ "lvsfunc" ]; + + meta = with lib; { + description = "A collection of LightArrowsEXE’s VapourSynth functions and wrappers"; + homepage = "https://lvsfunc.readthedocs.io"; + license = licenses.mit; # no license + maintainers = with maintainers; [ sbruder ]; + platforms = platforms.all; + }; +}