nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 allegro5,
4 cmake,
5 fetchFromGitLab,
6 libGL,
7 stdenv,
8 libx11,
9}:
10stdenv.mkDerivation (finalAttrs: {
11 pname = "animatch";
12 version = "1.0.3";
13 src = fetchFromGitLab {
14 owner = "HolyPangolin";
15 repo = "animatch";
16 fetchSubmodules = true;
17 tag = "v${finalAttrs.version}";
18 hash = "sha256-zBV45WMAXtCpPPbDpr04K/a9UtZ4KLP9nUauBlbhrFo=";
19 };
20
21 postPatch = ''
22 substituteInPlace libsuperderpy/src/3rdparty/cimgui/CMakeLists.txt --replace-fail \
23 'cmake_minimum_required(VERSION 3.1)' \
24 'cmake_minimum_required(VERSION 4.0)'
25 '';
26
27 nativeBuildInputs = [
28 cmake
29 ];
30
31 buildInputs = [
32 allegro5
33 libGL
34 libx11
35 ];
36
37 cmakeFlags = [
38 "-DLIBSUPERDERPY_STATIC=ON" # recommended by upstream for coexistence with other superderpy games
39 ];
40
41 strictDeps = true;
42
43 meta = {
44 homepage = "https://gitlab.com/HolyPangolin/animatch/";
45 description = "Cute match three game for the Librem 5 smartphone";
46 mainProgram = "animatch";
47 license = with lib.licenses; [ gpl3Plus ];
48 maintainers = with lib.maintainers; [ colinsane ];
49 };
50})