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

57 lines
1.2 KiB
Nix
Raw Normal View History

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