Merge pull request #270997 from atorres1985-contrib/scons-staging

scons: use github instead of sourceforge

Changed files
+43 -18
pkgs
development
tools
build-managers
+14 -4
pkgs/development/tools/build-managers/scons/3.1.2.nix
···
-
{ lib, fetchurl, python3 }:
+
{ lib, fetchFromGitHub, python3 }:
let
pname = "scons";
version = "3.1.2";
-
src = fetchurl {
-
url = "mirror://sourceforge/scons/scons-${version}.tar.gz";
-
hash = "sha256-eAHz9i9lRSjict94C+EMDpM36JdlC2Ldzunzn94T+Ps=";
+
src = fetchFromGitHub {
+
owner = "Scons";
+
repo = "scons";
+
rev = version;
+
hash = "sha256-C3U4N7+9vplzoJoevQe5Zeuz0TDmB6/miMwBJLzA3WA=";
};
in
python3.pkgs.buildPythonApplication {
inherit pname version src;
+
+
outputs = [ "out" "man" ];
+
+
preConfigure = ''
+
python bootstrap.py
+
cd build/scons
+
'';
setupHook = ./setup-hook.sh;
···
maintainers = with lib.maintainers; [ AndersonTorres ];
};
}
+
# TODO: patch to get rid of distutils and other deprecations
+15 -8
pkgs/development/tools/build-managers/scons/4.1.0.nix
···
-
{ lib, fetchurl, python3 }:
+
{ lib, fetchFromGitHub, python3 }:
let
pname = "scons";
version = "4.1.0";
-
src = fetchurl {
-
url = "mirror://sourceforge/scons/scons-${version}.tar.gz";
-
hash = "sha256-ctKNdi4hJnh/Fz49WeCJI5+LL06e8xFNV/ELEgaYXYU=";
+
src = fetchFromGitHub {
+
owner = "Scons";
+
repo = "scons";
+
rev = version;
+
hash = "sha256-ldus/9ghqAMB7A+NrHiCQm7saCdIpqzufGCLxWRhYKU=";
};
in
python3.pkgs.buildPythonApplication {
inherit pname version src;
+
+
outputs = [ "out" "man" ];
postPatch = ''
substituteInPlace setup.cfg \
-
--replace "build/dist" "dist" \
-
--replace "build/doc/man/" ""
+
--replace "build/dist" "dist"
+
'';
+
+
preConfigure = ''
+
python scripts/scons.py
'';
postInstall = ''
-
mkdir -p "$out/share/man/man1"
-
mv "$out/"*.1 "$out/share/man/man1/"
+
mkdir -pv "$man/share/man/man1"
+
mv -v "$out/"*.1 "$man/share/man/man1/"
'';
setupHook = ./setup-hook.sh;
+14 -6
pkgs/development/tools/build-managers/scons/4.5.2.nix
···
-
{ lib, fetchurl, python3 }:
+
{ lib, fetchFromGitHub, python3 }:
let
pname = "scons";
version = "4.5.2";
-
src = fetchurl {
-
url = "mirror://sourceforge/project/scons/scons/${version}/SCons-${version}.tar.gz";
-
hash = "sha256-ziaqyV01CnmkGSGWsL6sPLJPTMq84BI+so0zcPV28HI=";
+
src = fetchFromGitHub {
+
owner = "Scons";
+
repo = "scons";
+
rev = version;
+
hash = "sha256-vxJsz24jDsPcttwPXq9+ztc/N7W4Gkydgykk/FLgZLo=";
};
in
python3.pkgs.buildPythonApplication {
inherit pname version src;
+
outputs = [ "out" "man" ];
+
patches = [
./env.patch
];
···
--replace "build/doc/man/" ""
'';
+
preConfigure = ''
+
python scripts/scons.py
+
'';
+
postInstall = ''
-
mkdir -p "$out/share/man/man1"
-
mv "$out/"*.1 "$out/share/man/man1/"
+
mkdir -p "$man/share/man/man1"
+
mv "$out/"*.1 "$man/share/man/man1/"
'';
setupHook = ./setup-hook.sh;