diff --git a/default.nix b/default.nix index 1285e3b..a8951b7 100644 --- a/default.nix +++ b/default.nix @@ -61,6 +61,7 @@ in kagefunc = callPythonPackage ./plugins/kagefunc { }; muvsfunc = callPythonPackage ./plugins/muvsfunc { }; mvsfunc = callPythonPackage ./plugins/mvsfunc { }; + vardefunc = callPythonPackage ./plugins/vardefunc { }; }; getnative = callPythonPackage ./tools/getnative { }; diff --git a/plugins/vardefunc/default.nix b/plugins/vardefunc/default.nix new file mode 100644 index 0000000..12cb59b --- /dev/null +++ b/plugins/vardefunc/default.nix @@ -0,0 +1,47 @@ +{ lib, vapoursynthPlugins, buildPythonPackage, fetchFromGitHub, python3, vapoursynth }: +let + propagatedBinaryPlugins = with vapoursynthPlugins; [ + adaptivegrain + bilateral + eedi3m + f3kdb + ffms2 + nnedi3cl + scxvid + wwxd + ]; +in +buildPythonPackage rec { + pname = "vardefunc"; + version = "1.1.4"; + + src = fetchFromGitHub { + owner = "Ichunjo"; + repo = pname; + rev = "v${version}"; + sha256 = "0bkchcshxmfcfbqapw367y3cfj1rdz78a55fkcvznvy61fhqvzl7"; + }; + + propagatedBuildInputs = (with vapoursynthPlugins; [ + fvsfunc + havsfunc + lvsfunc + vsutil + ]) ++ propagatedBinaryPlugins; + + postPatch = '' + substituteInPlace requirements.txt \ + --replace "VapourSynth>=51" "" + ''; + + checkInputs = [ (vapoursynth.withPlugins propagatedBinaryPlugins) ]; + pythonImportsCheck = [ "vardefunc" ]; + + meta = with lib; { + description = " Some functions that may be useful "; + homepage = "https://github.com/Ichunjo/vardefunc"; + license = licenses.unfree; # no license + maintainers = with maintainers; [ sbruder ]; + platforms = platforms.all; + }; +}