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 {
pname = "vapoursynth-adjust";
@ -21,12 +21,12 @@ buildPythonPackage rec {
format = "other";
installPhase = ''
install -D adjust.py $out/${python3.sitePackages}/adjust.py
install -D adjust.py $out/${python.sitePackages}/adjust.py
'';
checkInputs = [ vapoursynth ];
checkPhase = ''
PYTHONPATH=$out/${python3.sitePackages}:$PYTHONPATH
PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH
'';
pythonImportsCheck = [ "adjust" ];

View file

@ -1,4 +1,4 @@
{ lib, vapoursynthPlugins, buildPythonPackage, fetchFromGitHub, python3, vapoursynth }:
{ lib, vapoursynthPlugins, buildPythonPackage, fetchFromGitHub, python, vapoursynth }:
let
propagatedBinaryPlugins = with vapoursynthPlugins; [
f3kdb
@ -27,14 +27,14 @@ buildPythonPackage rec {
installPhase = ''
runHook preInstall
install -D debandshit.py $out/${python3.sitePackages}/debandshit.py
install -D debandshit.py $out/${python.sitePackages}/debandshit.py
runHook postInstall
'';
checkInputs = [ (vapoursynth.withPlugins propagatedBinaryPlugins) ];
checkPhase = ''
runHook preCheck
PYTHONPATH=$out/${python3.sitePackages}:$PYTHONPATH
PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH
runHook postCheck
'';
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
python3.pkgs.toPythonModule (stdenv.mkDerivation rec {
# required to make python.buildEnv use descales python module
python.pkgs.toPythonModule (stdenv.mkDerivation rec {
pname = "vapoursynth-descale";
version = "r6";
@ -21,7 +21,7 @@ python3.pkgs.toPythonModule (stdenv.mkDerivation rec {
'';
postInstall = ''
install -D ../descale.py $out/${python3.sitePackages}/descale.py
install -D ../descale.py $out/${python.sitePackages}/descale.py
'';
meta = with lib; {

View file

@ -1,4 +1,4 @@
{ lib, buildPythonPackage, fetchgit, vapoursynthPlugins, python3, vapoursynth }:
{ lib, buildPythonPackage, fetchgit, vapoursynthPlugins, python, vapoursynth }:
buildPythonPackage rec {
pname = "edi_rpow2";
@ -26,12 +26,12 @@ buildPythonPackage rec {
format = "other";
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) ];
checkPhase = ''
PYTHONPATH=$out/${python3.sitePackages}:$PYTHONPATH
PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH
'';
pythonImportsCheck = [ "edi_rpow2" ];

View file

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

View file

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

View file

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

View file

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

View file

@ -1,4 +1,4 @@
{ lib, buildPythonPackage, fetchgit, numpy, vapoursynthPlugins, python3, vapoursynth }:
{ lib, buildPythonPackage, fetchgit, numpy, vapoursynthPlugins, python, vapoursynth }:
buildPythonPackage rec {
pname = "mt_lutspa";
@ -21,12 +21,12 @@ buildPythonPackage rec {
format = "other";
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 ];
checkPhase = ''
PYTHONPATH=$out/${python3.sitePackages}:$PYTHONPATH
PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH
'';
pythonImportsCheck = [ "mt_lutspa" ];

View file

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

View file

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

View file

@ -1,4 +1,4 @@
{ lib, buildPythonPackage, fetchFromGitHub, vapoursynthPlugins, python3, vapoursynth }:
{ lib, buildPythonPackage, fetchFromGitHub, vapoursynthPlugins, python, vapoursynth }:
buildPythonPackage rec {
pname = "nnedi3_resample";
@ -20,12 +20,12 @@ buildPythonPackage rec {
format = "other";
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) ];
checkPhase = ''
PYTHONPATH=$out/${python3.sitePackages}:$PYTHONPATH
PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH
'';
pythonImportsCheck = [ "nnedi3_resample" ];

View file

@ -1,4 +1,4 @@
{ lib, buildPythonPackage, fetchgit, vapoursynthPlugins, python3, vapoursynth }:
{ lib, buildPythonPackage, fetchgit, vapoursynthPlugins, python, vapoursynth }:
buildPythonPackage rec {
pname = "nnedi3_rpow2";
@ -20,12 +20,12 @@ buildPythonPackage rec {
format = "other";
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) ];
checkPhase = ''
PYTHONPATH=$out/${python3.sitePackages}:$PYTHONPATH
PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH
'';
pythonImportsCheck = [ "nnedi3_rpow2" ];

View file

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