about summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
authorMarek Mahut <marek.mahut@gmail.com>2019-08-12 19:04:00 +0200
committerGitHub <noreply@github.com>2019-08-12 19:04:00 +0200
commit79b28f5a537bef4ba7f173320f66838e59f4929e (patch)
treef8c805ef78c756a0f273fe52e33c6452aa508369 /pkgs/games
parent096031a513194a99fdee9d45da4f43ea16482963 (diff)
parent9f40ff687655593c9a7310c234a630520e9c277b (diff)
Merge pull request #63116 from peterhoeg/f/opendune
opendune: support ALSA and pulseaudio (move to SDL2)
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/opendune/default.nix24
1 files changed, 19 insertions, 5 deletions
diff --git a/pkgs/games/opendune/default.nix b/pkgs/games/opendune/default.nix
index 0f045faf371eb..d2f1e27b10ecc 100644
--- a/pkgs/games/opendune/default.nix
+++ b/pkgs/games/opendune/default.nix
@@ -1,4 +1,5 @@
-{ stdenv, fetchFromGitHub, SDL, SDL_image, SDL_mixer }:
+{ stdenv, lib, fetchFromGitHub, pkgconfig
+, alsaLib, libpulseaudio, SDL2, SDL2_image, SDL2_mixer }:
 
 # - set the opendune configuration at ~/.config/opendune/opendune.ini:
 #     [opendune]
@@ -16,17 +17,30 @@ stdenv.mkDerivation rec {
     sha256 = "15rvrnszdy3db8s0dmb696l4isb3x2cpj7wcl4j09pdi59pc8p37";
   };
 
-  buildInputs = [ SDL SDL_image SDL_mixer ];
+  configureFlags = [
+    "--with-alsa=${lib.getLib alsaLib}/lib/libasound.so"
+    "--with-pulse=${lib.getLib libpulseaudio}/lib/libpulse.so"
+  ];
+
+  nativeBuildInputs = [ pkgconfig ];
+
+  buildInputs = [ alsaLib libpulseaudio SDL2 SDL2_image SDL2_mixer ];
+
+  enableParallelBuilding = true;
 
   installPhase = ''
-    install -m 555 -D bin/opendune $out/bin/opendune
+    runHook preInstall
+
+    install -Dm555 -t $out/bin bin/opendune
+    install -Dm444 -t $out/share/doc/opendune enhancement.txt README.txt
+
+    runHook postInstall
   '';
 
   meta = with stdenv.lib; {
     description = "Dune, Reinvented";
     homepage = https://github.com/OpenDUNE/OpenDUNE;
     license = licenses.gpl2;
-    maintainers = [ maintainers.nand0p ];
-    platforms = platforms.linux;
+    maintainers = with maintainers; [ nand0p ];
   };
 }