Skip to content

Commit

Permalink
Added wrapGAppsHook as nativeBuildInputs
Browse files Browse the repository at this point in the history
I had

```
Traceback (most recent call last):
  File "/nix/store/sg2pb6pyl5w5jw9g2p145c0h6n7ngxvi-workspace-renumber", li
ne 2, in <module>
    from pye_menu import TopMenu, SubMenu, MenuItem, SubMenuItem, ExecMenuI
tem
  File "/nix/store/wq8m6gxcwbi5502javwkc7drvmh5sk7g-python3-3.7.5-env/lib/python3.7/site-packages/pye_menu.py", line 6, in <module>
    gi.require_versions({'Gtk': '3.0', 'PangoCairo': '1.0'})
  File "/nix/store/wq8m6gxcwbi5502javwkc7drvmh5sk7g-python3-3.7.5-env/lib/p
ython3.7/site-packages/gi/__init__.py", line 152, in require_versions
    require_version(module_name, module_version)
  File "/nix/store/wq8m6gxcwbi5502javwkc7drvmh5sk7g-python3-3.7.5-env/lib/p
ython3.7/site-packages/gi/__init__.py", line 129, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Gtk not available
```

when trying to use it as a library. See

NixOS/nixpkgs#16285
NixOS/nixpkgs#56943
  • Loading branch information
Kovacsics Robert committed Dec 10, 2019
1 parent 70ea27d commit cb16a98
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ in
{ python3 ? nixpkgs.python3,
gtk3-x11 ? nixpkgs.gtk3-x11,
gobjectIntrospection ? nixpkgs.gobjectIntrospection,
wrapGAppsHook ? nixpkgs.wrapGAppsHook,
lib ? nixpkgs.lib
}:
python3.pkgs.buildPythonPackage rec {
pname = "pye-menu";
version = "1.0";
src = ./.;
propagatedBuildInputs = with python3.pkgs; [ pygobject3 pycairo ];
nativeBuildInputs = [ wrapGAppsHook ];
buildInputs = [ gtk3-x11 gobjectIntrospection ];

meta = with lib; {
Expand Down

0 comments on commit cb16a98

Please sign in to comment.