From 11b095e8805aa123a4d77a5e706bebaf86622879 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Tue, 14 Feb 2023 19:35:00 +0800 Subject: [PATCH] libvisual: disable building examples when cross compiling the examples depend on SDL, and sdl-config is not available when crossing --- pkgs/development/libraries/libvisual/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libvisual/default.nix b/pkgs/development/libraries/libvisual/default.nix index d7bf28a94e4..b58c25401c9 100644 --- a/pkgs/development/libraries/libvisual/default.nix +++ b/pkgs/development/libraries/libvisual/default.nix @@ -4,6 +4,8 @@ , SDL , glib , pkg-config + # sdl-config is not available when crossing +, withExamples ? stdenv.buildPlatform == stdenv.hostPlatform }: stdenv.mkDerivation rec { @@ -16,7 +18,9 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ SDL glib ]; + buildInputs = lib.optional withExamples SDL ++ [ glib ]; + + configureFlags = lib.optional (!withExamples) "--disable-examples"; meta = { description = "An abstraction library for audio visualisations";