3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/editors/nano/default.nix

58 lines
1.2 KiB
Nix
Raw Normal View History

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