58 lines
1.2 KiB
Nix
58 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 = "7483fd8b79f1f3f2179dbbd46aa400df4320ba10";
|
|
sha256 = "10pv75kfrgnziz8sr83hdbb0c3klm2fmsdw3i5cpqqf5va1fzb8h";
|
|
};
|
|
|
|
in stdenv.mkDerivation rec {
|
|
name = "nano-${version}";
|
|
version = "2.9.8";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://gnu/nano/${name}.tar.xz";
|
|
sha256 = "122lm0z97wk3mgnbn8m4d769d4j9rxyc9z7s89xd4gsdp8qsrpn2";
|
|
};
|
|
|
|
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;
|
|
};
|
|
}
|