2021-01-17 05:49:22 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, pkg-config
|
2021-06-10 02:57:09 +00:00
|
|
|
, alsa-lib, libpulseaudio, SDL2, SDL2_image, SDL2_mixer }:
|
2018-06-05 18:39:24 +00:00
|
|
|
|
|
|
|
# - 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 {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "opendune";
|
2018-06-05 18:39:24 +00:00
|
|
|
version = "0.9";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "OpenDUNE";
|
|
|
|
repo = "OpenDUNE";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "15rvrnszdy3db8s0dmb696l4isb3x2cpj7wcl4j09pdi59pc8p37";
|
|
|
|
};
|
|
|
|
|
2019-03-26 13:20:34 +00:00
|
|
|
configureFlags = [
|
2021-06-10 02:57:09 +00:00
|
|
|
"--with-alsa=${lib.getLib alsa-lib}/lib/libasound.so"
|
2019-03-26 13:20:34 +00:00
|
|
|
"--with-pulse=${lib.getLib libpulseaudio}/lib/libpulse.so"
|
|
|
|
];
|
|
|
|
|
2021-01-17 05:49:22 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2019-03-26 13:20:34 +00:00
|
|
|
|
2021-06-10 02:57:09 +00:00
|
|
|
buildInputs = [ alsa-lib libpulseaudio SDL2 SDL2_image SDL2_mixer ];
|
2019-03-26 13:20:34 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2018-06-05 18:39:24 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2019-03-26 13:20:34 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -Dm555 -t $out/bin bin/opendune
|
|
|
|
install -Dm444 -t $out/share/doc/opendune enhancement.txt README.txt
|
|
|
|
|
|
|
|
runHook postInstall
|
2018-06-05 18:39:24 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-06-05 18:39:24 +00:00
|
|
|
description = "Dune, Reinvented";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "opendune";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/OpenDUNE/OpenDUNE";
|
2018-06-05 18:39:24 +00:00
|
|
|
license = licenses.gpl2;
|
2021-05-14 14:00:41 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2018-06-05 18:39:24 +00:00
|
|
|
};
|
|
|
|
}
|