nixpkgs/pkgs/applications/editors/nano/default.nix
Michael Ekstrand b3faef0d93 nano: build info manual (close #13527)
Make nano depend use texinfo, so that the built packages include the
info manual, and put it into a separate output.
2016-02-28 21:50:17 +01:00

40 lines
989 B
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.5.0";
src = fetchurl {
url = "mirror://gnu/nano/${name}.tar.gz";
sha256 = "1vl9bim56k1b4zwc3icxp46w6pn6gb042j1h4jlz1jklxxpkwcpz";
};
buildInputs = [ ncurses texinfo ] ++ optional enableNls gettext;
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;
};
}