summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
authorJoachim Fasting <joachifm@fastmail.fm>2015-07-14 11:25:46 +0200
committerJoachim Fasting <joachifm@fastmail.fm>2015-11-24 14:45:15 +0100
commit33d825aaea825f7fb818a7ac097e3a9c5168ba61 (patch)
tree3d45aeb3c5ca26e005c222283a5a60df20a25542 /pkgs/games
parentf3e821c6e590ebae8a3b6063685ef49186f12b1e (diff)
downloadnixpkgs-33d825aaea825f7fb818a7ac097e3a9c5168ba61.tar
nixpkgs-33d825aaea825f7fb818a7ac097e3a9c5168ba61.tar.gz
nixpkgs-33d825aaea825f7fb818a7ac097e3a9c5168ba61.tar.bz2
nixpkgs-33d825aaea825f7fb818a7ac097e3a9c5168ba61.tar.lz
nixpkgs-33d825aaea825f7fb818a7ac097e3a9c5168ba61.tar.xz
nixpkgs-33d825aaea825f7fb818a7ac097e3a9c5168ba61.tar.zst
nixpkgs-33d825aaea825f7fb818a7ac097e3a9c5168ba61.zip
glestae: reimplement using mkDerivation
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/glestae/default.nix63
1 files changed, 21 insertions, 42 deletions
diff --git a/pkgs/games/glestae/default.nix b/pkgs/games/glestae/default.nix
index 2fa9cd35f76..2a2809cc805 100644
--- a/pkgs/games/glestae/default.nix
+++ b/pkgs/games/glestae/default.nix
@@ -1,55 +1,34 @@
-x@{builderDefsPackage
-  , mesa, cmake, lua5, SDL, openal, libvorbis, libogg, zlib, physfs
-  , freetype, libpng, libjpeg, glew, wxGTK28, libxml2, libpthreadstubs
-  , ...}:
-builderDefsPackage
-(a :  
-let 
-  helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 
-    [];
+{ stdenv, fetchurl
+, mesa, cmake, lua5, SDL, openal, libvorbis, libogg, zlib, physfs
+, freetype, libpng, libjpeg, glew, wxGTK28, libxml2, libpthreadstubs
+}:
 
-  buildInputs = map (n: builtins.getAttr n x)
-    (builtins.attrNames (builtins.removeAttrs x helperArgNames));
-  sourceInfo = rec {
-    baseName="glestae";
-    project="${baseName}";
-    version="0.3.2";
-    name="${baseName}-${version}";
-    nameSuffix="-src";
-    extension="tar.bz2";
-    url="mirror://sourceforge/project/${project}/${version}/${baseName}${nameSuffix}-${version}.${extension}";
-    hash="1k02vf88mms0zbprvy1b1qdwjzmdag5rd1p43f0gpk1sms6isn94";
-  };
-in
-rec {
-  src = a.fetchurl {
-    url = sourceInfo.url;
-    sha256 = sourceInfo.hash;
-  };
+stdenv.mkDerivation rec {
+  name = "glestae-${version}";
+  version = "0.3.2";
 
-  inherit (sourceInfo) name version;
-  inherit buildInputs;
+  src = fetchurl {
+    url = "mirror://sourceforge/project/glestae/${version}/glestae-src-${version}.tar.bz2";
+    sha256 = "1k02vf88mms0zbprvy1b1qdwjzmdag5rd1p43f0gpk1sms6isn94";
+  };
 
-  /* doConfigure should be removed if not needed */
-  phaseNames = ["doCmake" "doMakeInstall"];
+  buildInputs =
+    [ mesa cmake lua5 SDL openal libvorbis libogg zlib physfs
+      freetype libpng libjpeg glew wxGTK28 libxml2 libpthreadstubs
+    ];
 
   cmakeFlags = [
     "-DLUA_LIBRARIES=-llua"
     "-DGAE_DATA_DIR=$out/share/glestae"
   ];
-      
+
   meta = {
     description = "A 3D RTS - fork of inactive Glest project";
-    maintainers = [ a.lib.maintainers.raskin ];
-    platforms = a.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.raskin ];
+    platforms = stdenv.lib.platforms.linux;
     # Note that some data seems to be under separate redistributable licenses
-    license = a.lib.licenses.gpl2Plus;
+    license = stdenv.lib.licenses.gpl2Plus;
     broken = true;
+    downloadPage = "http://sourceforge.net/projects/glestae/files/0.3.2/";
   };
-  passthru = {
-    updateInfo = {
-      downloadPage = "http://sourceforge.net/projects/glestae/files/0.3.2/";
-    };
-  };
-}) x
-
+}