nixpkgs/pkgs/applications/editors/moe/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

43 lines
1.3 KiB
Nix

{ lib, stdenv
, fetchurl
, ncurses
, lzip
}:
stdenv.mkDerivation rec {
pname = "moe";
version = "1.11";
src = fetchurl {
url = "mirror://gnu/moe/${pname}-${version}.tar.lz";
sha256 = "sha256-DvvLz1pKjZZlQcbLCZugq2QWeANm286C2f+ZWoWl4vk=";
};
prePatch = ''
substituteInPlace window_vector.cc --replace \
"insert( 0U, 1," \
"insert( 0U, 1U,"
'';
nativeBuildInputs = [ lzip ];
buildInputs = [ ncurses ];
meta = with lib; {
description = "A small, 8-bit clean editor";
longDescription = ''
GNU moe is a powerful, 8-bit clean, console text editor for ISO-8859 and
ASCII character encodings. It has a modeless, user-friendly interface,
online help, multiple windows, unlimited undo/redo capability, unlimited
line length, unlimited buffers, global search/replace (on all buffers at
once), block operations, automatic indentation, word wrapping, file name
completion, directory browser, duplicate removal from prompt histories,
delimiter matching, text conversion from/to UTF-8, romanization, etc.
'';
homepage = "https://www.gnu.org/software/moe/";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ AndersonTorres ];
platforms = platforms.unix;
};
}
# TODO: a configurable, global moerc file