From 0741cf76d9a83007f60ab1083ddcdea80fadd91a Mon Sep 17 00:00:00 2001 From: cid-chan <76440879+cid-chan@users.noreply.github.com> Date: Thu, 15 Sep 2022 14:24:21 +0200 Subject: [PATCH] python310Packages.vapoursynth: add a withPlugins to extend it (#190660) --- .../libraries/vapoursynth/plugin-interface.nix | 1 + pkgs/development/python-modules/vapoursynth/default.nix | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/vapoursynth/plugin-interface.nix b/pkgs/development/libraries/vapoursynth/plugin-interface.nix index 95df3c97747f..064893a3dbcd 100644 --- a/pkgs/development/libraries/vapoursynth/plugin-interface.nix +++ b/pkgs/development/libraries/vapoursynth/plugin-interface.nix @@ -42,6 +42,7 @@ runCommand "${vapoursynth.name}-with-plugins" { nativeBuildInputs = [ makeWrapper ]; passthru = { inherit python3; + inherit (vapoursynth) src version; withPlugins = plugins': withPlugins (plugins ++ plugins'); }; } '' diff --git a/pkgs/development/python-modules/vapoursynth/default.nix b/pkgs/development/python-modules/vapoursynth/default.nix index ec88f244aee6..3a72e5c2d9d0 100644 --- a/pkgs/development/python-modules/vapoursynth/default.nix +++ b/pkgs/development/python-modules/vapoursynth/default.nix @@ -1,4 +1,4 @@ -{ vapoursynth, cython, buildPythonPackage, unittestCheckHook }: +{ vapoursynth, cython, buildPythonPackage, unittestCheckHook, python }: buildPythonPackage { pname = "vapoursynth"; @@ -19,6 +19,13 @@ buildPythonPackage { unittestFlagsArray = [ "-s" "$src/test" "-p" "'*test.py'" ]; + passthru = { + withPlugins = plugins: + python.pkgs.vapoursynth.override { + vapoursynth = vapoursynth.withPlugins plugins; + }; + }; + inherit (vapoursynth) meta; }