diff --git a/pkgs/applications/editors/elvis/default.nix b/pkgs/applications/editors/elvis/default.nix deleted file mode 100644 index 046aac459b53..000000000000 --- a/pkgs/applications/editors/elvis/default.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ fetchurl, fetchpatch, lib, stdenv, ncurses }: - -stdenv.mkDerivation rec { - pname = "elvis"; - version = "2.2_0"; - - src = fetchurl { - url = "http://www.the-little-red-haired-girl.org/pub/elvis/elvis-${version}.tar.gz"; - sha256 = "182fj9qzyq6cjq1r849gpam6nq9smwv9f9xwaq84961p56r6d14s"; - }; - - buildInputs = [ ncurses ]; - - patches = [ - (fetchpatch { - url = "https://github.com/mbert/elvis/commit/076cf4ad5cc993be0c6195ec0d5d57e5ad8ac1eb.patch"; - sha256 = "0yzkc1mxjwg09mfmrk20ksa0vfnb2x83ndybwvawq4xjm1qkcahc"; - }) - ]; - - postPatch = '' - substituteInPlace configure \ - --replace '-lcurses' '-lncurses' - ''; - - preConfigure = '' - mkdir -p $out/share/man/man1 - ''; - - installPhase = '' - mkdir -p $out/bin $out/share/elvis $out/share/elvis/doc - cp elvis ref elvtags elvfmt $out/bin - cp -R data/* $out/share/elvis - cp doc/* $out/share/elvis/doc - - mkdir -p $out/share/man/man1 - for a in doc/*.man; do - cp $a $out/share/man/man1/`basename $a .man`.1 - done - ''; - - configureFlags = [ "--ioctl=termios" ]; - - meta = { - homepage = "http://elvis.the-little-red-haired-girl.org/"; - description = "Vi clone for Unix and other operating systems"; - license = lib.licenses.free; - }; -} diff --git a/pkgs/by-name/el/elvis/package.nix b/pkgs/by-name/el/elvis/package.nix new file mode 100644 index 000000000000..337794ac642f --- /dev/null +++ b/pkgs/by-name/el/elvis/package.nix @@ -0,0 +1,75 @@ +{ + lib, + fetchurl, + fetchpatch, + installShellFiles, + ncurses, + stdenv, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "elvis"; + version = "2.2_0"; + + src = fetchurl { + urls = [ + "http://www.the-little-red-haired-girl.org/pub/elvis/elvis-${finalAttrs.version}.tar.gz" + "http://www.the-little-red-haired-girl.org/pub/elvis/old/elvis-${finalAttrs.version}.tar.gz" + ]; + hash = "sha256-moRmsik3mEQQVrwnlzavOmFrqrovEZQDlsxg/3GSTqA="; + }; + + patches = [ + (fetchpatch { + name = "0000-resolve-stdio-getline-naming-conflict.patch"; + url = "https://github.com/mbert/elvis/commit/076cf4ad5cc993be0c6195ec0d5d57e5ad8ac1eb.patch"; + hash = "sha256-DCo2caiyE8zV5ss3O1AXy7oNlJ5AzFxdTeBx2Wtg83s="; + }) + ]; + + outputs = [ + "out" + "man" + ]; + + nativeBuildInputs = [ installShellFiles ]; + + buildInputs = [ ncurses ]; + + configureFlags = [ "--ioctl=termios" ]; + + strictDeps = false; + + postPatch = '' + substituteInPlace configure \ + --replace-fail '-lcurses' '-lncurses' + ''; + + installPhase = '' + runHook preInstall + + installBin elvis ref elvtags elvfmt + + pushd doc + for page in *.man; do + installManPage $page + rm $page + done + popd + + mkdir -p $out/share/doc/elvis-${finalAttrs.version}/ $out/share/elvis/ + cp -R data/* $out/share/elvis/ + cp doc/* $out/share/doc/elvis-${finalAttrs.version}/ + + runHook postInstall + ''; + + meta = { + homepage = "http://elvis.the-little-red-haired-girl.org/"; + description = "Vi clone for Unix and other operating systems"; + license = lib.licenses.free; + mainProgram = "elvis"; + maintainers = with lib.maintainers; [ AndersonTorres ]; + platforms = lib.platforms.unix; + }; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7686e7424890..7c4d82f04ae2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -29210,8 +29210,6 @@ with pkgs; autoreconfHook = buildPackages.autoreconfHook269; }; - elvis = callPackage ../applications/editors/elvis { }; - inherit (recurseIntoAttrs (callPackage ../applications/editors/emacs { })) emacs28 emacs28-gtk2