3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #216302 from NickCao/libvisual

libvisual: disable building examples when cross compiling
This commit is contained in:
Nick Cao 2023-02-18 15:52:59 +08:00 committed by GitHub
commit 54a954d251
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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,12 +18,9 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ SDL glib ];
buildInputs = lib.optional withExamples SDL ++ [ glib ];
configureFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"ac_cv_func_malloc_0_nonnull=yes"
"ac_cv_func_realloc_0_nonnull=yes"
];
configureFlags = lib.optional (!withExamples) "--disable-examples";
meta = {
description = "An abstraction library for audio visualisations";