3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/science/misc/golly/default.nix

55 lines
1.4 KiB
Nix
Raw Normal View History

2021-12-06 15:27:09 +00:00
{lib, stdenv, fetchurl, wxGTK, perl, python3, zlib, libGLU, libGL, libX11, SDL2}:
2017-11-11 13:09:36 +00:00
stdenv.mkDerivation rec {
pname = "golly";
2021-12-06 15:27:09 +00:00
version = "4.1";
2017-11-11 13:09:36 +00:00
src = fetchurl {
2021-12-06 15:27:09 +00:00
sha256 = "1j30dpzy6wh8fv1j2750hzc6wb0nhk83knl9fapccxgxw9n5lrbc";
2017-11-11 13:09:36 +00:00
url="mirror://sourceforge/project/golly/golly/golly-${version}/golly-${version}-src.tar.gz";
2014-09-24 11:07:00 +01:00
};
2017-11-11 13:09:36 +00:00
2014-09-24 11:07:00 +01:00
buildInputs = [
2021-12-06 15:27:09 +00:00
wxGTK perl python3 zlib libGLU libGL libX11 SDL2
2014-09-24 11:07:00 +01:00
];
setSourceRoot = ''
2021-12-06 15:27:09 +00:00
sourceRoot=$(echo */gui-wx/)
'';
postPatch = ''
sed -e '/gollydir =/agollydir += "/../share/golly/";' -i wxgolly.cpp
grep share/golly wxgolly.cpp
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
'';
makeFlags=[
2021-12-06 15:27:09 +00:00
"-f" "makefile-gtk"
"ENABLE_SOUND=1" "ENABLE_PERL=1"
];
2021-12-06 15:27:09 +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"
'';
meta = {
description = "Cellular automata simulation program";
2021-01-15 13:21:58 +00:00
license = lib.licenses.gpl2;
maintainers = [lib.maintainers.raskin];
platforms = lib.platforms.linux;
2018-11-24 18:58:03 +00:00
downloadPage = "https://sourceforge.net/projects/golly/files/golly";
};
2014-09-24 11:07:00 +01:00
}