summaryrefslogtreecommitdiffstats
path: root/pkgs/development/libraries/allegro/default.nix
blob: 8453364a447ffc23a6560348980b3e1a550df687 (plain)
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
{
  lib,
  stdenv,
  fetchurl,
  texinfo,
  libxext,
  xorgproto,
  libx11,
  libxpm,
  libxt,
  libxcursor,
  alsa-lib,
  cmake,
  pkg-config,
  zlib,
  libpng,
  libvorbis,
  libxxf86dga,
  libxxf86misc,
  libxxf86vm,
  openal,
  libGLU,
  libGL,
}:

stdenv.mkDerivation rec {
  pname = "allegro";
  version = "4.4.3.1";

  src = fetchurl {
    url = "https://github.com/liballeg/allegro5/releases/download/${version}/allegro-${version}.tar.gz";
    sha256 = "1m6lz35nk07dli26kkwz3wa50jsrxs1kb6w1nj14a911l34xn6gc";
  };

  patches = [
    ./nix-unstable-sandbox-fix.patch
    ./encoding.patch
  ];

  nativeBuildInputs = [
    cmake
    pkg-config
  ];
  buildInputs = [
    texinfo
    libxext
    xorgproto
    libx11
    libxpm
    libxt
    libxcursor
    alsa-lib
    zlib
    libpng
    libvorbis
    libxxf86dga
    libxxf86misc
    libxxf86vm
    openal
    libGLU
    libGL
  ];

  hardeningDisable = [ "format" ];

  cmakeFlags = [
    "-DCMAKE_SKIP_RPATH=ON"
    "-DCMAKE_POLICY_VERSION_MINIMUM=3.5"
  ];

  meta = {
    description = "Game programming library";
    homepage = "https://liballeg.org/";
    license = lib.licenses.giftware;
    maintainers = [ lib.maintainers.raskin ];
    platforms = lib.platforms.linux;
  };
}