Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDL: add libcaca video driver #317580

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions pkgs/development/libraries/SDL/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{ lib, stdenv, config, fetchurl, fetchpatch, pkg-config, audiofile, libcap, libiconv
{ lib, stdenv, config, fetchurl, fetchpatch, pkg-config, audiofile, libcap, libiconv, libcaca
, libGLSupported ? lib.meta.availableOn stdenv.hostPlatform libGL
, openglSupport ? libGLSupported, libGL, libGLU
, alsaSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid, alsa-lib
, x11Support ? !stdenv.isCygwin && !stdenv.hostPlatform.isAndroid
, cacaSupport ? x11Support || stdenv.isDarwin
, libXext, libICE, libXrandr
, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux && !stdenv.hostPlatform.isAndroid && lib.meta.availableOn stdenv.hostPlatform libpulseaudio, libpulseaudio
, OpenGL, GLUT, CoreAudio, CoreServices, AudioUnit, Kernel, Cocoa
Expand Down Expand Up @@ -41,7 +42,8 @@ stdenv.mkDerivation rec {

buildInputs = [ ]
++ lib.optional (!stdenv.hostPlatform.isMinGW && alsaSupport) audiofile
++ lib.optionals stdenv.isDarwin [ AudioUnit CoreAudio CoreServices Kernel OpenGL ];
++ lib.optionals stdenv.isDarwin [ AudioUnit CoreAudio CoreServices Kernel OpenGL ]
++ lib.optional cacaSupport libcaca;

configureFlags = [
"--disable-oss"
Expand All @@ -55,7 +57,8 @@ stdenv.mkDerivation rec {
# Please try revert the change that introduced this comment when updating SDL.
] ++ lib.optional stdenv.isDarwin "--disable-x11-shared"
++ lib.optional (!x11Support) "--without-x"
++ lib.optional alsaSupport "--with-alsa-prefix=${alsa-lib.out}/lib";
++ lib.optional alsaSupport "--with-alsa-prefix=${alsa-lib.out}/lib"
++ lib.optional cacaSupport "--enable-video-caca";

patches = [
./find-headers.patch
Expand Down