nixpkgs-suyu/pkgs/applications/editors/nano/default.nix
Elis Hirwing b47c5870f4
nano: 2.9.8 -> 3.0
Changelog: http://lists.gnu.org/archive/html/info-nano/2018-09/msg00000.html

Also updated the nix highlighting for nano
2018-09-09 23:16:07 +02:00

57 lines
1.2 KiB
Nix

{ stdenv, fetchurl, fetchFromGitHub
, ncurses
, texinfo
, gettext ? null
, enableNls ? true
, enableTiny ? false
}:
assert enableNls -> (gettext != null);
with stdenv.lib;
let
nixSyntaxHighlight = fetchFromGitHub {
owner = "seitz";
repo = "nanonix";
rev = "bf8d898efaa10dce3f7972ff765b58c353b4b4ab";
sha256 = "0773s5iz8aw9npgyasb0r2ybp6gvy2s9sq51az8w7h52bzn5blnn";
};
in stdenv.mkDerivation rec {
name = "nano-${version}";
version = "3.0";
src = fetchurl {
url = "mirror://gnu/nano/${name}.tar.xz";
sha256 = "1868hg9s584fwjrh0fzdrixmxc2qhw520z4q5iv68kjiajivr9g0";
};
nativeBuildInputs = [ texinfo ] ++ optional enableNls gettext;
buildInputs = [ ncurses ];
outputs = [ "out" "info" ];
configureFlags = [
"--sysconfdir=/etc"
(stdenv.lib.enableFeature enableNls "nls")
(stdenv.lib.enableFeature enableTiny "tiny")
];
postInstall = ''
cp ${nixSyntaxHighlight}/nix.nanorc $out/share/nano/
'';
enableParallelBuilding = true;
meta = {
homepage = https://www.nano-editor.org/;
description = "A small, user-friendly console text editor";
license = licenses.gpl3Plus;
maintainers = with maintainers; [
jgeerds
joachifm
];
platforms = platforms.all;
};
}