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

41 lines
1,016 B
Nix
Raw Normal View History

2015-03-25 23:21:44 +01:00
{ stdenv, fetchurl
, ncurses
, texinfo
2015-03-25 23:21:44 +01:00
, gettext ? null
2015-03-26 05:48:13 +01:00
, enableNls ? true
, enableTiny ? false
2015-03-25 23:21:44 +01:00
}:
assert enableNls -> (gettext != null);
with stdenv.lib;
stdenv.mkDerivation rec {
name = "nano-${version}";
version = "2.5.3";
src = fetchurl {
url = "mirror://gnu/nano/${name}.tar.gz";
sha256 = "1vhjrcydcfxqq1719vcsvqqnbjbq2523m00dhzag5vwzkc961c5j";
};
nativeBuildInputs = [ texinfo ] ++ optional enableNls gettext;
buildInputs = [ ncurses ];
outputs = [ "out" "info" ];
configureFlags = ''
--sysconfdir=/etc
2015-03-25 23:21:44 +01:00
${optionalString (!enableNls) "--disable-nls"}
${optionalString enableTiny "--enable-tiny"}
'';
2015-03-27 20:05:19 +01:00
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace src/text.c --replace "__time_t" "time_t"
'';
2015-03-25 23:21:44 +01:00
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;
};
}