vapoursynthPlugins: allow override of python version

When overriding the python3 dependency of vapoursynth, it should get
propagated to all plugins. Currently, however, this causes
incompatibilities, because `vapoursynth.python3.callPackage` only sets
the `python` attribute, not `python3`. This currently causes build
failures due to different site-packages paths.
This commit is contained in:
Simon Bruder 2022-05-26 22:22:43 +02:00 committed by Simon Bruder
parent ad171d9d86
commit eeceb7e2e4
14 changed files with 43 additions and 43 deletions

View file

@ -1,4 +1,4 @@
{ lib, buildPythonPackage, fetchFromGitHub, fetchpatch, python3, vapoursynth }: { lib, buildPythonPackage, fetchFromGitHub, fetchpatch, python, vapoursynth }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "vapoursynth-adjust"; pname = "vapoursynth-adjust";
@ -21,12 +21,12 @@ buildPythonPackage rec {
format = "other"; format = "other";
installPhase = '' installPhase = ''
install -D adjust.py $out/${python3.sitePackages}/adjust.py install -D adjust.py $out/${python.sitePackages}/adjust.py
''; '';
checkInputs = [ vapoursynth ]; checkInputs = [ vapoursynth ];
checkPhase = '' checkPhase = ''
PYTHONPATH=$out/${python3.sitePackages}:$PYTHONPATH PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH
''; '';
pythonImportsCheck = [ "adjust" ]; pythonImportsCheck = [ "adjust" ];

View file

@ -1,4 +1,4 @@
{ lib, vapoursynthPlugins, buildPythonPackage, fetchFromGitHub, python3, vapoursynth }: { lib, vapoursynthPlugins, buildPythonPackage, fetchFromGitHub, python, vapoursynth }:
let let
propagatedBinaryPlugins = with vapoursynthPlugins; [ propagatedBinaryPlugins = with vapoursynthPlugins; [
f3kdb f3kdb
@ -27,14 +27,14 @@ buildPythonPackage rec {
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall
install -D debandshit.py $out/${python3.sitePackages}/debandshit.py install -D debandshit.py $out/${python.sitePackages}/debandshit.py
runHook postInstall runHook postInstall
''; '';
checkInputs = [ (vapoursynth.withPlugins propagatedBinaryPlugins) ]; checkInputs = [ (vapoursynth.withPlugins propagatedBinaryPlugins) ];
checkPhase = '' checkPhase = ''
runHook preCheck runHook preCheck
PYTHONPATH=$out/${python3.sitePackages}:$PYTHONPATH PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH
runHook postCheck runHook postCheck
''; '';
pythonImportsCheck = [ "debandshit" ]; pythonImportsCheck = [ "debandshit" ];

View file

@ -1,7 +1,7 @@
{ lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config, vapoursynth, python3 }: { lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config, vapoursynth, python }:
# required to make python3.buildEnv use descales python module # required to make python.buildEnv use descales python module
python3.pkgs.toPythonModule (stdenv.mkDerivation rec { python.pkgs.toPythonModule (stdenv.mkDerivation rec {
pname = "vapoursynth-descale"; pname = "vapoursynth-descale";
version = "r6"; version = "r6";
@ -21,7 +21,7 @@ python3.pkgs.toPythonModule (stdenv.mkDerivation rec {
''; '';
postInstall = '' postInstall = ''
install -D ../descale.py $out/${python3.sitePackages}/descale.py install -D ../descale.py $out/${python.sitePackages}/descale.py
''; '';
meta = with lib; { meta = with lib; {

View file

@ -1,4 +1,4 @@
{ lib, buildPythonPackage, fetchgit, vapoursynthPlugins, python3, vapoursynth }: { lib, buildPythonPackage, fetchgit, vapoursynthPlugins, python, vapoursynth }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "edi_rpow2"; pname = "edi_rpow2";
@ -26,12 +26,12 @@ buildPythonPackage rec {
format = "other"; format = "other";
installPhase = '' installPhase = ''
install -D edi_rpow2.py $out/${python3.sitePackages}/edi_rpow2.py install -D edi_rpow2.py $out/${python.sitePackages}/edi_rpow2.py
''; '';
checkInputs = [ (vapoursynth.withPlugins propagatedBuildInputs) ]; checkInputs = [ (vapoursynth.withPlugins propagatedBuildInputs) ];
checkPhase = '' checkPhase = ''
PYTHONPATH=$out/${python3.sitePackages}:$PYTHONPATH PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH
''; '';
pythonImportsCheck = [ "edi_rpow2" ]; pythonImportsCheck = [ "edi_rpow2" ];

View file

@ -1,4 +1,4 @@
{ lib, buildPythonPackage, fetchgit, vapoursynthPlugins, python3, vapoursynth }: { lib, buildPythonPackage, fetchgit, vapoursynthPlugins, python, vapoursynth }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "finedehalo"; pname = "finedehalo";
@ -19,14 +19,14 @@ buildPythonPackage rec {
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall
install -D finedehalo.py $out/${python3.sitePackages}/finedehalo.py install -D finedehalo.py $out/${python.sitePackages}/finedehalo.py
runHook postInstall runHook postInstall
''; '';
checkInputs = [ vapoursynth ]; checkInputs = [ vapoursynth ];
checkPhase = '' checkPhase = ''
runHook preCheck runHook preCheck
PYTHONPATH=$out/${python3.sitePackages}:$PYTHONPATH PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH
runHook postCheck runHook postCheck
''; '';
pythonImportsCheck = [ "finedehalo" ]; pythonImportsCheck = [ "finedehalo" ];

View file

@ -1,4 +1,4 @@
{ lib, vapoursynthPlugins, buildPythonPackage, fetchFromGitHub, python3, vapoursynth }: { lib, vapoursynthPlugins, buildPythonPackage, fetchFromGitHub, python, vapoursynth }:
let let
propagatedBinaryPlugins = with vapoursynthPlugins; [ propagatedBinaryPlugins = with vapoursynthPlugins; [
bilateral bilateral
@ -29,12 +29,12 @@ buildPythonPackage rec {
format = "other"; format = "other";
installPhase = '' installPhase = ''
install -D fvsfunc.py $out/${python3.sitePackages}/fvsfunc.py install -D fvsfunc.py $out/${python.sitePackages}/fvsfunc.py
''; '';
checkInputs = [ (vapoursynth.withPlugins propagatedBinaryPlugins) ]; checkInputs = [ (vapoursynth.withPlugins propagatedBinaryPlugins) ];
checkPhase = '' checkPhase = ''
PYTHONPATH=$out/${python3.sitePackages}:$PYTHONPATH PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH
''; '';
pythonImportsCheck = [ "fvsfunc" ]; pythonImportsCheck = [ "fvsfunc" ];

View file

@ -1,4 +1,4 @@
{ lib, buildPythonPackage, fetchFromGitHub, vapoursynthPlugins, python3, vapoursynth }: { lib, buildPythonPackage, fetchFromGitHub, vapoursynthPlugins, python, vapoursynth }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "havsfunc"; pname = "havsfunc";
@ -41,12 +41,12 @@ buildPythonPackage rec {
format = "other"; format = "other";
installPhase = '' installPhase = ''
install -D havsfunc.py $out/${python3.sitePackages}/havsfunc.py install -D havsfunc.py $out/${python.sitePackages}/havsfunc.py
''; '';
checkInputs = [ (vapoursynth.withPlugins propagatedBuildInputs) ]; checkInputs = [ (vapoursynth.withPlugins propagatedBuildInputs) ];
checkPhase = '' checkPhase = ''
PYTHONPATH=$out/${python3.sitePackages}:$PYTHONPATH PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH
''; '';
pythonImportsCheck = [ "havsfunc" ]; pythonImportsCheck = [ "havsfunc" ];

View file

@ -1,4 +1,4 @@
{ lib, vapoursynthPlugins, buildPythonPackage, fetchFromGitHub, python3, vapoursynth }: { lib, vapoursynthPlugins, buildPythonPackage, fetchFromGitHub, python, vapoursynth }:
let let
propagatedBinaryPlugins = with vapoursynthPlugins; [ propagatedBinaryPlugins = with vapoursynthPlugins; [
adaptivegrain adaptivegrain
@ -36,12 +36,12 @@ buildPythonPackage rec {
format = "other"; format = "other";
installPhase = '' installPhase = ''
install -D kagefunc.py $out/${python3.sitePackages}/kagefunc.py install -D kagefunc.py $out/${python.sitePackages}/kagefunc.py
''; '';
checkInputs = [ (vapoursynth.withPlugins propagatedBinaryPlugins) ]; checkInputs = [ (vapoursynth.withPlugins propagatedBinaryPlugins) ];
checkPhase = '' checkPhase = ''
PYTHONPATH=$out/${python3.sitePackages}:$PYTHONPATH PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH
python3 tests.py python3 tests.py
''; '';
pythonImportsCheck = [ "kagefunc" ]; pythonImportsCheck = [ "kagefunc" ];

View file

@ -1,4 +1,4 @@
{ lib, buildPythonPackage, fetchgit, numpy, vapoursynthPlugins, python3, vapoursynth }: { lib, buildPythonPackage, fetchgit, numpy, vapoursynthPlugins, python, vapoursynth }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "mt_lutspa"; pname = "mt_lutspa";
@ -21,12 +21,12 @@ buildPythonPackage rec {
format = "other"; format = "other";
installPhase = '' installPhase = ''
install -D mt_lutspa.py $out/${python3.sitePackages}/mt_lutspa.py install -D mt_lutspa.py $out/${python.sitePackages}/mt_lutspa.py
''; '';
checkInputs = [ vapoursynth ]; checkInputs = [ vapoursynth ];
checkPhase = '' checkPhase = ''
PYTHONPATH=$out/${python3.sitePackages}:$PYTHONPATH PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH
''; '';
pythonImportsCheck = [ "mt_lutspa" ]; pythonImportsCheck = [ "mt_lutspa" ];

View file

@ -1,4 +1,4 @@
{ lib, vapoursynthPlugins, buildPythonPackage, fetchFromGitHub, matplotlib, python3, vapoursynth }: { lib, vapoursynthPlugins, buildPythonPackage, fetchFromGitHub, matplotlib, python, vapoursynth }:
let let
propagatedBinaryPlugins = with vapoursynthPlugins; [ propagatedBinaryPlugins = with vapoursynthPlugins; [
descale descale
@ -30,12 +30,12 @@ buildPythonPackage rec {
format = "other"; format = "other";
installPhase = '' installPhase = ''
install -D muvsfunc.py $out/${python3.sitePackages}/muvsfunc.py install -D muvsfunc.py $out/${python.sitePackages}/muvsfunc.py
''; '';
checkInputs = [ (vapoursynth.withPlugins propagatedBinaryPlugins) ]; checkInputs = [ (vapoursynth.withPlugins propagatedBinaryPlugins) ];
checkPhase = '' checkPhase = ''
PYTHONPATH=$out/${python3.sitePackages}:$PYTHONPATH PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH
''; '';
pythonImportsCheck = [ "muvsfunc" ]; pythonImportsCheck = [ "muvsfunc" ];

View file

@ -1,4 +1,4 @@
{ lib, buildPythonPackage, fetchFromGitHub, vapoursynthPlugins, python3, vapoursynth }: { lib, buildPythonPackage, fetchFromGitHub, vapoursynthPlugins, python, vapoursynth }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "mvsfunc"; pname = "mvsfunc";
@ -19,12 +19,12 @@ buildPythonPackage rec {
format = "other"; format = "other";
installPhase = '' installPhase = ''
install -D mvsfunc.py $out/${python3.sitePackages}/mvsfunc.py install -D mvsfunc.py $out/${python.sitePackages}/mvsfunc.py
''; '';
checkInputs = [ (vapoursynth.withPlugins propagatedBuildInputs) ]; checkInputs = [ (vapoursynth.withPlugins propagatedBuildInputs) ];
checkPhase = '' checkPhase = ''
PYTHONPATH=$out/${python3.sitePackages}:$PYTHONPATH PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH
''; '';
pythonImportsCheck = [ "mvsfunc" ]; pythonImportsCheck = [ "mvsfunc" ];

View file

@ -1,4 +1,4 @@
{ lib, buildPythonPackage, fetchFromGitHub, vapoursynthPlugins, python3, vapoursynth }: { lib, buildPythonPackage, fetchFromGitHub, vapoursynthPlugins, python, vapoursynth }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "nnedi3_resample"; pname = "nnedi3_resample";
@ -20,12 +20,12 @@ buildPythonPackage rec {
format = "other"; format = "other";
installPhase = '' installPhase = ''
install -D nnedi3_resample.py $out/${python3.sitePackages}/nnedi3_resample.py install -D nnedi3_resample.py $out/${python.sitePackages}/nnedi3_resample.py
''; '';
checkInputs = [ (vapoursynth.withPlugins propagatedBuildInputs) ]; checkInputs = [ (vapoursynth.withPlugins propagatedBuildInputs) ];
checkPhase = '' checkPhase = ''
PYTHONPATH=$out/${python3.sitePackages}:$PYTHONPATH PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH
''; '';
pythonImportsCheck = [ "nnedi3_resample" ]; pythonImportsCheck = [ "nnedi3_resample" ];

View file

@ -1,4 +1,4 @@
{ lib, buildPythonPackage, fetchgit, vapoursynthPlugins, python3, vapoursynth }: { lib, buildPythonPackage, fetchgit, vapoursynthPlugins, python, vapoursynth }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "nnedi3_rpow2"; pname = "nnedi3_rpow2";
@ -20,12 +20,12 @@ buildPythonPackage rec {
format = "other"; format = "other";
installPhase = '' installPhase = ''
install -D nnedi3_rpow2.py $out/${python3.sitePackages}/nnedi3_rpow2.py install -D nnedi3_rpow2.py $out/${python.sitePackages}/nnedi3_rpow2.py
''; '';
checkInputs = [ (vapoursynth.withPlugins propagatedBuildInputs) ]; checkInputs = [ (vapoursynth.withPlugins propagatedBuildInputs) ];
checkPhase = '' checkPhase = ''
PYTHONPATH=$out/${python3.sitePackages}:$PYTHONPATH PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH
''; '';
pythonImportsCheck = [ "nnedi3_rpow2" ]; pythonImportsCheck = [ "nnedi3_rpow2" ];

View file

@ -1,4 +1,4 @@
{ lib, buildPythonPackage, fetchFromGitHub, vapoursynthPlugins, python3, vapoursynth }: { lib, buildPythonPackage, fetchFromGitHub, vapoursynthPlugins, python, vapoursynth }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "vsTAAmbk"; pname = "vsTAAmbk";
@ -37,12 +37,12 @@ buildPythonPackage rec {
format = "other"; format = "other";
installPhase = '' installPhase = ''
install -D vsTAAmbk.py $out/${python3.sitePackages}/vsTAAmbk.py install -D vsTAAmbk.py $out/${python.sitePackages}/vsTAAmbk.py
''; '';
checkInputs = [ (vapoursynth.withPlugins propagatedBuildInputs) ]; checkInputs = [ (vapoursynth.withPlugins propagatedBuildInputs) ];
checkPhase = '' checkPhase = ''
PYTHONPATH=$out/${python3.sitePackages}:$PYTHONPATH PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH
python3 test/vsTAAmbkTestCase.py python3 test/vsTAAmbkTestCase.py
''; '';