about summary refs log tree commit diff
path: root/pkgs/games/micropolis/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/games/micropolis/default.nix')
-rw-r--r--pkgs/games/micropolis/default.nix45
1 files changed, 23 insertions, 22 deletions
diff --git a/pkgs/games/micropolis/default.nix b/pkgs/games/micropolis/default.nix
index 4adbe69f697f0..0dc156ca3b7a6 100644
--- a/pkgs/games/micropolis/default.nix
+++ b/pkgs/games/micropolis/default.nix
@@ -1,4 +1,5 @@
-args: with args;
+{ stdenv, fetchurl, libX11, libXpm, libXext, xextproto, byacc }:
+
 stdenv.mkDerivation {
   name = "micropolis";
 
@@ -7,24 +8,25 @@ stdenv.mkDerivation {
     sha256 = "1b3c72dc3680a34b5fc5a740a6fb5cfc0b8775514da8ab7bb3b2965b20d4f8bc";
   };
 
-  patches = [
-    (fetchurl {
-      url = http://rmdir.de/~michael/micropolis_git.patch;
-      sha256 = "13419a4394242cd11d5cabd8b1b50787282ea16b55fdcfbeadf8505af46b0592";
-    })
-  ];
+  patches =
+    [ (fetchurl {
+        url = http://rmdir.de/~michael/micropolis_git.patch;
+        sha256 = "13419a4394242cd11d5cabd8b1b50787282ea16b55fdcfbeadf8505af46b0592";
+      })
+    ];
 
   buildInputs = [ libX11 libXpm libXext xextproto byacc ];
 
-  preConfigure = [
-    ''cd src
+  preConfigure =
+    ''
+      cd src
       sed -i "s@^CFLAGS.*\$@&\nCFLAGS += -I${libXpm}/include/X11@" tk/makefile
       sed -i "s@^INCLUDES.*\$@&\n\t-I$PWD/tcl \\\\@" sim/makefile
-    ''
-  ];
+    '';
 
-  postInstall = [ 
-    ''mkdir -p $out/bin
+  postInstall =
+    ''
+      mkdir -p $out/bin
       mkdir -p $out/usr/share/games/micropolis
       cd ..
       for d in activity cities images manual res; do
@@ -32,17 +34,16 @@ stdenv.mkDerivation {
       done
       cp Micropolis $out/usr/share/games/micropolis
       cat > $out/bin/micropolis << EOF 
-#!/bin/bash
-cd $out/usr/share/games/micropolis
-./Micropolis
-EOF
+      #!/bin/bash
+      cd $out/usr/share/games/micropolis
+      ./Micropolis
+      EOF
       chmod 755 $out/bin/micropolis
-    ''
-  ];
+    '';
 
   meta = { 
-      description = "GPL'ed version of S*m C*ty";
-      homepage = http://www.donhopkins.com/home/micropolis/;
-      license = "GPL";
+    description = "GPL'ed version of S*m C*ty";
+    homepage = http://www.donhopkins.com/home/micropolis/;
+    license = "GPL";
   };
 }