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
Orca: init 3.26.0 #32866
Orca: init 3.26.0 #32866
Conversation
Remark: I reverted from the last unstable release to the last stable release. The sha256 for fetchFromGithub did not need to change. Is that expected? |
If you already have something with a certain hash in your nix store, the URL will not get downloaded. You can try using |
name = "orca-${version}"; | ||
version = "3.26.0"; | ||
# Tags in git are in the form of "ORCA_3_27_3" | ||
gittag = concatStrings [ "ORCA_" (stringAsChars (x: if x == "." then "_" else x) version) ]; |
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 could use "ORCA_${builtins.replaceStrings [ "." ] [ "_" ] version}"
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.
Much nicer indeed.
# export GSTREAMER_CFLAGS=${gst_all_1.gstreamer}/include | ||
# ''; | ||
|
||
wrapPrefixVariables = [ "PYTHONPATH" "GST_PLUGIN_SYSTEM_PATH_1_0" ]; |
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.
GST_PLUGIN_SYSTEM_PATH_1_0
is already wrapped by default.
for v in $wrapPrefixVariables GST_PLUGIN_SYSTEM_PATH_1_0 GI_TYPELIB_PATH GRL_PLUGIN_PATH; do |
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.
Also if you use python3Packages.buildPythonApplication
, you will not need to wrap PYTHONPATH
.
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.
buildPythonApplication unsuccessfully looks for setup.py.
Orca uses automake.
GST_PLUGIN_SYSTEM_PATH_1_0 was added in an attempt to fix the gst-python issue. Removing it now.
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.
As for autotools, see the format
attribute mentioned above.
pkgs/top-level/all-packages.nix
Outdated
@@ -16247,6 +16247,10 @@ with pkgs; | |||
|
|||
opera = callPackage ../applications/networking/browsers/opera {}; | |||
|
|||
orca = python3Packages.callPackage ../applications/misc/orca { | |||
yelp-tools = gnome3.yelp_tools; |
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.
Could you use inherit (gnome3) yelp_tools
and use the name with the underscore in the derivation? #32804 will convert it to dash soon and this would then become repetitive.
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 you really want.
My objection: Changing to yelp_tools
(and back later) would need edits in several places (3 lines in 2 files). Keeping it as it is, would make the change a oneliner in all-packages.nix
, so no need for anyone else to touch orca/default.nix
.
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.
I will replace the underscores in all the files by a script. This would save me manual work.
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.
Done
Needs `services.gnoom3.at-spi2-core.enable = true;` in `configuration.nix`. | ||
''; | ||
maintainers = gnome3.maintainers ++ [ berce ]; | ||
license = licenses.lgpl2; |
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.
It should be lgpl21
according to https://github.com/GNOME/orca/blob/ORCA_3_26_0/COPYING
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.
Done, nice catch.
Gtk+ toolkit, the Java platform's Swing toolkit, LibreOffice, Gecko, and | ||
WebKitGtk. AT-SPI support for the KDE Qt toolkit is being pursued. | ||
|
||
Needs `services.gnoom3.at-spi2-core.enable = true;` in `configuration.nix`. |
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.
gnoom3
→ gnome3
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.
Done
# Tags in git are in the form of "ORCA_3_27_3" | ||
gittag = concatStrings [ "ORCA_" (stringAsChars (x: if x == "." then "_" else x) version) ]; | ||
|
||
src = fetchFromGitHub { |
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.
The GNOME mirror is preferred for GNOME packages:
--- a/pkgs/applications/misc/orca/default.nix
+++ b/pkgs/applications/misc/orca/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, pkgconfig, fetchFromGitHub, pkgs
+{ stdenv, lib, pkgconfig, fetchurl, pkgs
, autoreconfHook, wrapGAppsHook
, intltool, yelp-tools, itstool, libxmlxx3
, python, pygobject3, gtk3
@@ -14,17 +14,15 @@
with lib;
#pkgs.python3Packages.buildPythonPackage rec {
-stdenv.mkDerivation rec {
- name = "orca-${version}";
+let
version = "3.26.0";
- # Tags in git are in the form of "ORCA_3_27_3"
- gittag = concatStrings [ "ORCA_" (stringAsChars (x: if x == "." then "_" else x) version) ];
+ majorVersion = builtins.concatStringsSep "." (take 2 (splitString "." version));
+in stdenv.mkDerivation rec {
+ name = "orca-${version}";
- src = fetchFromGitHub {
- owner = "GNOME";
- repo = "orca";
- rev = gittag;
- sha256 = "0xpg7zgkp0kvcfpsfclrm3ssz4ryryfvk7vzbg8d18bdgw0zdw3b";
+ src = fetchurl {
+ url = "mirror://gnome/sources/orca/${majorVersion}/${name}.tar.xz";
+ sha256 = "0xk5k9cbswymma60nrfj00dl97wypx59c107fb1hwi75gm0i07a7";
};
# doCheck = true;
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.
Done, builds, runs.
nativeBuildInputs = [ autoreconfHook wrapGAppsHook pkgconfig libxmlxx3 | ||
intltool yelp-tools itstool ]; | ||
|
||
buildInputs = [ python pygobject3 gtk3 pyatspi dbus-python xkbcomp |
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.
All the python libraries need to be in propagatedBuildInputs
, see https://nixos.org/nixpkgs/manual/#handling-dependencies
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.
I suspect the manual is wrong there. I added this to issue #13686.
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.
As vcunat mentions, unfortunately python derivations behave differently than propagatedBuildInputs
is intended to be used.
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.
As it builds and runs fine, do you still want me to use the propagetedBuldInputs
?
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.
}: | ||
|
||
with lib; | ||
#pkgs.python3Packages.buildPythonPackage rec { |
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.
- Import directly
python3Packages
instead of usingpkgs
. buildPythonApplication
should be used instead ofbuildPythonPackage
.- You need to add
format = "other"
to be able to build it.
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.
I took it one step further and imported buildPythonApplication
.
format = "other";
did solve the error about not finding setyp.py
indeed.
|
||
wrapPrefixVariables = [ "PYTHONPATH" "GST_PLUGIN_SYSTEM_PATH_1_0" ]; | ||
|
||
preInstall = '' |
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.
Substitution like these are best done in the postPatch
phase so they are available in all the subsequent phases (especially checkPhase
which is before installPhase
).
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.
Done, thanks.
Reading this, I somehow managed to guess we are missing |
, intltool, yelp_tools, itstool, libxmlxx3 | ||
, python, pygobject3, gtk3, gnome3 | ||
, at_spi2_atk, at_spi2_core, pyatspi, dbus, dbus-python, pyxdg | ||
, louis ? null |
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.
What is that supposed to be?
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.
louis or liblouis is a requirement to support braille, but it doesn't exist yet in nixpkgs (or I couldn't find it). One of the reasons it's WIP.
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.
A TODO comment next to buildInputs
is probably a better place to mention it. Arguments for non-existing variables are quite confusing.
sha256 = "0xk5k9cbswymma60nrfj00dl97wypx59c107fb1hwi75gm0i07a7"; | ||
}; | ||
|
||
# doCheck = true; |
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 can be either removed or uncommented?
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.
Done
The code looks fine, however I do not hear any sound from Orca. |
@@ -61,7 +61,7 @@ in buildPythonApplication rec { | |||
|
|||
Needs `services.gnome3.at-spi2-core.enable = true;` in `configuration.nix`. | |||
''; | |||
maintainers = gnome3.maintainers ++ [ maintainters.berce ]; | |||
maintainers = gnome3.maintainers ++ [ stdenv.lib.maintainters.berce ]; |
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.
lib
is already in scope, the issue is a typo maintainTers
No sound here either, but I 'm not in Gnome I was hoping that was the cause. Now the code seems fine, I 'll setup a test environment ... WIP :-) The Grahamc checks always fail with an error about not finding maintainers. It builds fine on my machine. Any suggestions? How can I make it fail on my system too, for quicker testing? |
|
From irc://irc.gnome.org#a11y:
They are right, speechd does not work: |
Thank you for all the quick and educative feedback. I 'll try solving the remaining issues and post them back here. I expect it will take some time. |
Apparently, you need to change the speech synthesiser. |
I added PR #32924 for a more suited speechd. To try run: |
I cleaned it up a little, making the optional packages required, adding |
Great work! Merry Christmas! |
The help button does not work for me. It may be related to not running in a DE. |
I did not really test it. Orca suggests xw driver, which is not built on Nix because it requires some GUI toolkit or something (https://github.com/brltty/brltty/blob/8d0c5c3dc4a22dcc85f5a129e73388375405521e/configure.ac#L1527). For help, you probably need to have |
Thanks. |
Motivation for this change
Also visually impaired people should be able to enjoy the magic of nix.
Orca is part of Gnome.
It builds, some parts run.
The main issue is withgst-python
now. I 'd like some help to fix this.Braille won't be supported until
brlapi
andbecomes available.liblouis
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)