3
0
Fork 0
forked from mirrors/nixpkgs

merge #3428: nano: bump and add system-wide config

This commit is contained in:
Vladimír Čunát 2014-08-14 23:51:29 +02:00
commit 56d9b2cc8a
3 changed files with 40 additions and 2 deletions

View file

@ -53,6 +53,7 @@
./programs/dconf.nix
./programs/environment.nix
./programs/info.nix
./programs/nano.nix
./programs/screen.nix
./programs/shadow.nix
./programs/shell.nix

View file

@ -0,0 +1,35 @@
{ config, lib, ... }:
let
cfg = config.programs.nano;
in
{
###### interface
options = {
programs.nano = {
nanorc = lib.mkOption {
type = lib.types.lines;
default = "";
description = ''
The system-wide nano configuration.
See <citerefentry><refentrytitle>nanorc</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
'';
example = ''
set nowrap
set tabstospaces
set tabsize 4
'';
};
};
};
###### implementation
config = lib.mkIf (cfg.nanorc != "") {
environment.etc."nanorc".text = cfg.nanorc;
};
}

View file

@ -2,17 +2,19 @@
stdenv.mkDerivation (rec {
pname = "nano";
version = "2.3.2";
version = "2.3.6";
name = "${pname}-${version}";
src = fetchurl {
url = "mirror://gnu/nano/${name}.tar.gz";
sha256 = "1s3b21h5p7r8xafw0gahswj16ai6k2vnjhmd15b491hl0x494c7z";
sha256 = "a74bf3f18b12c1c777ae737c0e463152439e381aba8720b4bc67449f36a09534";
};
buildInputs = [ ncurses gettext ];
configureFlags = "sysconfdir=/etc";
meta = {
homepage = http://www.nano-editor.org/;
description = "A small, user-friendly console text editor";