Merge pull request #325168 from atorres1985-contrib/elisp-use-melpabuild

mini-treewide: use melpabuild in some Elisp packages
This commit is contained in:
Lin Jian 2024-07-21 20:43:36 +08:00 committed by GitHub
commit 36cb8eaf62
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 144 additions and 152 deletions

View File

@ -1,55 +1,34 @@
{ lib
, melpaBuild
, fetchFromGitHub
, acm
, popon
, writeText
, writeScript
{
lib,
melpaBuild,
fetchFromGitHub,
acm,
popon,
unstableGitUpdater,
}:
let
rev = "1851d8fa2a27d3fd8deeeb29cd21c3002b8351ba";
in
melpaBuild {
pname = "acm-terminal";
version = "20231206.1141";
version = "0-unstable-2023-12-06";
src = fetchFromGitHub {
owner = "twlz0ne";
repo = "acm-terminal";
inherit rev;
sha256 = "sha256-EYhFrOo0j0JSNTdcZCbyM0iLxaymUXi1u6jZy8lTOaY=";
rev = "1851d8fa2a27d3fd8deeeb29cd21c3002b8351ba";
hash = "sha256-EYhFrOo0j0JSNTdcZCbyM0iLxaymUXi1u6jZy8lTOaY=";
};
commit = rev;
packageRequires = [
acm
popon
];
recipe = writeText "recipe" ''
(acm-terminal :repo "twlz0ne/acm-terminal" :fetcher github)
'';
passthru.updateScript = unstableGitUpdater { hardcodeZeroVersion = true; };
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p common-updater-scripts coreutils git gnused
set -eu -o pipefail
tmpdir="$(mktemp -d)"
git clone --depth=1 https://github.com/twlz0ne/acm-terminal.git "$tmpdir"
pushd "$tmpdir"
commit=$(git show -s --pretty='format:%H')
# Based on: https://github.com/melpa/melpa/blob/2d8716906a0c9e18d6c979d8450bf1d15dd785eb/package-build/package-build.el#L523-L533
version=$(TZ=UTC git show -s --pretty='format:%cd' --date='format-local:%Y%m%d.%H%M' | sed 's|\.0*|.|')
popd
update-source-version emacsPackages.acm-terminal $version --rev="$commit"
'';
meta = with lib; {
description = "Patch for LSP bridge acm on Terminal";
meta = {
homepage = "https://github.com/twlz0ne/acm-terminal";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ kira-bruneau ];
description = "Patch for LSP bridge acm on Terminal";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ kira-bruneau ];
};
}

View File

@ -1,10 +1,11 @@
{ lib
, trivialBuild
, fetchFromGitHub
, color-theme
{
lib,
color-theme,
fetchFromGitHub,
melpaBuild,
}:
trivialBuild {
melpaBuild {
pname = "color-theme-solarized";
version = "0-unstable-2017-10-24";
@ -17,10 +18,10 @@ trivialBuild {
packageRequires = [ color-theme ];
meta = with lib; {
meta = {
homepage = "http://ethanschoonover.com/solarized";
description = "Precision colors for machines and people; Emacs implementation";
license = licenses.mit;
maintainers = with maintainers; [ samuelrivas AndersonTorres ];
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ AndersonTorres ];
};
}

View File

@ -1,10 +1,10 @@
{ lib
, fetchFromGitHub
, trivialBuild
, emacs
{
lib,
fetchFromGitHub,
melpaBuild,
}:
trivialBuild {
melpaBuild {
pname = "emacs-conflict";
version = "0-unstable-2022-11-21";
@ -12,14 +12,13 @@ trivialBuild {
owner = "ibizaman";
repo = "emacs-conflict";
rev = "9f236b93930f3ceb4cb0258cf935c99599191de3";
sha256 = "sha256-DIGvnotSQYIgHxGxtyCALHd8ZbrfkmdvjLXlkcqQ6v4=";
hash = "sha256-DIGvnotSQYIgHxGxtyCALHd8ZbrfkmdvjLXlkcqQ6v4=";
};
meta = with lib; {
description = "Resolve conflicts happening when using file synchronization tools";
meta = {
homepage = "https://github.com/ibizaman/emacs-conflict";
license = licenses.gpl3;
maintainers = with maintainers; [ ibizaman ];
inherit (emacs.meta) platforms;
description = "Resolve conflicts happening when using file synchronization tools";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ ibizaman ];
};
}

View File

@ -1,12 +1,12 @@
{ lib
, trivialBuild
, fetchFromGitHub
, emacs
, evil
, markdown-mode
{
lib,
evil,
fetchFromGitHub,
markdown-mode,
melpaBuild,
}:
trivialBuild rec {
melpaBuild {
pname = "evil-markdown";
version = "0-unstable-2021-07-21";
@ -17,18 +17,15 @@ trivialBuild rec {
hash = "sha256-HBBuZ1VWIn6kwK5CtGIvHM1+9eiNiKPH0GUsyvpUVN8=";
};
buildInputs = propagatedUserEnvPkgs;
propagatedUserEnvPkgs = [
packageRequires = [
evil
markdown-mode
];
meta = with lib; {
meta = {
homepage = "https://github.com/Somelauw/evil-markdown";
description = "Integrates Emacs evil and markdown";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ leungbk ];
inherit (emacs.meta) platforms;
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ leungbk ];
};
}

View File

@ -1,10 +1,10 @@
{ lib
, fetchFromGitHub
, emacs
, trivialBuild
{
lib,
fetchFromGitHub,
melpaBuild,
}:
trivialBuild {
melpaBuild {
pname = "git-undo";
version = "0-unstable-2019-12-21";
@ -12,14 +12,13 @@ trivialBuild {
owner = "jwiegley";
repo = "git-undo-el";
rev = "cf31e38e7889e6ade7d2d2b9f8719fd44f52feb5";
sha256 = "sha256-cVkK9EF6qQyVV3uVqnBEjF8e9nEx/8ixnM8PvxqCyYE=";
hash = "sha256-cVkK9EF6qQyVV3uVqnBEjF8e9nEx/8ixnM8PvxqCyYE=";
};
meta = with lib; {
meta = {
homepage = "https://github.com/jwiegley/git-undo-el";
description = "Revert region to most recent Git-historical version";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ leungbk ];
inherit (emacs.meta) platforms;
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ leungbk ];
};
}

View File

@ -6,7 +6,7 @@
melpaBuild {
pname = "grid";
version = "20240526.1305";
version = "0-unstable-2024-05-26";
src = fetchFromGitHub {
owner = "ichernyshovvv";

View File

@ -1,28 +1,30 @@
{ lib
, trivialBuild
, fetchFromGitHub
, dictionary
, emacs
, helm
{
lib,
dictionary,
fetchFromGitHub,
helm,
melpaBuild,
}:
trivialBuild rec {
melpaBuild {
pname = "helm-words";
version = "0-unstable-2019-03-12";
src = fetchFromGitHub {
owner = "emacsmirror";
repo = pname;
repo = "helm-words";
rev = "e6387ece1940a06695b9d910de3d90252efb8d29";
hash = "sha256-rh8YKDLZZCUE6JnnRnFyDDyUjK+35+M2dkawR/+qwNM=";
};
packageRequires = [ helm dictionary ];
packageRequires = [
dictionary
helm
];
meta = with lib; {
meta = {
homepage = "https://github.com/emacsmirror/helm-words";
description = "Helm extension for looking up words in dictionaries and thesauri";
license = licenses.gpl3Plus;
inherit (emacs.meta) platforms;
license = lib.licenses.gpl3Plus;
};
}

View File

@ -1,32 +1,29 @@
{ lib
, trivialBuild
, fetchFromGitHub
, emacs
, prop-menu
{
lib,
fetchFromGitHub,
melpaBuild,
prop-menu,
}:
trivialBuild rec {
melpaBuild rec {
pname = "idris2-mode";
version = "1.1";
src = fetchFromGitHub {
owner = "idris-community";
repo = pname;
repo = "idris2-mode";
rev = version;
hash = "sha256-rTeVjkAw44Q35vjaERs4uoZRJ6XR3FKplEUCVPHhY7Q=";
};
buildInputs = propagatedUserEnvPkgs;
propagatedUserEnvPkgs = [
packageRequires = [
prop-menu
];
meta = with lib; {
meta = {
homepage = "https://github.com/idris-community/idris2-mode";
description = "This is an emacs mode for editing Idris 2 code";
license = licenses.gpl3Only;
maintainers = with maintainers; [ wuyoli ];
inherit (emacs.meta) platforms;
description = "Emacs mode for editing Idris 2 code";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ wuyoli ];
};
}

View File

@ -1,18 +1,35 @@
{ trivialBuild, lib, fetchurl }:
{
lib,
melpaBuild,
fetchurl
}:
trivialBuild rec {
let
pname = "pod-mode";
version = "1.04";
src = fetchurl {
url = "mirror://cpan/authors/id/F/FL/FLORA/pod-mode-${version}.tar.gz";
sha256 = "1wr0khymkaa65blrc5nya607c1a3sjsww49bbf8f0a6176as71sv";
hash = "sha256-W4ejlTnBKOCQWysRzrXUQwV2gFHeFpbpKkapWT2cIPM=";
};
in
melpaBuild {
inherit pname version src;
meta = with lib; {
outputs = [
"out"
"doc"
];
postInstall = ''
mkdir -p ''${!outputDoc}/share/doc/pod-mode/
install -Dm644 -t ''${!outputDoc}/share/doc/pod-mode/ $sourceRoot/ChangeLog $sourceRoot/README
'';
meta = {
homepage = "https://metacpan.org/dist/pod-mode";
description = "Major mode for editing .pod-files";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ qyliss ];
platforms = platforms.all;
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ qyliss ];
};
}

View File

@ -1,21 +1,22 @@
{ trivialBuild
, lib
, fetchFromGitHub
, avy
, json-rpc-server
, f
, nav-flash
, helm
, cl-lib
, porthole
, default-text-scale
, bind-key
, yasnippet
, company
, company-quickhelp
{
lib,
avy,
bind-key,
cl-lib,
company,
company-quickhelp,
default-text-scale,
f,
fetchFromGitHub,
helm,
json-rpc-server,
melpaBuild,
nav-flash,
porthole,
yasnippet,
}:
trivialBuild {
melpaBuild {
pname = "voicemacs";
version = "0-unstable-2022-02-16";
@ -23,28 +24,29 @@ trivialBuild {
owner = "jcaw";
repo = "voicemacs";
rev = "d91de2a31c68ab083172ade2451419d6bd7bb389";
sha256 = "sha256-/MBB2R9/V0aYZp15e0vx+67ijCPp2iPlgxe262ldmtc=";
hash = "sha256-/MBB2R9/V0aYZp15e0vx+67ijCPp2iPlgxe262ldmtc=";
};
patches = [ ./add-missing-require.patch ];
patches = [ ./0000-add-missing-require.patch ];
packageRequires = [
avy
json-rpc-server
f
nav-flash
helm
cl-lib
porthole
default-text-scale
bind-key
yasnippet
cl-lib
company
company-quickhelp
default-text-scale
f
helm
json-rpc-server
nav-flash
porthole
yasnippet
];
meta = {
description = "Voicemacs is a set of utilities for controlling Emacs by voice";
homepage = "https://github.com/jcaw/voicemacs/";
description = "Set of utilities for controlling Emacs by voice";
license = lib.licenses.gpl3Only;
platforms = lib.platforms.all;
};
}

View File

@ -1,10 +1,10 @@
{ lib
, fetchFromGitHub
, trivialBuild
, emacs
{
lib,
fetchFromGitHub,
melpaBuild,
}:
trivialBuild {
melpaBuild {
pname = "youtube-dl";
version = "1.0-unstable-2018-10-12";
@ -12,14 +12,13 @@ trivialBuild {
owner = "skeeto";
repo = "youtube-dl-emacs";
rev = "af877b5bc4f01c04fccfa7d47a2c328926f20ef4";
sha256 = "sha256-Etl95rcoRACDPjcTPQqYK2L+w8OZbOrTrRT0JadMdH4=";
hash = "sha256-Etl95rcoRACDPjcTPQqYK2L+w8OZbOrTrRT0JadMdH4=";
};
meta = with lib; {
meta = {
description = "Emacs youtube-dl download manager";
homepage = "https://github.com/skeeto/youtube-dl-emacs";
license = licenses.unlicense;
maintainers = with maintainers; [ leungbk ];
inherit (emacs.meta) platforms;
license = lib.licenses.unlicense;
maintainers = with lib.maintainers; [ leungbk ];
};
}