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:
@@ -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 ];
|
||||
};
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user