Unverified Commit 36cb8eaf authored by Lin Jian's avatar Lin Jian Committed by GitHub
Browse files

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

mini-treewide: use melpabuild in some Elisp packages
parents de19b7ea 411b0251
Loading
Loading
Loading
Loading
+15 −36
Original line number Diff line number Diff line
{ 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 ];
  };
}
+9 −8
Original line number Diff line number Diff line
{ 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 ];
  };
}
+10 −11
Original line number Diff line number Diff line
{ 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 ];
  };
}
+11 −14
Original line number Diff line number Diff line
{ 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 ];
  };
}
+9 −10
Original line number Diff line number Diff line
{ 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 ];
  };
}
Loading