wpa_supplicant: enable qt gui, deprecate old broken derivation building gui

svn path=/nixpkgs/trunk/; revision=21332
This commit is contained in:
Marc Weber 2010-04-27 04:38:41 +00:00
parent 8bf3f76256
commit 9ae4b8b11c
2 changed files with 35 additions and 6 deletions

View file

@ -1,4 +1,12 @@
{stdenv, fetchurl, openssl, qt4 ? null}:
{stdenv, fetchurl, openssl
, guiSupport ? false
, qt4}:
assert !guiSupport || qt4 != null;
let
buildDirs = "wpa_supplicant wpa_passphrase wpa_cli";
in
stdenv.mkDerivation rec {
name = "wpa_supplicant-0.7.2";
@ -13,19 +21,33 @@ stdenv.mkDerivation rec {
cp defconfig .config
echo CONFIG_DEBUG_SYSLOG=y >> .config
substituteInPlace Makefile --replace /usr/local $out
makeFlagsArray=(ALL="wpa_supplicant wpa_passphrase wpa_cli ${if qt4 == null then "" else "wpa_gui-qt4"}")
makeFlagsArray=(ALL="${buildDirs} ${if guiSupport then "wpa_gui-qt4" else ""}")
'';
buildInputs = [openssl qt4];
buildInputs = [openssl]
++ stdenv.lib.optional guiSupport qt4;
# qt gui doesn't install because the executable is named differently from directory name
# so never include wpa_gui_-qt4 in buildDirs when running make install
preInstall = if guiSupport then ''
makeFlagsArray=(ALL="${buildDirs}")
'' else null;
postInstall = ''
ensureDir $out/share/man/man5 $out/share/man/man8
cp doc/docbook/*.5 $out/share/man/man5/
cp doc/docbook/*.8 $out/share/man/man8/
'';
''
+ (if guiSupport then ''
pwd
cp wpa_gui-qt4/wpa_gui $out/sbin
'' else "");
meta = {
homepage = http://hostap.epitest.fi/wpa_supplicant/;
description = "A tool for connecting to WPA and WPA2-protected wireless networks";
maintainers = [stdenv.lib.maintainers.marcweber];
platforms = stdenv.lib.platforms.linux;
};
}

View file

@ -6547,13 +6547,20 @@ let
inherit fetchurl stdenv;
};
wpa_supplicant = import ../os-specific/linux/wpa_supplicant {
wpa_supplicant = makeOverridable (import ../os-specific/linux/wpa_supplicant) {
inherit fetchurl stdenv openssl;
inherit qt4;
guiSupport = false;
};
# prebuild binaries:
wpa_supplicant_gui = wpa_supplicant.override { guiSupport = true; };
wpa_supplicant_gui_qt4 = import ../os-specific/linux/wpa_supplicant/gui-qt4.nix {
# deprecated, but contains icon ? Does no longer build
/* didn't build Sun Apr 25 20:34:18 CEST 2010
wpa_supplicant_gui_qt4_old = import ../os-specific/linux/wpa_supplicant/gui-qt4.nix {
inherit fetchurl stdenv qt4 imagemagick inkscape;
};
*/
xf86_input_wacom = import ../os-specific/linux/xf86-input-wacom {
inherit stdenv fetchurl ncurses pkgconfig file;