summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/an/animatch/package.nix
blob: 332be7b42c7a6150cbd2c0a2c72294befa0e92bb (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
{
  lib,
  allegro5,
  cmake,
  fetchFromGitLab,
  libGL,
  stdenv,
  libx11,
}:
stdenv.mkDerivation (finalAttrs: {
  pname = "animatch";
  version = "1.0.3";
  src = fetchFromGitLab {
    owner = "HolyPangolin";
    repo = "animatch";
    fetchSubmodules = true;
    tag = "v${finalAttrs.version}";
    hash = "sha256-zBV45WMAXtCpPPbDpr04K/a9UtZ4KLP9nUauBlbhrFo=";
  };

  postPatch = ''
    substituteInPlace libsuperderpy/src/3rdparty/cimgui/CMakeLists.txt --replace-fail \
      'cmake_minimum_required(VERSION 3.1)' \
      'cmake_minimum_required(VERSION 4.0)'
  '';

  nativeBuildInputs = [
    cmake
  ];

  buildInputs = [
    allegro5
    libGL
    libx11
  ];

  cmakeFlags = [
    "-DLIBSUPERDERPY_STATIC=ON" # recommended by upstream for coexistence with other superderpy games
  ];

  strictDeps = true;

  meta = {
    homepage = "https://gitlab.com/HolyPangolin/animatch/";
    description = "Cute match three game for the Librem 5 smartphone";
    mainProgram = "animatch";
    license = lib.licenses.gpl3Plus;
    maintainers = with lib.maintainers; [ colinsane ];
  };
})