summary refs log tree commit diff
path: root/pkgs/games/opendune/default.nix
blob: 0f045faf371eb02c5bcacbf2cf9b9df9311b9a00 (plain) (blame)
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
{ stdenv, fetchFromGitHub, SDL, SDL_image, SDL_mixer }:

# - set the opendune configuration at ~/.config/opendune/opendune.ini:
#     [opendune]
#     datadir=/path/to/opendune-data
# - download dune2 into [datadir] http://www.bestoldgames.net/eng/old-games/dune-2.php

stdenv.mkDerivation rec {
  name = "opendune-${version}";
  version = "0.9";

  src = fetchFromGitHub {
    owner = "OpenDUNE";
    repo = "OpenDUNE";
    rev = version;
    sha256 = "15rvrnszdy3db8s0dmb696l4isb3x2cpj7wcl4j09pdi59pc8p37";
  };

  buildInputs = [ SDL SDL_image SDL_mixer ];

  installPhase = ''
    install -m 555 -D bin/opendune $out/bin/opendune
  '';

  meta = with stdenv.lib; {
    description = "Dune, Reinvented";
    homepage = https://github.com/OpenDUNE/OpenDUNE;
    license = licenses.gpl2;
    maintainers = [ maintainers.nand0p ];
    platforms = platforms.linux;
  };
}