aboutsummaryrefslogtreecommitdiff
path: root/pkgs/tools/networking/dnsmasq
diff options
context:
space:
mode:
authorNick Novitski <nicknovitski@gmail.com>2017-03-07 14:52:08 +1300
committerNick Novitski <nicknovitski@gmail.com>2017-03-09 11:30:50 +1300
commit44cf3c44b0b1d4f278e1be379ab24d6abbf4f71b (patch)
treee3a91afd47a7f168b331b7b41970bb5390b678fa /pkgs/tools/networking/dnsmasq
parentf8e5b8dbe29cd1cbbc0334c06d8663bdd42208b6 (diff)
dnsmasq: install launchd plist on darwin
Diffstat (limited to 'pkgs/tools/networking/dnsmasq')
-rw-r--r--pkgs/tools/networking/dnsmasq/default.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/tools/networking/dnsmasq/default.nix b/pkgs/tools/networking/dnsmasq/default.nix
index 14bde9a5fa5b..4b1717e09025 100644
--- a/pkgs/tools/networking/dnsmasq/default.nix
+++ b/pkgs/tools/networking/dnsmasq/default.nix
@@ -39,6 +39,11 @@ stdenv.mkDerivation rec {
# module can create it in Nix-land?
postInstall = ''
install -Dm644 trust-anchors.conf $out/share/dnsmasq/trust-anchors.conf
+ '' + optionalString stdenv.isDarwin ''
+ install -Dm644 contrib/MacOSX-launchd/uk.org.thekelleys.dnsmasq.plist \
+ $out/Library/LaunchDaemons/uk.org.thekelleys.dnsmasq.plist
+ substituteInPlace $out/Library/LaunchDaemons/uk.org.thekelleys.dnsmasq.plist \
+ --replace "/usr/local/sbin" "$out/bin"
'' + optionalString stdenv.isLinux ''
install -Dm644 dbus/dnsmasq.conf $out/etc/dbus-1/system.d/dnsmasq.conf
install -Dm755 contrib/lease-tools/dhcp_lease_time $out/bin/dhcp_lease_time