vapoursynthPlugins.kagefunc: init at unstable-2021-01-21

This commit is contained in:
Simon Bruder 2021-01-23 19:55:21 +01:00 committed by Tadeo Kondrak
parent dae0d8550e
commit a6939762f1
3 changed files with 69 additions and 0 deletions

View file

@ -55,6 +55,7 @@ in
fvsfunc = callPythonPackage ./plugins/fvsfunc { };
havsfunc = callPythonPackage ./plugins/havsfunc { };
kagefunc = callPythonPackage ./plugins/kagefunc { };
muvsfunc = callPythonPackage ./plugins/muvsfunc { };
mvsfunc = callPythonPackage ./plugins/mvsfunc { };
};

View file

@ -0,0 +1,56 @@
{ lib, vapoursynthPlugins, buildPythonPackage, fetchFromGitHub, python3, vapoursynth }:
let
propagatedBinaryPlugins = with vapoursynthPlugins; [
adaptivegrain
addgrain
bm3d
descale
fmtconv
knlmeanscl
retinex
tcanny
wwxd
];
in
buildPythonPackage rec {
pname = "kagefunc";
version = "unstable-2021-01-21";
src = fetchFromGitHub {
owner = "Irrational-Encoding-Wizardry";
repo = pname;
rev = "a1e89b1dd591bafec3b9f95e0087b096b9b6f9b1";
sha256 = "0j7n7iz0ksqydjm3jzk2l71a77l9ljm71wg414amdqjcbm5dmsw5";
};
patches = [
./skip-opencl-test.diff
];
propagatedBuildInputs = (with vapoursynthPlugins; [
fvsfunc
mvsfunc
vsutil
]) ++ propagatedBinaryPlugins;
format = "other";
installPhase = ''
install -D kagefunc.py $out/${python3.sitePackages}/kagefunc.py
'';
checkInputs = [ (vapoursynth.withPlugins propagatedBinaryPlugins) ];
checkPhase = ''
PYTHONPATH=$out/${python3.sitePackages}:$PYTHONPATH
python3 tests.py
'';
pythonImportsCheck = [ "kagefunc" ];
meta = with lib; {
description = "A collection of Vapoursynth functions.";
homepage = "https://github.com/Irrational-Encoding-Wizardry/kagefunc";
license = licenses.mit;
maintainers = with maintainers; [ sbruder ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,12 @@
diff --git a/tests.py b/tests.py
index 2a64cb9..ab2d2af 100644
--- a/tests.py
+++ b/tests.py
@@ -22,6 +22,7 @@ class KagefuncTests(unittest.TestCase):
# request a frame to see if that errors
mask.get_frame(0)
+ @unittest.skip("no OpenCL support in nix build sandbox")
def test_inverse_scale(self):
src = self.BLACK_SAMPLE_CLIP
resized = kgf.inverse_scale(self.GREYSCALE_SAMPLE_CLIP, height=90)