diff --git a/pkgs/applications/editors/nano/default.nix b/pkgs/applications/editors/nano/default.nix index 2e48eadb0a23..1c0238451995 100644 --- a/pkgs/applications/editors/nano/default.nix +++ b/pkgs/applications/editors/nano/default.nix @@ -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 { name = "nano-${version}"; @@ -7,12 +15,13 @@ stdenv.mkDerivation rec { url = "mirror://gnu/nano/${name}.tar.gz"; sha256 = "1gbm9bcv4k55y01r5q8a8a9s3yrrgq3z5jxxiij3wl404r8gnxjh"; }; - buildInputs = [ ncurses gettext ]; + buildInputs = [ ncurses ] ++ optional enableNls gettext; configureFlags = '' --sysconfdir=/etc + ${optionalString (!enableNls) "--disable-nls"} ''; - meta = with stdenv.lib; { + meta = { homepage = http://www.nano-editor.org/; description = "A small, user-friendly console text editor"; license = licenses.gpl3Plus;