gl117: reimplement using mkDerivation

+14 -31
+14 -31
pkgs/games/gl-117/default.nix
··· 1 - x@{builderDefsPackage 2 - , mesa, SDL, freeglut, SDL_mixer, autoconf, automake, libtool 3 - , ...}: 4 - builderDefsPackage 5 - (a : 6 - let 7 - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 8 - []; 1 + { stdenv, fetchurl 2 + , mesa, SDL, freeglut, SDL_mixer, autoconf, automake, libtool 3 + }: 4 + 5 + stdenv.mkDerivation rec { 6 + name = "gl-117-${version}"; 7 + version = "1.3.2"; 9 8 10 - buildInputs = map (n: builtins.getAttr n x) 11 - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); 12 - sourceInfo = rec { 13 - version = "1.3.2"; 14 - name = "gl-117-1.3.2"; 15 - url = "mirror://sourceforge/project/gl-117/gl-117/GL-117%20Source/gl-117-1.3.2-src.tar.bz2"; 16 - hash = "1yvg1rp1yijv0b45cz085b29x5x0g5fkm654xdv5qwh2l6803gb4"; 17 - }; 18 - in 19 - rec { 20 - src = a.fetchurl { 21 - url = sourceInfo.url; 22 - sha256 = sourceInfo.hash; 9 + src = fetchurl { 10 + url = "mirror://sourceforge/project/gl-117/gl-117/GL-117%20Source/${name}.tar.bz2"; 11 + sha256 = "1yvg1rp1yijv0b45cz085b29x5x0g5fkm654xdv5qwh2l6803gb4"; 23 12 }; 24 13 25 - inherit (sourceInfo) name version; 26 - inherit buildInputs; 14 + buildInputs = [ mesa SDL freeglut SDL_mixer autoconf automake libtool ]; 27 15 28 - /* doConfigure should be removed if not needed */ 29 - phaseNames = ["doConfigure" "doMakeInstall"]; 30 - 31 16 meta = { 32 17 description = "An air combat simulator"; 33 - maintainers = with a.lib.maintainers; 18 + maintainers = with stdenv.lib.maintainers; 34 19 [ 35 20 raskin 36 21 ]; 37 - platforms = with a.lib.platforms; 38 - linux; 22 + platforms = stdenv.lib.platforms.linux; 39 23 }; 40 - }) x 41 - 24 + }