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

58 lines
1.2 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, fetchFromGitHub
2015-03-25 15:21:44 -07:00
, ncurses
, texinfo
2015-03-25 15:21:44 -07:00
, gettext ? null
2015-03-25 21:48:13 -07:00
, enableNls ? true
, enableTiny ? false
2015-03-25 15:21:44 -07:00
}:
assert enableNls -> (gettext != null);
with stdenv.lib;
let
nixSyntaxHighlight = fetchFromGitHub {
owner = "seitz";
repo = "nanonix";
rev = "17e0de65e1cbba3d6baa82deaefa853b41f5c161";
sha256 = "1g51h65i31andfs2fbp1v3vih9405iknqn11fzywjxji00kjqv5s";
};
2017-03-19 14:36:48 -07:00
in stdenv.mkDerivation rec {
name = "nano-${version}";
2018-06-26 17:50:49 -07:00
version = "2.9.8";
2017-04-04 18:04:39 -07:00
src = fetchurl {
2016-09-02 14:26:02 -07:00
url = "mirror://gnu/nano/${name}.tar.xz";
2018-06-26 17:50:49 -07:00
sha256 = "122lm0z97wk3mgnbn8m4d769d4j9rxyc9z7s89xd4gsdp8qsrpn2";
};
2017-03-19 14:36:48 -07:00
nativeBuildInputs = [ texinfo ] ++ optional enableNls gettext;
buildInputs = [ ncurses ];
2017-04-04 18:04:39 -07:00
outputs = [ "out" "info" ];
2017-04-04 18:04:39 -07:00
configureFlags = ''
--sysconfdir=/etc
2015-03-25 15:21:44 -07:00
${optionalString (!enableNls) "--disable-nls"}
${optionalString enableTiny "--enable-tiny"}
2015-03-27 12:05:19 -07:00
'';
postInstall = ''
cp ${nixSyntaxHighlight}/nix.nanorc $out/share/nano/
'';
enableParallelBuilding = true;
2015-03-25 15:21:44 -07:00
meta = {
homepage = https://www.nano-editor.org/;
description = "A small, user-friendly console text editor";
license = licenses.gpl3Plus;
2016-10-29 13:41:48 -07:00
maintainers = with maintainers; [
jgeerds
joachifm
];
platforms = platforms.all;
};
}