nixpkgs/pkgs/applications/editors/nano/default.nix

44 lines
1.0 KiB
Nix
Raw Normal View History

2015-03-25 22:21:44 +00:00
{ stdenv, fetchurl
, ncurses
, texinfo
2015-03-25 22:21:44 +00:00
, gettext ? null
2015-03-26 04:48:13 +00:00
, enableNls ? true
, enableTiny ? false
2015-03-25 22:21:44 +00:00
}:
assert enableNls -> (gettext != null);
with stdenv.lib;
stdenv.mkDerivation rec {
name = "nano-${version}";
2016-10-29 20:42:18 +00:00
version = "2.7.1";
src = fetchurl {
2016-09-02 21:26:02 +00:00
url = "mirror://gnu/nano/${name}.tar.xz";
2016-10-29 20:42:18 +00:00
sha256 = "1kapx0fyp0a0pvsdd1n59pm3acrimdrp7ciglg098wqxhdlvwp6z";
};
nativeBuildInputs = [ texinfo ] ++ optional enableNls gettext;
buildInputs = [ ncurses ];
outputs = [ "out" "info" ];
configureFlags = ''
--sysconfdir=/etc
2015-03-25 22:21:44 +00:00
${optionalString (!enableNls) "--disable-nls"}
${optionalString enableTiny "--enable-tiny"}
'';
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 = {
homepage = http://www.nano-editor.org/;
description = "A small, user-friendly console text editor";
license = licenses.gpl3Plus;
2016-10-29 20:41:48 +00:00
maintainers = with maintainers; [
jgeerds
joachifm
];
platforms = platforms.all;
};
}