emacsPackages.rect-mark: use trivialBuild

This commit is contained in:
AndersonTorres 2021-09-15 00:10:39 -03:00
parent 8b01c1f103
commit a4d539be9f

View File

@ -1,35 +1,26 @@
{ lib, stdenv, fetchurl, emacs }:
{ lib
, trivialBuild
, fetchFromGitHub
, emacs
}:
stdenv.mkDerivation {
trivialBuild rec {
pname = "rect-mark";
version = "1.4";
src = fetchurl {
url = "http://emacswiki.org/emacs/download/rect-mark.el";
sha256 = "0pyyg53z9irh5jdfvh2qp4pm8qrml9r7lh42wfmdw6c7f56qryh8";
src = fetchFromGitHub {
owner = "emacsmirror";
repo = pname;
rev = version;
hash = "sha256-/8T1VTYkKUxlNWXuuS54S5jpl4UxJBbgSuWc17a/VyM=";
};
dontUnpack = true;
buildInputs = [ emacs ];
buildPhase = ''
cp $src rect-mark.el
emacs --batch -f batch-byte-compile rect-mark.el
'';
installPhase = ''
runHook preInstall
install -d $out/share/emacs/site-lisp
install rect-mark.el* $out/share/emacs/site-lisp
runHook postInstall
'';
meta = {
description = "Mark a rectangle of text with highlighting";
meta = with lib; {
homepage = "http://emacswiki.org/emacs/RectangleMark";
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.all;
description = "Mark a rectangle of text with highlighting";
license = licenses.gpl2Plus;
inherit (emacs.meta) platforms;
};
}