gl117: reimplement using mkDerivation

This commit is contained in:
Joachim Fasting 2015-07-14 11:29:02 +02:00
parent 33d825aaea
commit bfbb866d41

View File

@ -1,41 +1,24 @@
x@{builderDefsPackage { stdenv, fetchurl
, mesa, SDL, freeglut, SDL_mixer, autoconf, automake, libtool , mesa, SDL, freeglut, SDL_mixer, autoconf, automake, libtool
, ...}: }:
builderDefsPackage
(a :
let
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
[];
buildInputs = map (n: builtins.getAttr n x) stdenv.mkDerivation rec {
(builtins.attrNames (builtins.removeAttrs x helperArgNames)); name = "gl-117-${version}";
sourceInfo = rec { version = "1.3.2";
version = "1.3.2";
name = "gl-117-1.3.2"; src = fetchurl {
url = "mirror://sourceforge/project/gl-117/gl-117/GL-117%20Source/gl-117-1.3.2-src.tar.bz2"; url = "mirror://sourceforge/project/gl-117/gl-117/GL-117%20Source/${name}.tar.bz2";
hash = "1yvg1rp1yijv0b45cz085b29x5x0g5fkm654xdv5qwh2l6803gb4"; sha256 = "1yvg1rp1yijv0b45cz085b29x5x0g5fkm654xdv5qwh2l6803gb4";
};
in
rec {
src = a.fetchurl {
url = sourceInfo.url;
sha256 = sourceInfo.hash;
}; };
inherit (sourceInfo) name version; buildInputs = [ mesa SDL freeglut SDL_mixer autoconf automake libtool ];
inherit buildInputs;
/* doConfigure should be removed if not needed */
phaseNames = ["doConfigure" "doMakeInstall"];
meta = { meta = {
description = "An air combat simulator"; description = "An air combat simulator";
maintainers = with a.lib.maintainers; maintainers = with stdenv.lib.maintainers;
[ [
raskin raskin
]; ];
platforms = with a.lib.platforms; platforms = stdenv.lib.platforms.linux;
linux;
}; };
}) x }