mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 21:03:15 +00:00
501278bbd4
See http://lists.gnu.org/archive/html/info-gnu/2017-08/msg00010.html for release announcement
56 lines
1.2 KiB
Nix
56 lines
1.2 KiB
Nix
{ stdenv, hostPlatform, 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 = "17e0de65e1cbba3d6baa82deaefa853b41f5c161";
|
|
sha256 = "1g51h65i31andfs2fbp1v3vih9405iknqn11fzywjxji00kjqv5s";
|
|
};
|
|
|
|
in stdenv.mkDerivation rec {
|
|
name = "nano-${version}";
|
|
version = "2.8.7";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://gnu/nano/${name}.tar.xz";
|
|
sha256 = "0nhns59smd43mad2w6lnaxqnj4h6ifnlivi6cwydg646jm31gqzv";
|
|
};
|
|
|
|
nativeBuildInputs = [ texinfo ] ++ optional enableNls gettext;
|
|
buildInputs = [ ncurses ];
|
|
|
|
outputs = [ "out" "info" ];
|
|
|
|
configureFlags = ''
|
|
--sysconfdir=/etc
|
|
${optionalString (!enableNls) "--disable-nls"}
|
|
${optionalString enableTiny "--enable-tiny"}
|
|
'';
|
|
|
|
postInstall = ''
|
|
cp ${nixSyntaxHighlight}/nix.nanorc $out/share/nano/
|
|
'';
|
|
|
|
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;
|
|
};
|
|
}
|