57ea9af90a
This upgrades Nano to the (non-GNU) version 2.6.1.
41 lines
1.0 KiB
Nix
41 lines
1.0 KiB
Nix
{ stdenv, fetchurl
|
|
, ncurses
|
|
, texinfo
|
|
, gettext ? null
|
|
, enableNls ? true
|
|
, enableTiny ? false
|
|
}:
|
|
|
|
assert enableNls -> (gettext != null);
|
|
|
|
with stdenv.lib;
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "nano-${version}";
|
|
version = "2.6.1";
|
|
src = fetchurl {
|
|
url = "https://nano-editor.org/dist/v2.6/${name}.tar.gz";
|
|
sha256 = "56f2ba1c532647bee36abd5f87a714400af0be084cf857a65bc8f41a0dc28fe5";
|
|
};
|
|
nativeBuildInputs = [ texinfo ] ++ optional enableNls gettext;
|
|
buildInputs = [ ncurses ];
|
|
outputs = [ "out" "info" ];
|
|
configureFlags = ''
|
|
--sysconfdir=/etc
|
|
${optionalString (!enableNls) "--disable-nls"}
|
|
${optionalString enableTiny "--enable-tiny"}
|
|
'';
|
|
|
|
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
|
|
substituteInPlace src/text.c --replace "__time_t" "time_t"
|
|
'';
|
|
|
|
meta = {
|
|
homepage = http://www.nano-editor.org/;
|
|
description = "A small, user-friendly console text editor";
|
|
license = licenses.gpl3Plus;
|
|
maintainers = with maintainers; [ joachifm ];
|
|
platforms = platforms.all;
|
|
};
|
|
}
|