1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 fetchpatch,
6 autoreconfHook,
7 libGL,
8 libpng,
9 pkg-config,
10 xorg,
11 freetype,
12 fontconfig,
13 alsa-lib,
14 libXrender,
15}:
16
17stdenv.mkDerivation rec {
18 pname = "clanlib";
19 version = "4.1.0";
20
21 src = fetchFromGitHub {
22 repo = "ClanLib";
23 owner = "sphair";
24 rev = "v${version}";
25 sha256 = "sha256-SVsLWcTP+PCIGDWLkadMpJPj4coLK9dJrW4sc2+HotE=";
26 };
27
28 patches = [
29 (fetchpatch {
30 name = "clanlib-add-support-for-riscv.patch";
31 url = "https://github.com/sphair/ClanLib/commit/f5f694205054b66dc800135c9b01673f69a7a671.patch";
32 hash = "sha256-/1XLFaTZDQAlT2mG9P6SJzXtTg7IWYGQ18Sx0e9zh0s=";
33 })
34 ];
35
36 nativeBuildInputs = [
37 pkg-config
38 autoreconfHook
39 ];
40
41 buildInputs = [
42 libGL
43 libpng
44 xorg.xorgproto
45 freetype
46 fontconfig
47 alsa-lib
48 libXrender
49 ];
50
51 meta = {
52 homepage = "https://github.com/sphair/ClanLib";
53 description = "Cross platform toolkit library with a primary focus on game creation";
54 license = lib.licenses.mit;
55 maintainers = with lib.maintainers; [ nixinator ];
56 platforms = with lib.platforms; lib.intersectLists linux (x86 ++ arm ++ aarch64 ++ riscv);
57 };
58}