2018-07-20 17:44:44 -07:00
|
|
|
{ stdenv, fetchurl, fetchFromGitHub
|
2015-03-25 15:21:44 -07:00
|
|
|
, ncurses
|
2016-02-27 18:01:34 -08:00
|
|
|
, texinfo
|
2015-03-25 15:21:44 -07:00
|
|
|
, gettext ? null
|
2015-03-25 21:48:13 -07:00
|
|
|
, enableNls ? true
|
2015-03-25 15:24:27 -07:00
|
|
|
, enableTiny ? false
|
2015-03-25 15:21:44 -07:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert enableNls -> (gettext != null);
|
|
|
|
|
|
|
|
with stdenv.lib;
|
2010-07-28 04:55:54 -07:00
|
|
|
|
2017-01-18 03:05:30 -08:00
|
|
|
let
|
|
|
|
nixSyntaxHighlight = fetchFromGitHub {
|
|
|
|
owner = "seitz";
|
|
|
|
repo = "nanonix";
|
2018-09-09 14:16:07 -07:00
|
|
|
rev = "bf8d898efaa10dce3f7972ff765b58c353b4b4ab";
|
|
|
|
sha256 = "0773s5iz8aw9npgyasb0r2ybp6gvy2s9sq51az8w7h52bzn5blnn";
|
2017-01-18 03:05:30 -08:00
|
|
|
};
|
2017-03-19 14:36:48 -07:00
|
|
|
|
2017-01-18 03:05:30 -08:00
|
|
|
in stdenv.mkDerivation rec {
|
2019-08-15 05:41:18 -07:00
|
|
|
pname = "nano";
|
2020-05-26 05:33:47 -07:00
|
|
|
version = "4.9.3";
|
2017-04-04 18:04:39 -07:00
|
|
|
|
2004-10-06 06:17:06 -07:00
|
|
|
src = fetchurl {
|
2019-08-15 05:41:18 -07:00
|
|
|
url = "mirror://gnu/nano/${pname}-${version}.tar.xz";
|
2020-05-26 05:33:47 -07:00
|
|
|
sha256 = "1d2i3wvsq5lvpxxinq51dcvd58xx7j0d0c2csz9hgvd06gq3hd3f";
|
2004-10-06 06:17:06 -07:00
|
|
|
};
|
2017-03-19 14:36:48 -07:00
|
|
|
|
2016-03-07 10:34:44 -08:00
|
|
|
nativeBuildInputs = [ texinfo ] ++ optional enableNls gettext;
|
|
|
|
buildInputs = [ ncurses ];
|
2017-04-04 18:04:39 -07:00
|
|
|
|
2016-02-27 18:01:34 -08:00
|
|
|
outputs = [ "out" "info" ];
|
2017-04-04 18:04:39 -07:00
|
|
|
|
2018-07-25 14:44:21 -07:00
|
|
|
configureFlags = [
|
|
|
|
"--sysconfdir=/etc"
|
|
|
|
(stdenv.lib.enableFeature enableNls "nls")
|
|
|
|
(stdenv.lib.enableFeature enableTiny "tiny")
|
|
|
|
];
|
2015-03-27 12:05:19 -07:00
|
|
|
|
2017-01-18 03:05:30 -08:00
|
|
|
postInstall = ''
|
|
|
|
cp ${nixSyntaxHighlight}/nix.nanorc $out/share/nano/
|
|
|
|
'';
|
|
|
|
|
2017-11-28 17:22:42 -08:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2015-03-25 15:21:44 -07:00
|
|
|
meta = {
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://www.nano-editor.org/";
|
2008-02-18 06:59:48 -08:00
|
|
|
description = "A small, user-friendly console text editor";
|
2015-03-25 15:17:51 -07:00
|
|
|
license = licenses.gpl3Plus;
|
2016-10-29 13:41:48 -07:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
joachifm
|
|
|
|
];
|
2015-03-25 15:17:51 -07:00
|
|
|
platforms = platforms.all;
|
2008-01-30 11:49:42 -08:00
|
|
|
};
|
2015-03-25 15:17:51 -07:00
|
|
|
}
|