diff options
author | Anderson Torres <torres.anderson.85@protonmail.com> | 2024-02-27 21:42:50 -0300 |
---|---|---|
committer | Anderson Torres <torres.anderson.85@protonmail.com> | 2024-02-28 18:31:31 -0300 |
commit | 299f6e16e4df53be5e817a339f613b94e4bf08ad (patch) | |
tree | f5798ced3f4e37de5e00d3a79807a0d9bbf29c1b /pkgs/by-name/em | |
parent | 816cae3ee3bc6161f471e64535474d785aef9abb (diff) |
emacspeak: migrate to by-name
Also, keep a green alias in order to not break things.
Diffstat (limited to 'pkgs/by-name/em')
-rw-r--r-- | pkgs/by-name/em/emacspeak/package.nix | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/pkgs/by-name/em/emacspeak/package.nix b/pkgs/by-name/em/emacspeak/package.nix new file mode 100644 index 0000000000000..5294623584da0 --- /dev/null +++ b/pkgs/by-name/em/emacspeak/package.nix @@ -0,0 +1,60 @@ +{ lib +, stdenv +, fetchFromGitHub +, makeWrapper +, emacs +, tcl +, tclx +, espeak-ng +}: + +stdenv.mkDerivation rec { + pname = "emacspeak"; + version = "58.0"; + + src = fetchFromGitHub { + owner = "tvraman"; + repo = pname; + rev = version; + hash= "sha256-5pWC17nvy3ZuG0bR//LqDVpKsH5hFSFf63Q33a1BfBk="; + }; + + nativeBuildInputs = [ + emacs + makeWrapper + ]; + buildInputs = [ + espeak-ng + tcl + tclx + ]; + + preConfigure = '' + make config + ''; + + postBuild = '' + make -C servers/native-espeak PREFIX=$out "TCL_INCLUDE=${tcl}/include" + ''; + + postInstall = '' + make -C servers/native-espeak PREFIX=$out install + local d=$out/share/emacs/site-lisp/emacspeak/ + install -d -- "$d" + 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 \ + --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; { + homepage = "https://github.com/tvraman/emacspeak/"; + description = "Emacs extension that provides spoken output"; + license = licenses.gpl2Plus; + maintainers = [ maintainers.AndersonTorres ]; + platforms = platforms.linux; + }; +} |