git.iko.soy/typeable/nixpkgs
on master help sign in
Link Golly against libperl and libpython so it finds them in runtime
commit98878bc5a0a8da3b3f1351b5bf105c62546e2819 authorMichael Raskin <7c6f434c@mail.ru> dateMon 10 Nov 2014, 12:31 (12 years ago) parent9e3137d
1 file changed+15−3
pkgs/applications/science/misc/golly/default.nix+15−3
pkgs/applications/science/misc/golly/default.nix+15−3
@@ -13,15 +13,27 @@ let
1313 wxGTK perl python zlib
1414 ];
1515in
16−stdenv.mkDerivation {
16+stdenv.mkDerivation rec {
1717 inherit (s) name version;
1818 inherit buildInputs;
1919 src = fetchurl {
2020 inherit (s) url sha256;
2121 };
22− preConfigure = ''
23− cd gui-wx/configure
22+
23+ sourceRoot="${name}-src/gui-wx/configure";
24+
25+ # Link against Python explicitly as it is needed for scripts
26+ makeFlags=[
27+ "AM_LDFLAGS="
28+ ];
29+ NIX_LDFLAGS="-lpython${python.majorVersion} -lperl";
30+ preConfigure=''
31+ export NIX_LDFLAGS="$NIX_LDFLAGS -L$(dirname "$(find ${perl} -name libperl.so)")"
32+ export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE
33+ -DPYTHON_SHLIB=$(basename "$(
34+ readlink -f ${python}/lib/libpython*.so)")"
2435 '';
36+
2537 meta = {
2638 inherit (s) version;
2739 description = "Cellular automata simulation program";