diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2019-09-22 22:57:49 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-22 22:57:49 -0400 |
commit | 783f92573cadff25047ee5000eb1bc2be62d92d4 (patch) | |
tree | 27367a2a455a78db672878b046de545aaa26f623 | |
parent | 423eb169130ca390fee2f88ee0effe3b01a5caa2 (diff) | |
parent | 23399ff0127093081f51100068b1e412617a48e1 (diff) |
Merge pull request #69270 from matthewbauer/fix-libdrm-musl
libdrm: Add patch to fix musl build. Fixes #66441
-rw-r--r-- | pkgs/development/libraries/libdrm/default.nix | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/pkgs/development/libraries/libdrm/default.nix b/pkgs/development/libraries/libdrm/default.nix index 11fb21fe52e..d5cbbccba01 100644 --- a/pkgs/development/libraries/libdrm/default.nix +++ b/pkgs/development/libraries/libdrm/default.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchurl, pkgconfig, meson, ninja, libpthreadstubs, libpciaccess -, withValgrind ? valgrind-light.meta.available, valgrind-light +, withValgrind ? valgrind-light.meta.available, valgrind-light, fetchpatch }: stdenv.mkDerivation rec { @@ -17,7 +17,15 @@ stdenv.mkDerivation rec { buildInputs = [ libpthreadstubs libpciaccess ] ++ lib.optional withValgrind valgrind-light; - patches = [ ./cross-build-nm-path.patch ]; + patches = [ ./cross-build-nm-path.patch ] ++ + lib.optionals stdenv.hostPlatform.isMusl [ + # Fix tests not building on musl because they use the glibc-specific + # (non-POSIX) `ioctl()` type signature. See #66441. + (fetchpatch { + url = "https://raw.githubusercontent.com/openembedded/openembedded-core/30a2af80f5f8c8ddf0f619e4f50451b02baa22dd/meta/recipes-graphics/drm/libdrm/musl-ioctl.patch"; + sha256 = "0rdmh4k5kb80hhk1sdhlil30yf0s8d8w0fnq0hzyvw3ir1mki3by"; + }) + ]; postPatch = '' for a in */*-symbol-check ; do |