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: init at 51.0 #73957
emacspeak: init at 51.0 #73957
Conversation
Thank you for your contribution! Emacs packages should go in the emacs package set, this one should go in https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/emacs-modes/manual-packages.nix. This is not only an organisational thing but also so that functions like |
cd servers/native-espeak | ||
make DESTDIR=$out install | ||
cd ../../ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems odd. Do you have to call a specific Makefile?
makeFlags = [ "DESTDIR=${placeholder "out"}" ];
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, there's a separate Makefile that builds tclespeak.so
. Main Makefile doesn't do install. It just prints message to add current folder to emacs config. Could you explain a bit about placeholder
? $out
is deprecated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in most situations, there's no difference. From what I understand, placeholder just ensures that a variable doesn't get resolved until the last possible second. I don't remember the exact scenarios in which it was necessary to add the placeholder feature tbh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but these three lines could be condensed to:
make -C servers/native-espeak DESTDIR=$out install
Moved |
Please also move the expression itself. |
done! |
make espeak | ||
''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix alignment please
sha256 = "043mn3rr48gx2mi4rnkcvp09fwhs88yyqcszavkzvvd57mh4vd0h"; | ||
}; | ||
|
||
nativeBuildInputs = [rsync gnused] ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nativeBuildInputs = [rsync gnused] ; | |
nativeBuildInputs = [ rsync gnused ] ; |
homepage = https://github.com/tvraman/emacspeak/; | ||
description = "Emacs extension that provides spoken output"; | ||
license = licenses.gpl2; | ||
maintainers = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you mind adding yourself as a maintainer? mostly just so you get notified if this gets bumped. Then you can verify that the software still works.
Could you, please re-review PR. I got back to nixos after rage quitting it last autumn after fighting with nix language. But it's too attractive in it's core so I decided to return again :-) |
nativeBuildInputs = [ rsync gnused ]; | ||
buildInputs = [ emacs tcl tclx espeak-ng ]; | ||
postPatch = '' | ||
substituteInPlace servers/native-espeak/Makefile --replace '/usr/include/tcl$(TCL_VERSION)' ${tcl}/include |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can overwrite both setting:
makeFlags = [ "TCL_INCLUDE=${tcl}/include" "LIBPARENTDIR = /" ];
''; | ||
|
||
postBuild = '' | ||
make espeak |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makeFlags won't be effective here, but make espeak
just calls servers/native-espeak/Makefile
. So you can also do this:
make -C servers/native-espeak "TCL_INCLUDE=${tcl}/include" "LIBPARENTDIR=/"
sha256 = "06azq2566pj4pnyawqm9387ybp3wr1pr6828hhdxhki4dpn9pj8g"; | ||
}; | ||
|
||
nativeBuildInputs = [ rsync gnused ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sed is already in stdenv.
nativeBuildInputs = [ rsync gnused ]; | |
nativeBuildInputs = [ rsync ]; |
}; | ||
|
||
nativeBuildInputs = [ rsync gnused ]; | ||
buildInputs = [ emacs tcl tclx espeak-ng ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If emacs is used during the build for byte-compiling, it should be in nativeBuildInputs
.
|
||
src = fetchFromGitHub { | ||
owner = "tvraman"; | ||
repo = "emacspeak"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Archlinux they seem to use the release tarball.
This should contain less irrelevant files:
https://github.com/tvraman/emacspeak/blob/master/Makefile#L74
https://github.com/tvraman/emacspeak/releases/download/51.0/emacspeak-51.0.tar.bz2
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=emacspeak
Updated as per suggestions and took installation code from arch package :), looks a bit cleaner. |
Forgot to push even more clean version :) |
This usually causes less problems w.r.t. hard-codes paths.
This was working for me now:
I heard espeak reading out emacs. |
Closes #70261
Motivation for this change
New package
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Needs to be tested by users of emacspeak. There're a lot of irrelevant files in the sources like blog posts, speeches, radio playlists and so on. I copied what I think is needed to run it. But I don't know how to use emacspeak, so we need some real user to test if it works.
Notify maintainers
I didn't set
meta.maintainers
field