2021-12-19 01:06:50 +00:00
|
|
|
{lib, stdenv, fetchurl, wxGTK, perl, python3, zlib, libGLU, libGL, libX11, SDL2}:
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "golly";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "4.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-VpEoqSPaZMP/AGIYZAbk5R/f8Crqvx8pKYN1O9Bl6V0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
url="mirror://sourceforge/project/golly/golly/golly-${version}/golly-${version}-src.tar.gz";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
2021-12-19 01:06:50 +00:00
|
|
|
wxGTK perl python3 zlib libGLU libGL libX11 SDL2
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
setSourceRoot = ''
|
2023-10-09 19:29:22 +00:00
|
|
|
sourceRoot=$(echo */gui-wx)
|
2021-12-19 01:06:50 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -e 's@PYTHON_SHLIB@${python3}/lib/libpython3.so@' -i wxprefs.cpp
|
|
|
|
sed -e 's@PERL_SHLIB@'"$(find "${perl}/lib/" -name libperl.so)"'@' -i wxprefs.cpp
|
|
|
|
! grep _SHLIB *.cpp
|
|
|
|
|
|
|
|
grep /lib/libpython wxprefs.cpp
|
|
|
|
grep /libperl wxprefs.cpp
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
makeFlags=[
|
2021-12-19 01:06:50 +00:00
|
|
|
"-f" "makefile-gtk"
|
|
|
|
"ENABLE_SOUND=1" "ENABLE_PERL=1"
|
2023-10-09 19:29:22 +00:00
|
|
|
"GOLLYDIR=${placeholder "out"}/share/golly"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
2021-12-19 01:06:50 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out/bin"
|
|
|
|
cp ../golly ../bgolly "$out/bin"
|
|
|
|
|
|
|
|
mkdir -p "$out/share/doc/golly/"
|
|
|
|
cp ../docs/* "$out/share/doc/golly/"
|
|
|
|
|
|
|
|
mkdir -p "$out/share/golly"
|
|
|
|
cp -r ../{Help,Patterns,Scripts,Rules} "$out/share/golly"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Cellular automata simulation program";
|
2021-01-17 00:15:33 +00:00
|
|
|
license = lib.licenses.gpl2;
|
|
|
|
maintainers = [lib.maintainers.raskin];
|
|
|
|
platforms = lib.platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
downloadPage = "https://sourceforge.net/projects/golly/files/golly";
|
|
|
|
};
|
|
|
|
}
|