From 54e6cfc1efd8e563371fee815389e51554998eef Mon Sep 17 00:00:00 2001 From: Andreas Rammhold Date: Mon, 19 Oct 2020 21:41:53 +0200 Subject: [PATCH] iptuils: Remove systemd from dependencies In our case systemd is only used to figure out if the unit files should be generated. --- pkgs/os-specific/linux/iputils/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/iputils/default.nix b/pkgs/os-specific/linux/iputils/default.nix index e12c44888a0b..665ec372e93c 100644 --- a/pkgs/os-specific/linux/iputils/default.nix +++ b/pkgs/os-specific/linux/iputils/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchFromGitHub , meson, ninja, pkgconfig, gettext, libxslt, docbook_xsl_ns -, libcap, systemd, libidn2 +, libcap, libidn2 }: with stdenv.lib; @@ -22,6 +22,12 @@ in stdenv.mkDerivation rec { sha256 = "1jhbcz75a4ij1myyyi110ma1d8d5hpm3scz9pyw7js6qym50xvh4"; }; + postPatch = '' + # Enable the systemd units even without systemd being an input. We set the + # unitdir manually anyway. + sed -e 's/systemd\.found()/true/g' -i meson.build + ''; + mesonFlags = [ "-DBUILD_RARPD=true" "-DBUILD_TRACEROUTE6=true" @@ -33,7 +39,7 @@ in stdenv.mkDerivation rec { ++ optional stdenv.hostPlatform.isMusl "-DUSE_IDN=false"; nativeBuildInputs = [ meson ninja pkgconfig gettext libxslt.bin docbook_xsl_ns ]; - buildInputs = [ libcap systemd ] + buildInputs = [ libcap ] ++ optional (!stdenv.hostPlatform.isMusl) libidn2; meta = {