From 039b660b5b712c7197c24ae1da3e3e417c27e42f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Wed, 11 Aug 2010 20:11:12 +0000 Subject: [PATCH] Making lynx, yacas and alsa-lib crossbuild svn path=/nixpkgs/branches/stdenv-updates/; revision=23130 --- .../networking/browsers/lynx/default.nix | 1 + .../science/math/yacas/default.nix | 21 ++++++++++++++++++- pkgs/os-specific/linux/alsa-lib/default.nix | 6 ++++++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/browsers/lynx/default.nix b/pkgs/applications/networking/browsers/lynx/default.nix index c9da94258c83..97d28dd7e2f5 100644 --- a/pkgs/applications/networking/browsers/lynx/default.nix +++ b/pkgs/applications/networking/browsers/lynx/default.nix @@ -15,6 +15,7 @@ stdenv.mkDerivation { configureFlags = if sslSupport then "--with-ssl" else ""; buildInputs = [ ncurses ] ++ stdenv.lib.optional sslSupport openssl; + buildNativeInputs = [ ncurses ]; meta = { homepage = http://lynx.isc.org/; diff --git a/pkgs/applications/science/math/yacas/default.nix b/pkgs/applications/science/math/yacas/default.nix index 148e95acee06..7b97e1a82c00 100644 --- a/pkgs/applications/science/math/yacas/default.nix +++ b/pkgs/applications/science/math/yacas/default.nix @@ -9,10 +9,29 @@ stdenv.mkDerivation rec { }; # Perl is only for the documentation - buildInputs = [ perl ]; + buildNativeInputs = [ perl ]; patches = [ ./gcc43.patch ]; + crossAttrs = { + # Trick to get host-built programs needed for the cross-build. + # If yacas had proper makefiles, this would not be needed. + preConfigure = '' + ./configure + pushd src + make mkfastprimes + cp mkfastprimes ../.. + popd + pushd manmake + make manripper removeduplicates + cp manripper removeduplicates ../.. + popd + ''; + preBuild = '' + cp ../mkfastprimes ../manripper ../removeduplicates src + ''; + }; + meta = { description = "Easy to use, general purpose Computer Algebra System"; homepage = http://yacas.sourceforge.net/; diff --git a/pkgs/os-specific/linux/alsa-lib/default.nix b/pkgs/os-specific/linux/alsa-lib/default.nix index 727db1c9642b..aaa714d8d590 100644 --- a/pkgs/os-specific/linux/alsa-lib/default.nix +++ b/pkgs/os-specific/linux/alsa-lib/default.nix @@ -14,6 +14,12 @@ stdenv.mkDerivation rec { postPatch = '' sed -i -e 's|//int snd_pcm_mixer_element(snd_pcm_t \*pcm, snd_mixer_t \*mixer, snd_mixer_elem_t \*\*elem);|/\*int snd_pcm_mixer_element(snd_pcm_t \*pcm, snd_mixer_t \*mixer, snd_mixer_elem_t \*\*elem);\*/|' include/pcm.h ''; + + crossAttrs = { + patchPhase = '' + sed -i s/extern/static/g include/iatomic.h + ''; + }; meta = { description = "ALSA, the Advanced Linux Sound Architecture libraries";