Loading pkgs/applications/science/misc/golly/default.nix +33 −12 Original line number Diff line number Diff line Loading @@ -11,13 +11,13 @@ libX11, SDL2, }: stdenv.mkDerivation rec { stdenv.mkDerivation (finalAttrs: { pname = "golly"; version = "4.3"; src = fetchurl { hash = "sha256-UdJHgGPn7FDN4rYTgfPBAoYE5FGC43TP8OFBmYIqCB0="; url = "mirror://sourceforge/project/golly/golly/golly-${version}/golly-${version}-src.tar.gz"; url = "mirror://sourceforge/project/golly/golly/golly-${finalAttrs.version}/golly-${finalAttrs.version}-src.tar.gz"; }; buildInputs = [ Loading @@ -35,15 +35,23 @@ stdenv.mkDerivation rec { wrapGAppsHook3 ]; # fails nondeterministically on darwin enableParallelBuilding = false; setSourceRoot = '' sourceRoot=$(echo */gui-wx) ''; postPatch = '' sed -e 's@PYTHON_SHLIB@${python3}/lib/libpython3.so@' -i wxprefs.cpp ! grep _SHLIB *.cpp grep /lib/libpython wxprefs.cpp 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 = [ Loading @@ -51,9 +59,16 @@ stdenv.mkDerivation rec { "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 wxGTK) "wx-config"}" ]; installPhase = '' runHook preInstall mkdir -p "$out/bin" cp ../golly ../bgolly "$out/bin" Loading @@ -62,13 +77,19 @@ stdenv.mkDerivation rec { 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.gpl2; maintainers = [ lib.maintainers.raskin ]; platforms = lib.platforms.linux; 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"; }; } }) Loading
pkgs/applications/science/misc/golly/default.nix +33 −12 Original line number Diff line number Diff line Loading @@ -11,13 +11,13 @@ libX11, SDL2, }: stdenv.mkDerivation rec { stdenv.mkDerivation (finalAttrs: { pname = "golly"; version = "4.3"; src = fetchurl { hash = "sha256-UdJHgGPn7FDN4rYTgfPBAoYE5FGC43TP8OFBmYIqCB0="; url = "mirror://sourceforge/project/golly/golly/golly-${version}/golly-${version}-src.tar.gz"; url = "mirror://sourceforge/project/golly/golly/golly-${finalAttrs.version}/golly-${finalAttrs.version}-src.tar.gz"; }; buildInputs = [ Loading @@ -35,15 +35,23 @@ stdenv.mkDerivation rec { wrapGAppsHook3 ]; # fails nondeterministically on darwin enableParallelBuilding = false; setSourceRoot = '' sourceRoot=$(echo */gui-wx) ''; postPatch = '' sed -e 's@PYTHON_SHLIB@${python3}/lib/libpython3.so@' -i wxprefs.cpp ! grep _SHLIB *.cpp grep /lib/libpython wxprefs.cpp 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 = [ Loading @@ -51,9 +59,16 @@ stdenv.mkDerivation rec { "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 wxGTK) "wx-config"}" ]; installPhase = '' runHook preInstall mkdir -p "$out/bin" cp ../golly ../bgolly "$out/bin" Loading @@ -62,13 +77,19 @@ stdenv.mkDerivation rec { 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.gpl2; maintainers = [ lib.maintainers.raskin ]; platforms = lib.platforms.linux; 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"; }; } })