scons_4_5_2: use github instead of sourceforge direct link

This commit is contained in:
Anderson Torres 2023-11-29 14:37:28 -03:00
parent 2d13423feb
commit 70b907a496

View File

@ -1,16 +1,20 @@
{ 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
];
@ -21,9 +25,13 @@ python3.pkgs.buildPythonApplication {
--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;