Skip to content

Commit

Permalink
mpv: Fix X11 support by adding libXrandr
Browse files Browse the repository at this point in the history
This is a follow-up to 6b404b9, which
fixed the build after SDL no longer leaks through X libraries.

However the commit didn't actually pass all the required dependencies to
mpv, because the configure phase of mpv still disabled X support:

  Checking for X11
  err: Package xrandr was not found in the pkg-config search path.
  Perhaps you should add the directory containing `xrandr.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'xrandr' found

So by adding libXrandr, we finally have support for X again.

Trivia: While I'm usually very pesky about line lengths this is one of
the very rare occasions where I didn't break the lines after 79
characters because it would have messed up the overall style of the
file.

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @AndersonTorres, @Fuuzetsu, @fpletz, @orivej
  • Loading branch information
aszlig committed Jul 4, 2018
1 parent 4dfea24 commit 7a19228
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkgs/applications/video/mpv/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
libGLU_combined ? null,
libX11 ? null,
libXext ? null,
libXxf86vm ? null
libXxf86vm ? null,
libXrandr ? null

, waylandSupport ? false
, wayland ? null
Expand Down Expand Up @@ -47,7 +48,7 @@ with stdenv.lib;
let
available = x: x != null;
in
assert x11Support -> all available [libGLU_combined libX11 libXext libXxf86vm];
assert x11Support -> all available [libGLU_combined libX11 libXext libXxf86vm libXrandr];
assert waylandSupport -> all available [wayland wayland-protocols libxkbcommon];
assert rubberbandSupport -> available rubberband;
assert xineramaSupport -> x11Support && available libXinerama;
Expand Down Expand Up @@ -151,7 +152,7 @@ in stdenv.mkDerivation rec {
++ optional vapoursynthSupport vapoursynth
++ optional archiveSupport libarchive
++ optionals dvdnavSupport [ libdvdnav libdvdnav.libdvdread ]
++ optionals x11Support [ libX11 libXext libGLU_combined libXxf86vm ]
++ optionals x11Support [ libX11 libXext libGLU_combined libXxf86vm libXrandr ]
++ optionals waylandSupport [ wayland wayland-protocols libxkbcommon ]
++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
libiconv Cocoa CoreAudio
Expand Down

1 comment on commit 7a19228

@AndersonTorres
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine. I will test it today or tomorrow.

About the trivia, I am a bit strict and even annoying abou the 80-line limit. But I don't enforce it outside my "creations" :).

Please sign in to comment.