nano: make NLS optional

This commit is contained in:
Joachim Fasting 2015-03-25 23:21:44 +01:00
parent 1533a9aef5
commit e1f6d349ec

View File

@ -1,4 +1,12 @@
{ stdenv, fetchurl, ncurses, gettext }: { stdenv, fetchurl
, ncurses
, gettext ? null
, enableNls ? false
}:
assert enableNls -> (gettext != null);
with stdenv.lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "nano-${version}"; name = "nano-${version}";
@ -7,12 +15,13 @@ stdenv.mkDerivation rec {
url = "mirror://gnu/nano/${name}.tar.gz"; url = "mirror://gnu/nano/${name}.tar.gz";
sha256 = "1gbm9bcv4k55y01r5q8a8a9s3yrrgq3z5jxxiij3wl404r8gnxjh"; sha256 = "1gbm9bcv4k55y01r5q8a8a9s3yrrgq3z5jxxiij3wl404r8gnxjh";
}; };
buildInputs = [ ncurses gettext ]; buildInputs = [ ncurses ] ++ optional enableNls gettext;
configureFlags = '' configureFlags = ''
--sysconfdir=/etc --sysconfdir=/etc
${optionalString (!enableNls) "--disable-nls"}
''; '';
meta = with stdenv.lib; { meta = {
homepage = http://www.nano-editor.org/; homepage = http://www.nano-editor.org/;
description = "A small, user-friendly console text editor"; description = "A small, user-friendly console text editor";
license = licenses.gpl3Plus; license = licenses.gpl3Plus;