pkgs/development/libraries: stdenv.lib -> lib
This commit is contained in:
committed by
Jonathan Ringer
parent
046d24424e
commit
66e44425c6
@@ -1,4 +1,4 @@
|
||||
{ fetchurl, fetchpatch, stdenv, pkg-config, libdaemon, dbus, perlPackages
|
||||
{ fetchurl, fetchpatch, lib, stdenv, pkg-config, libdaemon, dbus, perlPackages
|
||||
, expat, gettext, intltool, glib, libiconv, writeShellScriptBin, libevent
|
||||
, gtk3Support ? false, gtk3 ? null
|
||||
, qt4 ? null
|
||||
@@ -17,7 +17,7 @@ let
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "avahi${stdenv.lib.optionalString withLibdnssdCompat "-compat"}-${version}";
|
||||
name = "avahi${lib.optionalString withLibdnssdCompat "-compat"}-${version}";
|
||||
version = "0.8";
|
||||
|
||||
src = fetchurl {
|
||||
@@ -36,32 +36,32 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs = [ libdaemon dbus glib expat libiconv libevent ]
|
||||
++ (with perlPackages; [ perl XMLParser ])
|
||||
++ (stdenv.lib.optional gtk3Support gtk3)
|
||||
++ (stdenv.lib.optional qt4Support qt4)
|
||||
++ (stdenv.lib.optional qt5Support qt5);
|
||||
++ (lib.optional gtk3Support gtk3)
|
||||
++ (lib.optional qt4Support qt4)
|
||||
++ (lib.optional qt5Support qt5);
|
||||
|
||||
propagatedBuildInputs =
|
||||
stdenv.lib.optionals withPython (with python.pkgs; [ python pygobject3 dbus-python ]);
|
||||
lib.optionals withPython (with python.pkgs; [ python pygobject3 dbus-python ]);
|
||||
|
||||
nativeBuildInputs = [ pkg-config pkg-config-helper gettext intltool glib ];
|
||||
|
||||
configureFlags =
|
||||
[ "--disable-qt3" "--disable-gdbm" "--disable-mono"
|
||||
"--disable-gtk" "--with-dbus-sys=${placeholder "out"}/share/dbus-1/system.d"
|
||||
(stdenv.lib.enableFeature gtk3Support "gtk3")
|
||||
(lib.enableFeature gtk3Support "gtk3")
|
||||
"--${if qt4Support then "enable" else "disable"}-qt4"
|
||||
"--${if qt5Support then "enable" else "disable"}-qt5"
|
||||
(stdenv.lib.enableFeature withPython "python")
|
||||
(lib.enableFeature withPython "python")
|
||||
"--localstatedir=/var" "--with-distro=none"
|
||||
# A systemd unit is provided by the avahi-daemon NixOS module
|
||||
"--with-systemdsystemunitdir=no" ]
|
||||
++ stdenv.lib.optional withLibdnssdCompat "--enable-compat-libdns_sd"
|
||||
++ lib.optional withLibdnssdCompat "--enable-compat-libdns_sd"
|
||||
# autoipd won't build on darwin
|
||||
++ stdenv.lib.optional stdenv.isDarwin "--disable-autoipd";
|
||||
++ lib.optional stdenv.isDarwin "--disable-autoipd";
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-DAVAHI_SERVICE_DIR=\"/etc/avahi/services\"";
|
||||
|
||||
preBuild = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
preBuild = lib.optionalString stdenv.isDarwin ''
|
||||
sed -i '20 i\
|
||||
#define __APPLE_USE_RFC_2292' \
|
||||
avahi-core/socket.c
|
||||
@@ -69,7 +69,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
postInstall =
|
||||
# Maintain compat for mdnsresponder and howl
|
||||
stdenv.lib.optionalString withLibdnssdCompat ''
|
||||
lib.optionalString withLibdnssdCompat ''
|
||||
ln -s avahi-compat-libdns_sd/dns_sd.h "$out/include/dns_sd.h"
|
||||
'';
|
||||
/* # these don't exist (anymore?)
|
||||
@@ -77,7 +77,7 @@ stdenv.mkDerivation rec {
|
||||
ln -s avahi-compat-howl.pc $out/lib/pkgconfig/howl.pc
|
||||
*/
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "mDNS/DNS-SD implementation";
|
||||
homepage = "http://avahi.org";
|
||||
license = licenses.lgpl2Plus;
|
||||
|
||||
Reference in New Issue
Block a user