From d80ea6aa4d6ab52d9854d83baa8acdf1b9b1b598 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Thu, 4 Jul 2019 09:50:15 +0200 Subject: [PATCH] yder: Disable systemd on non-linux --- pkgs/development/libraries/yder/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/yder/default.nix b/pkgs/development/libraries/yder/default.nix index 1b537c046db0..f6a9633a633f 100644 --- a/pkgs/development/libraries/yder/default.nix +++ b/pkgs/development/libraries/yder/default.nix @@ -1,4 +1,7 @@ -{ stdenv, lib, fetchFromGitHub, cmake, orcania, systemd, check, subunit }: +{ stdenv, lib, fetchFromGitHub, cmake, orcania, systemd, check, subunit +, withSystemd ? stdenv.isLinux +}: +assert withSystemd -> systemd != null; stdenv.mkDerivation rec { pname = "yder"; version = "1.4.6"; @@ -18,13 +21,13 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; - buildInputs = [ orcania ]; + buildInputs = [ orcania ] ++ lib.optional withSystemd systemd; checkInputs = [ check subunit ]; cmakeFlags = [ "-DBUILD_YDER_TESTING=on" - ]; + ] ++ lib.optional (!withSystemd) "-DWITH_JOURNALD=off"; doCheck = true; @@ -37,6 +40,6 @@ stdenv.mkDerivation rec { homepage = "https://github.com/babelouest/yder"; license = licenses.lgpl21; maintainers = with maintainers; [ johnazoidberg ]; - platforms = platforms.linux; + platforms = platforms.all; }; }