about summary refs log tree commit diff
path: root/pkgs/applications/science
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2014-11-10 12:31:15 +0300
committerMichael Raskin <7c6f434c@mail.ru>2014-11-10 12:31:29 +0300
commit98878bc5a0a8da3b3f1351b5bf105c62546e2819 (patch)
tree07a527472068981c9d64747c356ad5b97227be0a /pkgs/applications/science
parent9e3137ddf069218f875b385eef27d00d7c0597e1 (diff)
downloadnixlib-98878bc5a0a8da3b3f1351b5bf105c62546e2819.tar
nixlib-98878bc5a0a8da3b3f1351b5bf105c62546e2819.tar.gz
nixlib-98878bc5a0a8da3b3f1351b5bf105c62546e2819.tar.bz2
nixlib-98878bc5a0a8da3b3f1351b5bf105c62546e2819.tar.lz
nixlib-98878bc5a0a8da3b3f1351b5bf105c62546e2819.tar.xz
nixlib-98878bc5a0a8da3b3f1351b5bf105c62546e2819.tar.zst
nixlib-98878bc5a0a8da3b3f1351b5bf105c62546e2819.zip
Link Golly against libperl and libpython so it finds them in runtime
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r--pkgs/applications/science/misc/golly/default.nix18
1 files changed, 15 insertions, 3 deletions
diff --git a/pkgs/applications/science/misc/golly/default.nix b/pkgs/applications/science/misc/golly/default.nix
index a29d37cc41a1..63a0be47c474 100644
--- a/pkgs/applications/science/misc/golly/default.nix
+++ b/pkgs/applications/science/misc/golly/default.nix
@@ -13,15 +13,27 @@ let
     wxGTK perl python zlib
   ];
 in
-stdenv.mkDerivation {
+stdenv.mkDerivation rec {
   inherit (s) name version;
   inherit buildInputs;
   src = fetchurl {
     inherit (s) url sha256;
   };
-  preConfigure = ''
-    cd gui-wx/configure
+
+  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 = {
     inherit (s) version;
     description = "Cellular automata simulation program";