chromium,chromedriver: 129.0.6668.91 -> 129.0.6668.100
[NixPkgs.git] / pkgs / by-name / em / emacspeak / package.nix
blob6c18af7807ea9467da7f401e6f7e1f64a88ef1a9
1 { lib
2 , emacs
3 , espeak-ng
4 , fetchFromGitHub
5 , makeWrapper
6 , stdenv
7 , tcl
8 , tclx
9 }:
11 stdenv.mkDerivation (finalAttrs: {
12   pname = "emacspeak";
13   version = "59.0";
15   src = fetchFromGitHub {
16     owner = "tvraman";
17     repo = "emacspeak";
18     rev = finalAttrs.version;
19     hash = "sha256-npS/wlqI7nBde/2S/rzp79jdfYXIIhgsVs5VizxEDAQ=";
20   };
22   nativeBuildInputs = [
23     emacs
24     makeWrapper
25   ];
27   buildInputs = [
28     espeak-ng
29     tcl
30     tclx
31   ];
33   strictDeps = true;
35   preConfigure = ''
36     make config
37   '';
39   postBuild = ''
40     make -C servers/native-espeak PREFIX=$out "TCL_INCLUDE=${tcl}/include"
41   '';
43   postInstall = ''
44     make -C servers/native-espeak PREFIX=$out install
45     local d=$out/share/emacs/site-lisp/emacspeak/
46     install -d -- "$d"
47     cp -a .  "$d"
48     find "$d" \( -type d -or \( -type f -executable \) \) -execdir chmod 755 {} +
49     find "$d" -type f -not -executable -execdir chmod 644 {} +
50     makeWrapper ${lib.getExe emacs} $out/bin/emacspeak \
51         --set DTK_PROGRAM "${placeholder "out"}/share/emacs/site-lisp/emacspeak/servers/espeak" \
52         --set TCLLIBPATH "${tclx}/lib" \
53         --add-flags '-l "${placeholder "out"}/share/emacs/site-lisp/emacspeak/lisp/emacspeak-setup.elc"'
54   '';
56   meta = {
57     homepage = "https://github.com/tvraman/emacspeak/";
58     description = "Emacs extension that provides spoken output";
59     changelog = "https://github.com/tvraman/emacspeak/blob/${finalAttrs.src.rev}/etc/NEWS";
60     license = with lib.licenses; [ gpl2Plus ];
61     mainProgram = "emacspeak";
62     maintainers = with lib.maintainers; [ AndersonTorres ];
63     platforms = lib.platforms.linux;
64     # Emacspeak requires a minimal Emacs version; let's use the broken flag
65     broken = lib.versionOlder (lib.getVersion emacs) "29.1";
66   };