Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
95 lines
2.0 KiB
Nix
95 lines
2.0 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchurl,
|
|
wrapGAppsHook3,
|
|
wxGTK32,
|
|
python3,
|
|
zlib,
|
|
libGLU,
|
|
libGL,
|
|
libX11,
|
|
SDL2,
|
|
}:
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "golly";
|
|
version = "4.3";
|
|
|
|
src = fetchurl {
|
|
hash = "sha256-UdJHgGPn7FDN4rYTgfPBAoYE5FGC43TP8OFBmYIqCB0=";
|
|
url = "mirror://sourceforge/project/golly/golly/golly-${finalAttrs.version}/golly-${finalAttrs.version}-src.tar.gz";
|
|
};
|
|
|
|
buildInputs = [
|
|
wxGTK32
|
|
python3
|
|
zlib
|
|
libGLU
|
|
libGL
|
|
libX11
|
|
SDL2
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
(python3.withPackages (ps: [ ps.setuptools ]))
|
|
wrapGAppsHook3
|
|
];
|
|
|
|
# fails nondeterministically on darwin
|
|
enableParallelBuilding = false;
|
|
|
|
setSourceRoot = ''
|
|
sourceRoot=$(echo */gui-wx)
|
|
'';
|
|
|
|
postPatch = ''
|
|
substituteInPlace wxprefs.cpp \
|
|
--replace-fail 'PYTHON_SHLIB' '${python3}/lib/libpython3.so'
|
|
''
|
|
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
|
|
substituteInPlace makefile-gtk \
|
|
--replace-fail '-Wl,--as-needed' "" \
|
|
--replace-fail '-lGL ' "" \
|
|
--replace-fail '-lGLU' ""
|
|
'';
|
|
|
|
makeFlags = [
|
|
"-f"
|
|
"makefile-gtk"
|
|
"ENABLE_SOUND=1"
|
|
"GOLLYDIR=${placeholder "out"}/share/golly"
|
|
"CC=${stdenv.cc.targetPrefix}cc"
|
|
"CXX=${stdenv.cc.targetPrefix}c++"
|
|
"CXXC=${stdenv.cc.targetPrefix}c++"
|
|
"LD=${stdenv.cc.targetPrefix}c++"
|
|
"WX_CONFIG=${lib.getExe' (lib.getDev wxGTK32) "wx-config"}"
|
|
];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
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"
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = {
|
|
description = "Cellular automata simulation program";
|
|
license = lib.licenses.gpl2Plus;
|
|
maintainers = with lib.maintainers; [
|
|
raskin
|
|
siraben
|
|
];
|
|
platforms = lib.platforms.unix;
|
|
homepage = "https://golly.sourceforge.io/";
|
|
downloadPage = "https://sourceforge.net/projects/golly/files/golly";
|
|
};
|
|
})
|