nixpkgs/pkgs/applications/science/misc/golly/default.nix

46 lines
1.3 KiB
Nix
Raw Normal View History

2014-09-24 11:07:00 +01:00
{stdenv, fetchurl, wxGTK, perl, python, zlib}:
2014-07-28 10:43:20 +01:00
let
2014-09-24 11:07:00 +01:00
s = # Generated upstream information
rec {
baseName="golly";
version="2.6";
name="${baseName}-${version}";
hash="1n1k3yf23ymlwq4k6p4v2g04qd29pg2rabr4l7m9bj2b2j1zkqhz";
url="mirror://sourceforge/project/golly/golly/golly-2.6/golly-2.6-src.tar.gz";
sha256="1n1k3yf23ymlwq4k6p4v2g04qd29pg2rabr4l7m9bj2b2j1zkqhz";
};
buildInputs = [
wxGTK perl python zlib
];
in
stdenv.mkDerivation rec {
2014-09-24 11:07:00 +01:00
inherit (s) name version;
inherit buildInputs;
2014-09-24 11:07:00 +01:00
src = fetchurl {
inherit (s) url sha256;
};
sourceRoot="${name}-src/gui-wx/configure";
# Link against Python explicitly as it is needed for scripts
makeFlags=[
"AM_LDFLAGS="
];
NIX_LDFLAGS="-lpython${python.majorVersion} -lperl";
preConfigure=''
export NIX_LDFLAGS="$NIX_LDFLAGS -L$(dirname "$(find ${perl} -name libperl.so)")"
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE
-DPYTHON_SHLIB=$(basename "$(
readlink -f ${python}/lib/libpython*.so)")"
'';
meta = {
2014-09-24 11:07:00 +01:00
inherit (s) version;
description = "Cellular automata simulation program";
2014-09-24 11:07:00 +01:00
license = stdenv.lib.licenses.gpl2;
maintainers = [stdenv.lib.maintainers.raskin];
platforms = stdenv.lib.platforms.linux;
downloadPage = "http://sourceforge.net/projects/golly/files/golly";
};
2014-09-24 11:07:00 +01:00
}