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

Ibus: binding fixes #62392

Merged
merged 3 commits into from Jun 1, 2019
Merged

Ibus: binding fixes #62392

merged 3 commits into from Jun 1, 2019

Conversation

jtojnar
Copy link
Contributor

@jtojnar jtojnar commented Jun 1, 2019

Motivation for this change

Build gi overrides & stop building Python 2 bindings installed to Python 3 directory.

cc @laMudri

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

It is a Python 2 library that we install to Python 3 prefix. Even if it were used by anything it would not work.
@jtojnar
Copy link
Contributor Author

jtojnar commented Jun 1, 2019

It does not seem to be enough to fix #61978

@laMudri
Copy link
Contributor

laMudri commented Jun 1, 2019

It does not seem to be enough to fix #61978

In testing that, have you also added wrapGAppsHook to ibus-table?

@jtojnar
Copy link
Contributor Author

jtojnar commented Jun 1, 2019

Not sure, will double check once I get home.

@jtojnar
Copy link
Contributor Author

jtojnar commented Jun 1, 2019

$ echo 'with import <nixpkgs> { };
mkShell {
  buildInputs = [
    gobject-introspection
    ibus
    (python3.withPackages (p: [p.pygobject3 ibus]))
    wrapGAppsHook
  ];
}
' > ibus-typelib.nix
$ nix-shell ibus-typelib.nix --run python3
Python 3.7.3 (default, Mar 25 2019, 20:59:09)
[GCC 7.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from gi.repository import IBus
__main__:1: PyGIWarning: IBus was imported without specifying a version first. Use gi.require_version('IBus', '1.0') before import to ensure that the right version gets loaded.
>>> IBus.LookupTable(page_size=10, cursor_pos=0, cursor_visible=True, round=True)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: gobject `IBusLookupTable' doesn't support property `page_size'

@jtojnar
Copy link
Contributor Author

jtojnar commented Jun 1, 2019

@jtojnar
Copy link
Contributor Author

jtojnar commented Jun 1, 2019

Hmm, looks like the issue is somewhere else, the overrides from ibus are not even added to the env:

$ ls -l $(nix-build -E 'with import <nixpkgs> {}; (python3.withPackages (p: [p.pygobject3 ibus]))')/lib/python3.7/site-packages
total 44

lrwxrwxrwx 1 root root 101 Jan  1  1970 gi -> /nix/store/7shmlh3agdy31hhh0da2bhk9zzzpg7gp-python3.7-pygobject-3.32.1/lib/python3.7/site-packages/gi

@jtojnar
Copy link
Contributor Author

jtojnar commented Jun 1, 2019

Now I feel stupid. We actually need to use (p.toPythonModule ibus) for Python’s buildEnv to consider the package.

@jtojnar jtojnar merged commit e2fc9ea into NixOS:master Jun 1, 2019
@jtojnar jtojnar deleted the ibus-binding-fixes branch June 1, 2019 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants