summary refs log tree commit diff
path: root/pkgs/tools/networking/dnsmasq
diff options
context:
space:
mode:
authorDan Peebles <pumpkin@me.com>2015-12-24 23:27:31 -0500
committerDan Peebles <pumpkin@me.com>2015-12-24 23:27:31 -0500
commit50a00101c17eb081d84145492f74e3d172040008 (patch)
treee5b550c2cce128244729a3a44cc73cbf754a4fa5 /pkgs/tools/networking/dnsmasq
parentca277c2257ff981b47ad4b025712cc4f549267c8 (diff)
downloadnixpkgs-50a00101c17eb081d84145492f74e3d172040008.tar
nixpkgs-50a00101c17eb081d84145492f74e3d172040008.tar.gz
nixpkgs-50a00101c17eb081d84145492f74e3d172040008.tar.bz2
nixpkgs-50a00101c17eb081d84145492f74e3d172040008.tar.lz
nixpkgs-50a00101c17eb081d84145492f74e3d172040008.tar.xz
nixpkgs-50a00101c17eb081d84145492f74e3d172040008.tar.zst
nixpkgs-50a00101c17eb081d84145492f74e3d172040008.zip
dnsmasq: get it working on darwin again
Diffstat (limited to 'pkgs/tools/networking/dnsmasq')
-rw-r--r--pkgs/tools/networking/dnsmasq/default.nix13
1 files changed, 8 insertions, 5 deletions
diff --git a/pkgs/tools/networking/dnsmasq/default.nix b/pkgs/tools/networking/dnsmasq/default.nix
index 35cd7ae4661..63720faf707 100644
--- a/pkgs/tools/networking/dnsmasq/default.nix
+++ b/pkgs/tools/networking/dnsmasq/default.nix
@@ -3,10 +3,10 @@
 with stdenv.lib;
 let
   copts = concatStringsSep " " ([
-    "-DHAVE_DBUS"
     "-DHAVE_IDN"
     "-DHAVE_DNSSEC"
   ] ++ optionals stdenv.isLinux [
+    "-DHAVE_DBUS"
     "-DHAVE_CONNTRACK"
   ]);
 in
@@ -29,13 +29,16 @@ stdenv.mkDerivation rec {
     "LOCALEDIR=$(out)/share/locale"
   ];
 
-  postBuild = ''
+  postBuild = optionalString stdenv.isLinux ''
     make -C contrib/wrt
   '';
 
+  # XXX: Does the systemd service definition really belong here when our NixOS
+  # module can create it in Nix-land?
   postInstall = ''
-    install -Dm644 dbus/dnsmasq.conf $out/etc/dbus-1/system.d/dnsmasq.conf
     install -Dm644 trust-anchors.conf $out/share/dnsmasq/trust-anchors.conf
+  '' + optionalString stdenv.isLinux ''
+    install -Dm644 dbus/dnsmasq.conf $out/etc/dbus-1/system.d/dnsmasq.conf
     install -Dm755 contrib/wrt/dhcp_lease_time $out/bin/dhcp_lease_time
     install -Dm755 contrib/wrt/dhcp_release $out/bin/dhcp_release
 
@@ -50,8 +53,8 @@ stdenv.mkDerivation rec {
   '';
 
   nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ dbus_libs nettle libidn ]
-    ++ optional stdenv.isLinux libnetfilter_conntrack;
+  buildInputs = [ nettle libidn ]
+    ++ optionals stdenv.isLinux [ dbus_libs libnetfilter_conntrack ];
 
   meta = {
     description = "An integrated DNS, DHCP and TFTP server for small networks";