mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 23:43:30 +00:00
44 lines
1.0 KiB
Nix
44 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.7.0";
|
|
src = fetchurl {
|
|
url = "mirror://gnu/nano/${name}.tar.xz";
|
|
sha256 = "08cmnca3s377z74yjw1afz59l2h9s40wsa9wxw5y4x5f2jaz6spq";
|
|
};
|
|
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; [
|
|
jgeerds
|
|
joachifm
|
|
];
|
|
platforms = platforms.all;
|
|
};
|
|
}
|