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.nix10
-rw-r--r--pkgs/games/uqm/default.nix12
2 files changed, 11 insertions, 11 deletions
diff --git a/pkgs/games/uqm/3dovideo.nix b/pkgs/games/uqm/3dovideo.nix
index 8d1bf2b6887..4ebbc9c4992 100644
--- a/pkgs/games/uqm/3dovideo.nix
+++ b/pkgs/games/uqm/3dovideo.nix
@@ -1,10 +1,8 @@
-{ stdenv, requireFile, writeText, fetchurl, haskellPackages }:
-
-with stdenv.lib;
+{ stdenv, lib, requireFile, writeText, fetchurl, haskellPackages }:
 
 let
   makeSpin = num: let
-    padded = (optionalString (lessThan num 10) "0") + toString num;
+    padded = (lib.optionalString (lib.lessThan num 10) "0") + toString num;
   in "slides.spins.${padded} = 3DOVID:" +
      "addons/3dovideo/spins/ship${padded}.duk:" +
      "addons/3dovideo/spins/spin.aif:" +
@@ -13,7 +11,7 @@ let
   videoRMP = writeText "3dovideo.rmp" (''
     slides.ending = 3DOVID:addons/3dovideo/ending/victory.duk
     slides.intro = 3DOVID:addons/3dovideo/intro/intro.duk
-  '' + concatMapStrings makeSpin (range 0 24));
+  '' + lib.concatMapStrings makeSpin (lib.range 0 24));
 
   helper = with haskellPackages; mkDerivation {
     pname = "uqm3donix";
@@ -30,7 +28,7 @@ let
     buildDepends = [ base binary bytestring filepath tar ];
 
     description = "Extract video files from a Star Control II 3DO image";
-    license = stdenv.lib.licenses.bsd3;
+    license = lib.licenses.bsd3;
   };
 
 in stdenv.mkDerivation {
diff --git a/pkgs/games/uqm/default.nix b/pkgs/games/uqm/default.nix
index 523ae354b76..a06c1b3b665 100644
--- a/pkgs/games/uqm/default.nix
+++ b/pkgs/games/uqm/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchurl, pkgconfig, libGLU, libGL
+{ stdenv, lib, fetchurl, pkg-config, libGLU, libGL
 , SDL, SDL_image, libpng, libvorbis, libogg, libmikmod
 
 , use3DOVideos ? false, requireFile ? null, writeText ? null
@@ -12,7 +12,7 @@ assert use3DOVideos -> requireFile != null && writeText != null
 
 let
   videos = import ./3dovideo.nix {
-    inherit stdenv requireFile writeText fetchurl haskellPackages;
+    inherit stdenv lib requireFile writeText fetchurl haskellPackages;
   };
 
   remixPacks = lib.imap1 (num: sha256: fetchurl rec {
@@ -50,7 +50,7 @@ in stdenv.mkDerivation rec {
     sha256 = "10nbvcrr0lc0mxivxfkcbxnibwk3vwmamabrlvwdsjxd9pk8aw65";
   };
 
-  nativeBuildInputs = [ pkgconfig ];
+  nativeBuildInputs = [ pkg-config ];
   buildInputs = [ SDL SDL_image libpng libvorbis libogg libmikmod libGLU libGL ];
 
   postUnpack = ''
@@ -65,9 +65,11 @@ in stdenv.mkDerivation rec {
     ln -s "${videos}" "uqm-${version}/content/addons/3dovideo"
   '';
 
-  # Using _STRINGS_H as include guard conflicts with glibc.
   postPatch = ''
+    # Using _STRINGS_H as include guard conflicts with glibc.
     sed -i -e '/^#/s/_STRINGS_H/_UQM_STRINGS_H/g' src/uqm/comm/*/strings.h
+    # See https://github.com/NixOS/nixpkgs/pull/93560
+    sed -i -e 's,/tmp/,$TMPDIR/,' build/unix/config_functions
   '';
 
   # uqm has a 'unique' build system with a root script incidentally called
@@ -100,7 +102,7 @@ in stdenv.mkDerivation rec {
           spin-offs, thereby making zillions more people happy!
     '';
     homepage = "http://sc2.sourceforge.net/";
-    license = stdenv.lib.licenses.gpl2;
+    license = lib.licenses.gpl2;
     maintainers = with lib.maintainers; [ jcumming aszlig ];
     platforms = with lib.platforms; linux;
   };