scons: Add passthru.py2 for backward compatibility

Not all packages build with Python 3, see #75877. The goal is to get rid
of Python 2 but this approach ensures a smoother transition.
This commit is contained in:
Michael Weiss 2020-03-27 14:47:48 +01:00 committed by Jon
parent e9aa2ef64a
commit 0950324466
17 changed files with 28 additions and 25 deletions

View file

@ -9,9 +9,8 @@ stdenv.mkDerivation {
patches = [ ./no_error.patch ];
nativeBuildInputs = [ pkgconfig ];
nativeBuildInputs = [ scons.py2 pkgconfig ];
buildInputs = [
scons
qt4
lash
jack

View file

@ -17,10 +17,11 @@ mkDerivation rec {
sha256 = "1h7q25fv62c5m74d4cn1m6mpanmqpbl2wqbch4qvn488jb2jw1dv";
};
nativeBuildInputs = [ scons.py2 ];
buildInputs = [
chromaprint fftw flac faad2 glibcLocales mp4v2 libid3tag libmad libopus libshout libsndfile
libusb1 libvorbis libxcb libGLU lilv lv2 opusfile pkgconfig portaudio portmidi protobuf qtbase qtscript qtsvg
qtx11extras rubberband scons sqlite taglib upower vampSDK
qtx11extras rubberband sqlite taglib upower vampSDK
];
enableParallelBuilding = true;

View file

@ -15,7 +15,7 @@ in stdenv.mkDerivation {
};
nativeBuildInputs = [
scons pkgconfig
scons.py2 pkgconfig
];
buildInputs = [

View file

@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
patches = [ ./qt-5.11.patch ./scons.patch ];
nativeBuildInputs = [ pkgconfig qttools scons ];
nativeBuildInputs = [ pkgconfig qttools scons.py2 ];
buildInputs = [
GConf avahi boost hunspell libXScrnSaver libedit libidn libnatpmp libxml2

View file

@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
sha256 = "1k47gbgpp52049andr28y28nbwh9m36bbb0g8p0aka3pqlhjv72l";
};
nativeBuildInputs = [ pkgconfig scons ];
nativeBuildInputs = [ pkgconfig scons.py2 ];
buildInputs = [ apr openssl aprutil zlib libiconv ]
++ stdenv.lib.optional (!stdenv.isCygwin) kerberos;

View file

@ -3,7 +3,7 @@ stdenv.mkDerivation rec {
pname = "swiften";
version = "4.0.2";
nativeBuildInputs = [ scons];
nativeBuildInputs = [ scons.py2 ];
buildInputs = [ python ];
propagatedBuildInputs = [ openssl boost ];

View file

@ -1,6 +1,6 @@
{ version, sha256 }:
{ stdenv, fetchurl, python3Packages }:
{ stdenv, fetchurl, python3Packages, python2Packages, scons }:
python3Packages.buildPythonApplication rec {
pname = "scons";
@ -13,10 +13,10 @@ python3Packages.buildPythonApplication rec {
setupHook = ./setup-hook.sh;
passthru.py2 = scons.override { python3Packages = python2Packages; };
meta = with stdenv.lib; {
homepage = http://scons.org/;
description = "An improved, cross-platform substitute for Make";
license = licenses.mit;
longDescription = ''
SCons is an Open Source software construction tool. Think of
SCons as an improved, cross-platform substitute for the classic
@ -25,6 +25,9 @@ python3Packages.buildPythonApplication rec {
SCons is an easier, more reliable and faster way to build
software.
'';
homepage = "https://scons.org/";
changelog = "https://raw.githubusercontent.com/SConsProject/scons/rel_${version}/src/CHANGES.txt";
license = licenses.mit;
platforms = platforms.all;
maintainers = [ maintainers.primeos ];
};

View file

@ -1,12 +1,12 @@
{ callPackage }:
{ callPackage, python2Packages }:
let
mkScons = args: callPackage (import ./common.nix args) { };
in {
scons_3_0_1 = mkScons {
scons_3_0_1 = (mkScons {
version = "3.0.1";
sha256 = "0wzid419mlwqw9llrg8gsx4nkzhqy16m4m40r0xnh6cwscw5wir4";
};
}).override { python3Packages = python2Packages; };
scons_latest = mkScons {
version = "3.1.2";
sha256 = "1yzq2gg9zwz9rvfn42v5jzl3g4qf1khhny6zfbi2hib55zvg60bq";

View file

@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
chmod -R u+w $out/share/nsis
'';
nativeBuildInputs = [ scons ];
nativeBuildInputs = [ scons.py2 ];
buildInputs = [ zlib ];
sconsFlags = [

View file

@ -13,8 +13,8 @@ let
in
stdenv.mkDerivation {
inherit (s) name version;
nativeBuildInputs = [ pkgconfig ];
buildInputs = [scons SDL SDL_image boost libpng SDL_mixer libGLU libGL];
nativeBuildInputs = [ scons.py2 pkgconfig ];
buildInputs = [ SDL SDL_image boost libpng SDL_mixer libGLU libGL];
src = fetchurl {
inherit (s) url sha256;
};

View file

@ -24,7 +24,7 @@ in stdenv.mkDerivation {
sha256 = "17wdpip8zvm2njz0xrf7xcxl73hnsc6i83zj18kn8rnjkpy50dd6";
};
nativeBuildInputs = [
p7zip scons gnum4 makeWrapper
p7zip scons.py2 gnum4 makeWrapper
];
buildInputs = [
glibc_multi mesa.dev xorg.libX11.dev openal

View file

@ -20,8 +20,8 @@ let
sha256 = "001wq3c4n9wzxqfpq40b1jcl16sxbqv2zbkpy9rq2wf9h417q6hg";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ scons libGLU libGL SDL2 SDL2_image libvorbis bullet curl gettext ];
nativeBuildInputs = [ pkgconfig scons.py2 ];
buildInputs = [ libGLU libGL SDL2 SDL2_image libvorbis bullet curl gettext ];
patches = [ ./0001-Ignore-missing-data-for-installation.patch ];

View file

@ -13,8 +13,8 @@ in stdenv.mkDerivation {
};
makeFlags = [ "PREFIX=$(out)" ];
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ scons libX11 libusb1 boost glib dbus-glib ];
nativeBuildInputs = [ pkgconfig scons.py2 ];
buildInputs = [ libX11 libusb1 boost glib dbus-glib ];
dontUseSconsInstall = true;
meta = with stdenv.lib; {

View file

@ -23,7 +23,7 @@ in stdenv.mkDerivation rec {
outputs = [ "out" "bin" "dev" ];
nativeBuildInputs = [ scons pkgconfig which makeWrapper python pyqt5 ];
nativeBuildInputs = [ scons.py2 pkgconfig which makeWrapper python pyqt5 ];
prefixKey = "PREFIX=";
sconsFlags = [

View file

@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [
scons pkgconfig docbook_xml_dtd_412 docbook_xsl xmlto bc
scons.py2 pkgconfig docbook_xml_dtd_412 docbook_xsl xmlto bc
python2Packages.python
python2Packages.wrapPython
];

View file

@ -29,7 +29,7 @@ in stdenv.mkDerivation {
sha256 = "1wz2mhl9z0b1bdkg6m8v8mvw9k60mdv5ybq554xn3yjj9z500f24";
};
nativeBuildInputs = [ scons ];
nativeBuildInputs = [ scons.py2 ];
buildInputs = [
sasl boost gperftools pcre-cpp snappy
zlib libyamlcpp sasl openssl.dev openssl.out libpcap

View file

@ -16,7 +16,7 @@ stdenv.mkDerivation {
sha256 = "16k4pkwyr2mh5w8j91vhxh9aff7f4y31npwf09w6f8q63fxvpy41";
};
buildInputs = [ bison re2c scons ];
buildInputs = [ bison re2c scons.py2 ];
patches = [
./gringo-4.5.4-cmath.patch