From a44d003502e62d30f4924153c027b6bc62852bb6 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Mon, 25 Jan 2016 21:48:34 +0000 Subject: [PATCH] lincity: use mkDerivation --- pkgs/games/lincity/default.nix | 29 ++++++++++++----------------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/pkgs/games/lincity/default.nix b/pkgs/games/lincity/default.nix index 6cd5155e3af1..dba488016b99 100644 --- a/pkgs/games/lincity/default.nix +++ b/pkgs/games/lincity/default.nix @@ -1,24 +1,19 @@ -args @ { libX11, libXext, xextproto, libICE, libSM, xproto, libpng, zlib, ... }: with args; -let - version = lib.attrByPath ["version"] "1.12.1" args; - sha256 = lib.attrByPath ["sha256"] - "0xmrp7vkkp1hfblb6nl3rh2651qsbcm21bnncpnma1sf40jaf8wj" args; - pkgName = "lincity"; -in -rec { +{ stdenv, fetchurl, libX11, libXext, xextproto, libICE, libSM, xproto, libpng, zlib }: + +stdenv.mkDerivation rec { + name = "lincity-${version}"; + version = "1.12.1"; + src = fetchurl { - url = "mirror://sourceforge/lincity/${pkgName}-${version}.tar.gz"; - inherit sha256; + url = "mirror://sourceforge/lincity/${name}.tar.gz"; + sha256 = "0xmrp7vkkp1hfblb6nl3rh2651qsbcm21bnncpnma1sf40jaf8wj"; }; - buildInputs = [libICE libpng libSM libX11 libXext - xextproto zlib xproto]; - configureFlags = []; + buildInputs = [ + libICE libpng libSM libX11 libXext + xextproto zlib xproto + ]; - /* doConfigure should be specified separately */ - phaseNames = ["doConfigure" "doMakeInstall"]; - - name = "${pkgName}-" + version; meta = { description = "City simulation game"; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2010e5b5695d..e4b5d390c22b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14241,7 +14241,7 @@ let lgogdownloader = callPackage ../games/lgogdownloader { }; - lincity = builderDefsPackage (callPackage ../games/lincity) {}; + lincity = callPackage ../games/lincity {}; lincity_ng = callPackage ../games/lincity/ng.nix {};