From 4b07d1682754ba782b43611499f31cf9f750e569 Mon Sep 17 00:00:00 2001 From: codyopel Date: Mon, 11 May 2015 03:11:30 -0400 Subject: [PATCH] intltool: refactor --- .../tools/misc/intltool/default.nix | 40 +++++++------------ .../tools/misc/intltool/default.upstream | 2 - 2 files changed, 14 insertions(+), 28 deletions(-) delete mode 100644 pkgs/development/tools/misc/intltool/default.upstream diff --git a/pkgs/development/tools/misc/intltool/default.nix b/pkgs/development/tools/misc/intltool/default.nix index 40b7ea3b5782..761cd6edfc2c 100644 --- a/pkgs/development/tools/misc/intltool/default.nix +++ b/pkgs/development/tools/misc/intltool/default.nix @@ -1,33 +1,21 @@ -{ stdenv, fetchurl, perl, perlXMLParser, gettext }: -let - s = # Generated upstream information - rec { - baseName="intltool"; - version="0.51.0"; - name="${baseName}-${version}"; - hash="1karx4sb7bnm2j67q0q74hspkfn6lqprpy5r99vkn5bb36a4viv7"; - url="https://launchpad.net/intltool/trunk/0.51.0/+download/intltool-0.51.0.tar.gz"; - sha256="1karx4sb7bnm2j67q0q74hspkfn6lqprpy5r99vkn5bb36a4viv7"; - }; - propagatedBuildInputs = [perl perlXMLParser]; - buildInputs = []; - in -stdenv.mkDerivation { - inherit (s) name version; +{ stdenv, fetchurl, gettext, perl, perlXMLParser }: + +stdenv.mkDerivation rec { + name = "intltool-${version}"; + version = "0.51.0"; + src = fetchurl { - inherit (s) url sha256; + url = "https://launchpad.net/intltool/trunk/${version}/+download/${name}.tar.gz"; + sha256 = "1karx4sb7bnm2j67q0q74hspkfn6lqprpy5r99vkn5bb36a4viv7"; }; - inherit buildInputs; - # not needed by intltool itself but (probably) needed for its usage - propagatedBuildInputs = propagatedBuildInputs ++ [ gettext ]; + propagatedBuildInputs = [ gettext perl perlXMLParser ]; - meta = { + meta = with stdenv.lib; { description = "Translation helper tool"; - homepage = "http://launchpad.net/intltool/"; - license = stdenv.lib.licenses.gpl2Plus; - maintainers = [stdenv.lib.maintainers.raskin]; - platforms = stdenv.lib.platforms.unix; - inherit (s) version; + homepage = http://launchpad.net/intltool/; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ raskin ]; + platforms = platforms.unix; }; } diff --git a/pkgs/development/tools/misc/intltool/default.upstream b/pkgs/development/tools/misc/intltool/default.upstream deleted file mode 100644 index 323bf21f45a1..000000000000 --- a/pkgs/development/tools/misc/intltool/default.upstream +++ /dev/null @@ -1,2 +0,0 @@ -attribute_name intltool -url https://launchpad.net/intltool/+download