From fd802b877dfbd184247b06f42e86969a9c545015 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Sat, 23 Jan 2021 19:52:18 +0100 Subject: [PATCH] vapoursynthPlugins.muvsfunc: init at unstable-2020-09-09 --- default.nix | 1 + plugins/muvsfunc/default.nix | 49 ++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 plugins/muvsfunc/default.nix diff --git a/default.nix b/default.nix index c22ea3a..b932c13 100644 --- a/default.nix +++ b/default.nix @@ -54,6 +54,7 @@ in vsutil = callPythonPackage ./plugins/vsutil { }; havsfunc = callPythonPackage ./plugins/havsfunc { }; + muvsfunc = callPythonPackage ./plugins/muvsfunc { }; mvsfunc = callPythonPackage ./plugins/mvsfunc { }; }; diff --git a/plugins/muvsfunc/default.nix b/plugins/muvsfunc/default.nix new file mode 100644 index 0000000..a21a263 --- /dev/null +++ b/plugins/muvsfunc/default.nix @@ -0,0 +1,49 @@ +{ lib, vapoursynthPlugins, buildPythonPackage, fetchFromGitHub, matplotlib, python3, vapoursynth }: +let + propagatedBinaryPlugins = with vapoursynthPlugins; [ + descale + histogram + median + tcanny + ]; +in +buildPythonPackage rec { + pname = "muvsfunc"; + version = "unstable-2020-09-09"; + + src = fetchFromGitHub { + owner = "WolframRhodium"; + repo = pname; + rev = "5b5f245f090b6a4de7910ae6168b3ef0e28d2c70"; + sha256 = "1yyqdmlsvz5p07bvfkf48mggz6cdk199ai2pr2apvgcr2pchxc90"; + }; + + propagatedBuildInputs = [ + matplotlib + ] ++ (with vapoursynthPlugins; [ + havsfunc + mt_lutspa + mvsfunc + nnedi3_resample + ]) ++ propagatedBinaryPlugins; + + format = "other"; + + installPhase = '' + install -D muvsfunc.py $out/${python3.sitePackages}/muvsfunc.py + ''; + + checkInputs = [ (vapoursynth.withPlugins propagatedBinaryPlugins) ]; + checkPhase = '' + PYTHONPATH=$out/${python3.sitePackages}:$PYTHONPATH + ''; + pythonImportsCheck = [ "muvsfunc" ]; + + meta = with lib; { + description = "Muonium’s VapourSynth functions"; + homepage = "https://github.com/WolframRhodium/muvsfunc"; + license = licenses.unfree; # no license + maintainers = with maintainers; [ sbruder ]; + platforms = platforms.all; + }; +}