1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-19 20:21:14 +00:00

libvisual: disable building examples when cross compiling

the examples depend on SDL, and sdl-config is not available when crossing
This commit is contained in:
Nick Cao 2023-02-14 19:35:00 +08:00
parent 463ab8deaa
commit 11b095e880
No known key found for this signature in database

View file

@ -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";