about summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorJason "Don" O'Conal <lovek323@gmail.com>2013-06-19 12:05:42 +1000
committerJason "Don" O'Conal <lovek323@gmail.com>2013-06-19 12:06:55 +1000
commit719b488b102ac5bfa501cb5a64aca097efcda5c2 (patch)
treefefa6e681e105b9b2136af7c6dab701c04264865 /pkgs/applications
parent4ecbe3bf5d3f59938ef51f3a7bd5561e17b69696 (diff)
downloadnixlib-719b488b102ac5bfa501cb5a64aca097efcda5c2.tar
nixlib-719b488b102ac5bfa501cb5a64aca097efcda5c2.tar.gz
nixlib-719b488b102ac5bfa501cb5a64aca097efcda5c2.tar.bz2
nixlib-719b488b102ac5bfa501cb5a64aca097efcda5c2.tar.lz
nixlib-719b488b102ac5bfa501cb5a64aca097efcda5c2.tar.xz
nixlib-719b488b102ac5bfa501cb5a64aca097efcda5c2.tar.zst
nixlib-719b488b102ac5bfa501cb5a64aca097efcda5c2.zip
vim_configurable: fix python on darwin
* was not linking to the correct python library on darwin (using the OS
  X framework, which is not what we want)
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/editors/vim/configurable.nix27
1 files changed, 24 insertions, 3 deletions
diff --git a/pkgs/applications/editors/vim/configurable.nix b/pkgs/applications/editors/vim/configurable.nix
index d9211203cadc..066c8fddd960 100644
--- a/pkgs/applications/editors/vim/configurable.nix
+++ b/pkgs/applications/editors/vim/configurable.nix
@@ -40,6 +40,15 @@ composableDerivation {
       }.src;
     };
 
+    # if darwin support is enabled, we want to make sure we're not building with
+    # OS-installed python framework
+    preConfigure
+      = stdenv.lib.optionalString
+        (stdenv.isDarwin && (config.vim.darwin or true)) ''
+          sed -i "5387,5390d" src/auto/configure
+          sed -i "5394d" src/auto/configure
+        '';
+
     configureFlags
       = [ "--enable-gui=${args.gui}" "--with-features=${args.features}" ];
 
@@ -58,7 +67,19 @@ composableDerivation {
       // edf { name = "xsmp_interact"; } #Disable XSMP interaction
       // edf { name = "mzscheme"; } #Include MzScheme interpreter.
       // edf { name = "perl"; feat = "perlinterp"; enable = { nativeBuildInputs = [perl]; };} #Include Perl interpreter.
-      // edf { name = "python"; feat = "pythoninterp"; enable = { nativeBuildInputs = [python]; }; } #Include Python interpreter.
+
+      // edf {
+        name = "python";
+        feat = "pythoninterp";
+        enable = {
+          nativeBuildInputs = [ python ];
+        } // lib.optionalAttrs stdenv.isDarwin {
+          configureFlags
+            = [ "--enable-pythoninterp=yes"
+                "--with-python-config-dir=${python}/lib" ];
+        };
+      }
+
       // edf { name = "tcl"; enable = { nativeBuildInputs = [tcl]; }; } #Include Tcl interpreter.
       // edf { name = "ruby"; feat = "rubyinterp"; enable = { nativeBuildInputs = [ruby]; };} #Include Ruby interpreter.
       // edf { name = "lua" ; feat = "luainterp"; enable = { nativeBuildInputs = [lua]; configureFlags = ["--with-lua-prefix=${args.lua}"];};}
@@ -104,7 +125,7 @@ composableDerivation {
       // edf "gtktest" "gtktest" { } #Do not try to compile and run a test GTK program
     */
 
-  postInstall = if stdenv.isLinux then ''
+  postInstall = stdenv.lib.optionalString stdenv.isLinux ''
     rpath=`patchelf --print-rpath $out/bin/vim`;
     for i in $nativeBuildInputs; do
       echo adding $i/lib
@@ -113,7 +134,7 @@ composableDerivation {
     echo $nativeBuildInputs
     echo $rpath
     patchelf --set-rpath $rpath $out/bin/{vim,gvim}
-  '' else "";
+  '';
 
   dontStrip = 1;