Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emacspeak: 58.0 -> 59.0 #291953

Merged
merged 4 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ let
inherit (self) callPackage;
in
{
inherit (pkgs) emacspeak;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applying this patch can fix issues mentioned here. However, whether this package should be moved to "by-name" needs discussion.

-   inherit (pkgs) emacspeak;
+   emacspeak = pkgs.emacspeak.override { emacs = self.emacs; };


acm = callPackage ./manual-packages/acm { };

acm-terminal = callPackage ./manual-packages/acm-terminal { };
Expand All @@ -31,8 +33,6 @@ in

elisp-ffi = callPackage ./manual-packages/elisp-ffi { };

emacspeak = callPackage ./manual-packages/emacspeak { };

ess-R-object-popup = callPackage ./manual-packages/ess-R-object-popup { };

evil-markdown = callPackage ./manual-packages/evil-markdown { };
Expand Down
Original file line number Diff line number Diff line change
@@ -1,34 +1,37 @@
{ lib
, stdenv
, emacs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Directly pulling in emacs has some issues:

  • the unneeded emacs is in the closure of emacs-nox.pkgs.emacspeak
  • native compilation results of emacs-nox.pkgs.emacspeak, if generated, will not be used by emacs-nox

BTW, the directory structure of $out is probably wrong because it is quite different from other packages in emacsPackages.

, espeak-ng
, fetchFromGitHub
, makeWrapper
, emacs
, stdenv
, tcl
, tclx
, espeak-ng
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "emacspeak";
version = "58.0";
version = "59.0";

src = fetchFromGitHub {
owner = "tvraman";
repo = pname;
rev = version;
hash= "sha256-5pWC17nvy3ZuG0bR//LqDVpKsH5hFSFf63Q33a1BfBk=";
repo = "emacspeak";
rev = finalAttrs.version;
hash = "sha256-npS/wlqI7nBde/2S/rzp79jdfYXIIhgsVs5VizxEDAQ=";
};

nativeBuildInputs = [
emacs
makeWrapper
];

buildInputs = [
espeak-ng
tcl
tclx
];

strictDeps = true;

preConfigure = ''
make config
'';
Expand All @@ -44,17 +47,21 @@ stdenv.mkDerivation rec {
cp -a . "$d"
find "$d" \( -type d -or \( -type f -executable \) \) -execdir chmod 755 {} +
find "$d" -type f -not -executable -execdir chmod 644 {} +
makeWrapper ${emacs}/bin/emacs $out/bin/emacspeak \
makeWrapper ${lib.getExe emacs} $out/bin/emacspeak \
--set DTK_PROGRAM "${placeholder "out"}/share/emacs/site-lisp/emacspeak/servers/espeak" \
--set TCLLIBPATH "${tclx}/lib" \
--add-flags '-l "${placeholder "out"}/share/emacs/site-lisp/emacspeak/lisp/emacspeak-setup.elc"'
'';

meta = with lib; {
meta = {
homepage = "https://github.com/tvraman/emacspeak/";
description = "Emacs extension that provides spoken output";
license = licenses.gpl2Plus;
maintainers = [ maintainers.AndersonTorres ];
platforms = platforms.linux;
changelog = "https://github.com/tvraman/emacspeak/blob/${finalAttrs.src.rev}/etc/NEWS";
license = with lib.licenses; [ gpl2Plus ];
mainProgram = "emacspeak";
maintainers = with lib.maintainers; [ AndersonTorres ];
platforms = lib.platforms.linux;
# Emacspeak requires a minimal Emacs version; let's use the broken flag
broken = lib.versionOlder (lib.getVersion emacs) "29.1";
};
}
})
Loading