From f13b913fdcc2926fd8978c661175a43b80da0ce8 Mon Sep 17 00:00:00 2001 From: Aidan Gauland Date: Sun, 25 Sep 2022 17:39:08 +1300 Subject: [PATCH] astdr: init at 4 --- default.nix | 1 + plugins/astdr/default.nix | 64 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 plugins/astdr/default.nix diff --git a/default.nix b/default.nix index 45a08f9..0567fb6 100644 --- a/default.nix +++ b/default.nix @@ -68,6 +68,7 @@ in acsuite = callPythonPackage ./plugins/acsuite { }; adjust = callPythonPackage ./plugins/adjust { }; + astdr = callPythonPackage ./plugins/astdr { }; debandshit = callPythonPackage ./plugins/debandshit { }; edi_rpow2 = callPythonPackage ./plugins/edi_rpow2 { }; finedehalo = callPythonPackage ./plugins/finedehalo { }; diff --git a/plugins/astdr/default.nix b/plugins/astdr/default.nix new file mode 100644 index 0000000..820f86d --- /dev/null +++ b/plugins/astdr/default.nix @@ -0,0 +1,64 @@ +{ lib +, fetchFromGitHub +, buildPythonPackage +, python +, vapoursynthPlugins +, vapoursynth +}: + +let + plugins_native = with vapoursynthPlugins; [ + awarpsharp2 + fft3dfilter + hqdn3d + mvtools + ctmf + fluxsmooth + decross + temporalsoften2 + motionmask + ]; + plugins_python = with vapoursynthPlugins; [ + adjust + ]; +in +buildPythonPackage rec { + pname = "astdr"; + version = "4"; + + src = fetchFromGitHub { + owner = "dubhater"; + repo = "vapoursynth-astdr"; + rev = "v${version}"; + sha256 = "sha256-We3vhTZCGYZPMOAfWGif3yAxBUAPUk9zm9JQdlWhn8E="; + }; + + format = "other"; + + propagatedBuildInputs = plugins_native ++ plugins_python; + + installPhase = '' + runHook preInstall + + install -D ASTDR.py $out/${python.sitePackages}/ASTDR.py + + runHook postInstall + ''; + + checkInputs = [ (vapoursynth.withPlugins plugins_native ) ]; + checkPhase = '' + PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH + ''; + pythonImportsCheck = [ "ASTDR" ]; + + meta = with lib; { + description = "A VapourSynth derainbow function"; + longDescription = '' + This is a port of the Avisynth function of the same name, version 1.74. + ''; + homepage = "https://github.com/dubhater/vapoursynth-astdr"; + license = licenses.unfree; # no license + maintainers = with maintainers; [ aidalgol ]; + platforms = platforms.all; + }; +}