about summary refs log tree commit diff
path: root/pkgs/development/guile-modules/guile-sdl/default.nix
blob: 75ca3d8e4aa4db0ccd2a3bbf9901176ca4391a57 (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{ lib
, stdenv
, fetchurl
, guile
, lzip
, pkg-config
, SDL
, SDL_image
, SDL_mixer
, SDL_ttf
, buildEnv
}:

stdenv.mkDerivation rec {
  pname = "guile-sdl";
  version = "0.6.1";

  src = fetchurl {
    url = "mirror://gnu/${pname}/${pname}-${version}.tar.lz";
    hash = "sha256-/9sTTvntkRXck3FoRalROjqUQC8hkePtLTnHNZotKOE=";
  };

  strictDeps = true;

  nativeBuildInputs = [
    guile
    lzip
    pkg-config
    SDL
  ];

  buildInputs = [
    guile
    (lib.getDev SDL)
    SDL_image
    SDL_mixer
    SDL_ttf
  ];

  makeFlags =
    let
      sdl-env = buildEnv {
        name = "sdl-env";
        paths = buildInputs;
      };
    in
    [
      "SDLMINUSI=-I${sdl-env}/include/SDL"
    ];

  meta = with lib; {
    homepage = "https://www.gnu.org/software/guile-sdl/";
    description = "Guile bindings for SDL";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ vyp ];
    platforms = guile.meta.platforms;
    # configure: error: *** SDL version  not found!
    broken = stdenv.isDarwin;
  };
}