mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 04:43:09 +03:00
merge #3428: nano: bump and add system-wide config
This commit is contained in:
commit
56d9b2cc8a
@ -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
|
||||
|
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 {
|
||||
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";
|
||||
|
Loading…
Reference in New Issue
Block a user