nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv, lib, fetchFromGitHub, pkg-config
2, alsa-lib, libpulseaudio, SDL2, SDL2_image, SDL2_mixer }:
3
4# - set the opendune configuration at ~/.config/opendune/opendune.ini:
5# [opendune]
6# datadir=/path/to/opendune-data
7# - download dune2 into [datadir] http://www.bestoldgames.net/eng/old-games/dune-2.php
8
9stdenv.mkDerivation rec {
10 pname = "opendune";
11 version = "0.9";
12
13 src = fetchFromGitHub {
14 owner = "OpenDUNE";
15 repo = "OpenDUNE";
16 rev = version;
17 sha256 = "15rvrnszdy3db8s0dmb696l4isb3x2cpj7wcl4j09pdi59pc8p37";
18 };
19
20 configureFlags = [
21 "--with-alsa=${lib.getLib alsa-lib}/lib/libasound.so"
22 "--with-pulse=${lib.getLib libpulseaudio}/lib/libpulse.so"
23 ];
24
25 nativeBuildInputs = [ pkg-config ];
26
27 buildInputs = [ alsa-lib libpulseaudio SDL2 SDL2_image SDL2_mixer ];
28
29 enableParallelBuilding = true;
30
31 installPhase = ''
32 runHook preInstall
33
34 install -Dm555 -t $out/bin bin/opendune
35 install -Dm444 -t $out/share/doc/opendune enhancement.txt README.txt
36
37 runHook postInstall
38 '';
39
40 meta = with lib; {
41 description = "Dune, Reinvented";
42 homepage = "https://github.com/OpenDUNE/OpenDUNE";
43 license = licenses.gpl2;
44 maintainers = with maintainers; [ ];
45 };
46}