summary refs log tree commit diff
path: root/pkgs/games/uqm
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/games/uqm')
-rw-r--r--pkgs/games/uqm/3dovideo.nix7
-rw-r--r--pkgs/games/uqm/default.nix43
2 files changed, 24 insertions, 26 deletions
diff --git a/pkgs/games/uqm/3dovideo.nix b/pkgs/games/uqm/3dovideo.nix
index ca5a1197a327..0eb6e02eac54 100644
--- a/pkgs/games/uqm/3dovideo.nix
+++ b/pkgs/games/uqm/3dovideo.nix
@@ -41,9 +41,10 @@ in stdenv.mkDerivation {
     sha256 = "044h0cl69r0kc43vk4n0akk0prwzb7inq324h5yfqb38sd4zkds1";
     message = ''
       In order to get the intro and ending sequences from the 3DO version, you
-      need to have the original 3DO Star Control II CD. Create an image from the
-      CD and use uqm3donix* to extract a tarball with the videos from it. The
-      reason for this is because the 3DO uses its own proprietary disk format.
+      need to have the original 3DO Star Control II CD. Create an image from
+      the CD and use uqm3donix* to extract a tarball with the videos from it.
+      The reason for this is because the 3DO uses its own proprietary disk
+      format.
 
       Save the file as videos.tar and use "nix-prefetch-url file://${name}" to
       add it to the Nix store.
diff --git a/pkgs/games/uqm/default.nix b/pkgs/games/uqm/default.nix
index c6f4b57a0334..22a0418d4cad 100644
--- a/pkgs/games/uqm/default.nix
+++ b/pkgs/games/uqm/default.nix
@@ -1,6 +1,5 @@
-{ stdenv, fetchurl
-, pkgconfig, mesa
-, SDL, SDL_image, libpng, zlib, libvorbis, libogg, libmikmod, unzip
+{ stdenv, lib, fetchurl, pkgconfig, mesa
+, SDL, SDL_image, libpng, zlib, libvorbis, libogg, libmikmod
 
 , use3DOVideos ? false, requireFile ? null, writeText ? null
 , haskellPackages ? null
@@ -11,14 +10,12 @@
 assert use3DOVideos -> requireFile != null && writeText != null
                     && haskellPackages != null;
 
-with stdenv.lib;
-
 let
   videos = import ./3dovideo.nix {
     inherit stdenv requireFile writeText fetchurl haskellPackages;
   };
 
-  remixPacks = imap1 (num: sha256: fetchurl rec {
+  remixPacks = lib.imap1 (num: sha256: fetchurl rec {
     name = "uqm-remix-disc${toString num}.uqm";
     url = "mirror://sourceforge/sc2/${name}";
     inherit sha256;
@@ -53,14 +50,13 @@ in stdenv.mkDerivation rec {
     sha256 = "10nbvcrr0lc0mxivxfkcbxnibwk3vwmamabrlvwdsjxd9pk8aw65";
   };
 
-
- /* uses pthread_cancel(), which requires libgcc_s.so.1 to be
-    loadable at run-time. Adding the flag below ensures that the
-    library can be found. Obviously, though, this is a hack. */
-  NIX_LDFLAGS="-lgcc_s";
+  /* uses pthread_cancel(), which requires libgcc_s.so.1 to be
+     loadable at run-time. Adding the flag below ensures that the
+     library can be found. Obviously, though, this is a hack. */
+  NIX_LDFLAGS = "-lgcc_s";
 
   nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [SDL SDL_image libpng libvorbis libogg libmikmod unzip mesa];
+  buildInputs = [ SDL SDL_image libpng libvorbis libogg libmikmod mesa ];
 
   postUnpack = ''
     mkdir -p uqm-${version}/content/packages
@@ -68,15 +64,14 @@ in stdenv.mkDerivation rec {
     ln -s "$content" "uqm-${version}/content/packages/uqm-0.7.0-content.uqm"
     ln -s "$music" "uqm-${version}/content/addons/uqm-0.7.0-3domusic.uqm"
     ln -s "$voice" "uqm-${version}/content/addons/uqm-0.7.0-voice.uqm"
-  '' + optionalString useRemixPacks (concatMapStrings (disc: ''
+  '' + lib.optionalString useRemixPacks (lib.concatMapStrings (disc: ''
     ln -s "${disc}" "uqm-$version/content/addons/${disc.name}"
-  '') remixPacks) + optionalString use3DOVideos ''
+  '') remixPacks) + lib.optionalString use3DOVideos ''
     ln -s "${videos}" "uqm-${version}/content/addons/3dovideo"
   '';
 
-  /* uqm has a 'unique' build system with a root script incidentally called
- * 'build.sh'. */
-
+  # uqm has a 'unique' build system with a root script incidentally called
+  # 'build.sh'.
   configurePhase = ''
     echo "INPUT_install_prefix_VALUE='$out'" >> config.state
     echo "INPUT_install_bindir_VALUE='$out/bin'" >> config.state
@@ -97,14 +92,16 @@ in stdenv.mkDerivation rec {
   meta = {
     description = "Remake of Star Control II";
     longDescription = ''
-    The goals for the The Ur-Quan Masters project are:
-      - to bring Star Control II to modern platforms, thereby making a lot of people happy
-      - to make game translations easy, thereby making even more people happy
-      - to adapt the code so that people can more easily make their own spin-offs, thereby making zillions more people happy!
+      The goals for the The Ur-Quan Masters project are:
+        - to bring Star Control II to modern platforms, thereby making a lot of
+          people happy
+        - to make game translations easy, thereby making even more people happy
+        - to adapt the code so that people can more easily make their own
+          spin-offs, thereby making zillions more people happy!
     '';
     homepage = http://sc2.sourceforge.net/;
     license = stdenv.lib.licenses.gpl2;
-    maintainers = with maintainers; [ jcumming aszlig ];
-    platforms = with platforms; linux;
+    maintainers = with lib.maintainers; [ jcumming aszlig ];
+    platforms = with lib.platforms; linux;
   };
 }