From 2f79d6408931f090b9ee59fdf6030b372ecd7ec8 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 26 Mar 2008 09:53:04 +0000 Subject: [PATCH] * Purity fixes in kdelibs/kdebase: configure looks for pkg-config and freetype-config in /usr/bin *before* looking $PATH, possibly causing it to fail on non-NixOS machines. svn path=/nixpkgs/trunk/; revision=11287 --- pkgs/desktops/kde/kdebase/default.nix | 16 +++++++++++++++- pkgs/desktops/kde/kdelibs/default.nix | 10 ++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/pkgs/desktops/kde/kdebase/default.nix b/pkgs/desktops/kde/kdebase/default.nix index 77dc9889995a..c550c228ed7a 100644 --- a/pkgs/desktops/kde/kdebase/default.nix +++ b/pkgs/desktops/kde/kdebase/default.nix @@ -27,9 +27,23 @@ stdenv.mkDerivation { --with-extra-includes=${libjpeg}/include "; + # Prevent configure from looking for pkg-config and freetype-config + # in the wrong location (it looks in /usr/bin etc. *before* looking + # in $PATH). + preConfigure = '' + substituteInPlace configure \ + --replace /usr/bin /no-such-path \ + --replace /usr/local/bin /no-such-path \ + --replace /opt/local/bin /no-such-path + ''; + # Quick hack to work around a faulty dependency in # konqueror/keditbookmarks/Makefile.am (${includedir} should be # ${kdelibs} or so). - preBuild = "ensureDir $out/include; ln -s ${kdelibs}/include/kbookmarknotifier.h $out/include/"; + preBuild = '' + ensureDir $out/include + ln -s ${kdelibs}/include/kbookmarknotifier.h $out/include/ + ''; + postInstall = "rm $out/include/kbookmarknotifier.h"; } diff --git a/pkgs/desktops/kde/kdelibs/default.nix b/pkgs/desktops/kde/kdelibs/default.nix index 9eb6625d45aa..76c5f5cc3f5b 100644 --- a/pkgs/desktops/kde/kdelibs/default.nix +++ b/pkgs/desktops/kde/kdelibs/default.nix @@ -21,6 +21,16 @@ stdenv.mkDerivation { libtool freetype bzip2 cups ]; + # Prevent configure from looking for pkg-config and freetype-config + # in the wrong location (it looks in /usr/bin etc. *before* looking + # in $PATH). + preConfigure = '' + substituteInPlace configure \ + --replace /usr/bin /no-such-path \ + --replace /usr/local/bin /no-such-path \ + --replace /opt/local/bin /no-such-path + ''; + configureFlags = " --without-arts --with-ssl-dir=${openssl}