summary refs log tree commit diff
path: root/pkgs/development/libraries/sfml/default.nix
blob: 03a801a324059012588db66fdb5b23ac57e6c705 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{ stdenv, fetchurl, cmake, libX11, freetype, libjpeg, openal, flac, libvorbis
, glew, libXrandr, libXrender, udev, xcbutilimage
, IOKit, Foundation, AppKit, OpenAL
}:

let
  version = "2.5.0";
in

stdenv.mkDerivation rec {
  name = "sfml-${version}";
  src = fetchurl {
    url = "https://github.com/SFML/SFML/archive/${version}.tar.gz";
    sha256 = "1x3yvhdrln5b6h4g5r4mds76gq8zsxw6icxqpwqkmxsqcq5yviab";
  };
  buildInputs = [ cmake libX11 freetype libjpeg openal flac libvorbis glew
                  libXrandr libXrender xcbutilimage
                ] ++ stdenv.lib.optional stdenv.isLinux udev
                  ++ stdenv.lib.optionals stdenv.isDarwin [ IOKit Foundation AppKit OpenAL ];
  cmakeFlags = [ "-DSFML_INSTALL_PKGCONFIG_FILES=yes"
                 "-DSFML_MISC_INSTALL_PREFIX=share/SFML"
                 "-DSFML_BUILD_FRAMEWORKS=no"
                 "-DSFML_USE_SYSTEM_DEPS=yes" ];
  meta = with stdenv.lib; {
    homepage = http://www.sfml-dev.org/;
    description = "Simple and fast multimedia library";
    longDescription = ''
      SFML is a simple, fast, cross-platform and object-oriented multimedia API.
      It provides access to windowing, graphics, audio and network.
      It is written in C++, and has bindings for various languages such as C, .Net, Ruby, Python.
    '';
    license = licenses.zlib;
    maintainers = [ maintainers.astsmtl ];
    platforms = platforms.unix;
  };
}