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 - []; 9 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; 23 }; 24 25 - inherit (sourceInfo) name version; 26 - inherit buildInputs; 27 28 - /* doConfigure should be removed if not needed */ 29 - phaseNames = ["doConfigure" "doMakeInstall"]; 30 - 31 meta = { 32 description = "An air combat simulator"; 33 - maintainers = with a.lib.maintainers; 34 [ 35 raskin 36 ]; 37 - platforms = with a.lib.platforms; 38 - linux; 39 }; 40 - }) x 41 -
··· 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"; 8 9 + src = fetchurl { 10 + url = "mirror://sourceforge/project/gl-117/gl-117/GL-117%20Source/${name}.tar.bz2"; 11 + sha256 = "1yvg1rp1yijv0b45cz085b29x5x0g5fkm654xdv5qwh2l6803gb4"; 12 }; 13 14 + buildInputs = [ mesa SDL freeglut SDL_mixer autoconf automake libtool ]; 15 16 meta = { 17 description = "An air combat simulator"; 18 + maintainers = with stdenv.lib.maintainers; 19 [ 20 raskin 21 ]; 22 + platforms = stdenv.lib.platforms.linux; 23 }; 24 + }