summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/ri/rigel-engine/package.nix
blob: 090affbf84255f185fe4fe6717a2036317c8e966 (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
{
  lib,
  stdenv,
  fetchFromGitHub,
  cmake,
  libx11,
  SDL2,
  SDL2_mixer,
  buildOpenGLES ? false,
}:

stdenv.mkDerivation {
  pname = "rigel-engine";
  version = "0-unstable-2024-05-26";

  src = fetchFromGitHub {
    owner = "lethal-guitar";
    repo = "RigelEngine";
    rev = "f05996f9b3ad3b3ea5bb818e49e7977636746343";
    hash = "sha256-iZ+eYZxnVqHo4vLeZdoV7TO3fWivCfbAf4F57/fU7aY=";
    fetchSubmodules = true;
  };

  nativeBuildInputs = [
    cmake
  ];

  buildInputs = [
    libx11
    SDL2
    SDL2_mixer
  ];

  cmakeFlags = [
    "-Wno-dev"
    (lib.cmakeFeature "CMAKE_POLICY_VERSION_MINIMUM" "3.10")
  ]
  ++ lib.optional buildOpenGLES "-DUSE_GL_ES=ON";

  meta = {
    description = "Modern re-implementation of the classic DOS game Duke Nukem II";
    homepage = "https://github.com/lethal-guitar/RigelEngine";
    license = lib.licenses.gpl2Only;
    maintainers = with lib.maintainers; [ keenanweaver ];
    mainProgram = "RigelEngine";
    platforms = lib.platforms.all;
  };
}