merge #3428: nano: bump and add system-wide config
This commit is contained in:
commit
56d9b2cc8a
@ -53,6 +53,7 @@
|
|||||||
./programs/dconf.nix
|
./programs/dconf.nix
|
||||||
./programs/environment.nix
|
./programs/environment.nix
|
||||||
./programs/info.nix
|
./programs/info.nix
|
||||||
|
./programs/nano.nix
|
||||||
./programs/screen.nix
|
./programs/screen.nix
|
||||||
./programs/shadow.nix
|
./programs/shadow.nix
|
||||||
./programs/shell.nix
|
./programs/shell.nix
|
||||||
|
35
nixos/modules/programs/nano.nix
Normal file
35
nixos/modules/programs/nano.nix
Normal 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;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -2,17 +2,19 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation (rec {
|
stdenv.mkDerivation (rec {
|
||||||
pname = "nano";
|
pname = "nano";
|
||||||
version = "2.3.2";
|
version = "2.3.6";
|
||||||
|
|
||||||
name = "${pname}-${version}";
|
name = "${pname}-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://gnu/nano/${name}.tar.gz";
|
url = "mirror://gnu/nano/${name}.tar.gz";
|
||||||
sha256 = "1s3b21h5p7r8xafw0gahswj16ai6k2vnjhmd15b491hl0x494c7z";
|
sha256 = "a74bf3f18b12c1c777ae737c0e463152439e381aba8720b4bc67449f36a09534";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ ncurses gettext ];
|
buildInputs = [ ncurses gettext ];
|
||||||
|
|
||||||
|
configureFlags = "sysconfdir=/etc";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = http://www.nano-editor.org/;
|
homepage = http://www.nano-editor.org/;
|
||||||
description = "A small, user-friendly console text editor";
|
description = "A small, user-friendly console text editor";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user