2015-03-25 23:21:44 +01:00
|
|
|
{ stdenv, fetchurl
|
|
|
|
, ncurses
|
2016-02-28 03:01:34 +01:00
|
|
|
, texinfo
|
2015-03-25 23:21:44 +01:00
|
|
|
, gettext ? null
|
2015-03-26 05:48:13 +01:00
|
|
|
, enableNls ? true
|
2015-03-25 23:24:27 +01:00
|
|
|
, enableTiny ? false
|
2015-03-25 23:21:44 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert enableNls -> (gettext != null);
|
|
|
|
|
|
|
|
with stdenv.lib;
|
2010-07-28 13:55:54 +02:00
|
|
|
|
2015-03-25 23:17:51 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "nano-${version}";
|
2016-09-02 23:26:02 +02:00
|
|
|
version = "2.7.0";
|
2004-10-06 15:17:06 +02:00
|
|
|
src = fetchurl {
|
2016-09-02 23:26:02 +02:00
|
|
|
url = "mirror://gnu/nano/${name}.tar.xz";
|
|
|
|
sha256 = "08cmnca3s377z74yjw1afz59l2h9s40wsa9wxw5y4x5f2jaz6spq";
|
2004-10-06 15:17:06 +02:00
|
|
|
};
|
2016-03-07 19:34:44 +01:00
|
|
|
nativeBuildInputs = [ texinfo ] ++ optional enableNls gettext;
|
|
|
|
buildInputs = [ ncurses ];
|
2016-02-28 03:01:34 +01:00
|
|
|
outputs = [ "out" "info" ];
|
2015-03-25 23:17:51 +01:00
|
|
|
configureFlags = ''
|
|
|
|
--sysconfdir=/etc
|
2015-03-25 23:21:44 +01:00
|
|
|
${optionalString (!enableNls) "--disable-nls"}
|
2015-03-25 23:24:27 +01:00
|
|
|
${optionalString enableTiny "--enable-tiny"}
|
2015-03-25 23:17:51 +01:00
|
|
|
'';
|
2008-01-30 20:49:42 +01:00
|
|
|
|
2015-03-27 20:05:19 +01:00
|
|
|
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
|
|
|
|
substituteInPlace src/text.c --replace "__time_t" "time_t"
|
|
|
|
'';
|
|
|
|
|
2015-03-25 23:21:44 +01:00
|
|
|
meta = {
|
2008-02-18 15:59:48 +01:00
|
|
|
homepage = http://www.nano-editor.org/;
|
|
|
|
description = "A small, user-friendly console text editor";
|
2015-03-25 23:17:51 +01:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ joachifm ];
|
|
|
|
platforms = platforms.all;
|
2008-01-30 20:49:42 +01:00
|
|
|
};
|
2015-03-25 23:17:51 +01:00
|
|
|
}
|