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