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