-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
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
setup hook of gobject-introspection in nativeBuildInputs does not run with strictDeps #56943
Comments
I think this is another issue caused
We will need to fix the setup hook? cc @Ericson2314 @hedning |
gobject-introspection is a terrible thing that makes cross compilation impossible. Try adding it as both as a CC @eternaleye |
Is there nothing else we can do to make |
It is even more serious with import <nixpkgs> {};
stdenv.mkDerivation {
name = "setup-hook-test";
unpackPhase = ":";
dontBuild = true;
nativeBuildInputs = [ wrapGAppsHook ];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
touch $out/bin/test
chmod +x $out/bin/test
runHook postInstall
'';
} does not even pick up the nixpkgs/pkgs/top-level/all-packages.nix Lines 394 to 396 in 4a48f6a
for #! /nix/store/cinw572b38aln37glr0zb8lxwrgaffl4-bash-4.4-p23/bin/bash -e
export GIO_EXTRA_MODULES='/nix/store/h9wqk3nx4h020xrvha2si7y01alk337w-dconf-0.30.1-lib/lib/gio/modules'${GIO_EXTRA_MODULES:+':'}$GIO_EXTRA_MODULES
export GIO_EXTRA_MODULES='/nix/store/h9wqk3nx4h020xrvha2si7y01alk337w-dconf-0.30.1-lib/lib/gio/modules'${GIO_EXTRA_MODULES:+':'}$GIO_EXTRA_MODULES
exec -a "$0" "/nix/store/16khixg577v3f2bdfs30mhj6n8l6hsq2-setup-hook-test/bin/.test-wrapped" "${extraFlagsArray[@]}" "$@" are setup hooks not propagated any more? If I add with import <nixpkgs> {};
stdenv.mkDerivation {
name = "setup-hook-test";
unpackPhase = ":";
dontBuild = true;
buildInputs = [ ];
nativeBuildInputs = [ wrapGAppsHook gdk_pixbuf ];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
touch $out/bin/test
chmod +x $out/bin/test
runHook postInstall
'';
} #! /nix/store/cinw572b38aln37glr0zb8lxwrgaffl4-bash-4.4-p23/bin/bash -e
export GIO_EXTRA_MODULES='/nix/store/h9wqk3nx4h020xrvha2si7y01alk337w-dconf-0.30.1-lib/lib/gio/modules'${GIO_EXTRA_MODULES:+':'}$GIO_EXTRA_MODULES
export GIO_EXTRA_MODULES='/nix/store/h9wqk3nx4h020xrvha2si7y01alk337w-dconf-0.30.1-lib/lib/gio/modules'${GIO_EXTRA_MODULES:+':'}$GIO_EXTRA_MODULES
export GDK_PIXBUF_MODULE_FILE='/nix/store/w073vf5lhf08n1pg77qsinq5qqdaymqy-librsvg-2.44.12/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache'
export XDG_DATA_DIRS='/nix/store/ialw7015yr8wm578d4j09fi3ay5hk96c-gtk+3-3.24.5/share/gsettings-schemas/gtk+3-3.24.5:/nix/store/ialw7015yr8wm578d4j09fi3ay5hk96c-gtk+3-3.24.5/share/gsettings-schemas/gtk+3-3.24.5:/nix/store/ialw7015yr8wm578d4j09fi3ay5hk96c-gtk+3-3.24.5/share/gsettings-schemas/gtk+3-3.24.5'${XDG_DATA_DIRS:+':'}$XDG_DATA_DIRS
exec -a "$0" "/nix/store/pfk5qj7gnhjzkmklyns7svdmqqc8afkh-setup-hook-test/bin/.test-wrapped" "${extraFlagsArray[@]}" "$@" But I guess since |
As a last resort |
Still need to fix the underlying issue. |
Listing twice is not a hack in my mind. It is the proper way to indicate that a dependency is both a build and run time dependency. |
For that second issue, I don't remember setup hooks being automatically propagated ever, but a setup can propagate a dependency that it will itself pick up. |
Well, in my mind, it is not a run time dependency (at least not a direct one). Most of the time, it is only used during build for the setup hook. |
After discussion on IRC we have decided to move |
Fixed by 71cbf3b gobject-introspection has to in nativeBuildInputs for the hook to work properly if a typelib from gobject-introspection is needed then gobject-introspection has to be added to buildInputs (until #189215 is in master)
|
Fixes the following error when trying to run the final script: Traceback (most recent call last): File "/nix/store/z1klbgg6p9v3vszjyvsjix9s4blsl7mv-gkraken-1.2.0/bin/.gkraken-wrapped", line 45, in <module> gi.require_version('Gtk', '3.0') File "/nix/store/k46f21qglnnl2grkx6gq6j6jlawfkgpw-python3.10-pygobject-3.42.2/lib/python3.10/site-packages/gi/__init__.py", line 126, in require_version raise ValueError('Namespace %s not available' % namespace) ValueError: Namespace Gtk not available See NixOS#56943
Fixes the following error when trying to run the final script: Traceback (most recent call last): File "/nix/store/z1klbgg6p9v3vszjyvsjix9s4blsl7mv-gkraken-1.2.0/bin/.gkraken-wrapped", line 45, in <module> gi.require_version('Gtk', '3.0') File "/nix/store/k46f21qglnnl2grkx6gq6j6jlawfkgpw-python3.10-pygobject-3.42.2/lib/python3.10/site-packages/gi/__init__.py", line 126, in require_version raise ValueError('Namespace %s not available' % namespace) ValueError: Namespace Gtk not available See #56943 (cherry picked from commit 901a78b)
checked with diffoscope+difflog and launching the programs i have fixed that issue in my other gir PRs
checked with diffoscope+difflog and launching the programs i have fixed that issue in my other gir PRs
* do not do double wrapping. See: https://github.com/NixOS/nixpkgs/blob/nixos-23.11/doc/languages-frameworks/gnome.section.md#when-using-wrapgappshook-with-special-derivers-you-can-end-up-with-double-wrapped-binaries-ssec-gnome-common-issues-double-wrapped there is probably a better of doing this, but for now this works. * finally fix gi issues, NixOS/nixpkgs#56943 (comment) helped, but including wrapGAppsHook was also part of the fix. * cleanup dependencies, there is no need for gi to exist in propagatedBuildInputs and BuildInputs.
Issue description
virt-manager
fails to load and instead produces the error "Namespace LibvirtGLib not available"I'm aware of #33754 and #34000. I have the changes in the merged commit. Yet, I receive the error.
Steps to reproduce
virt-manager
virt-manager
Technical details
"x86_64-linux"
Linux 4.14.104, NixOS, 19.09.git.27cb066 (Loris)
yes
yes
nix-env (Nix) 2.2
"nixos-19.09pre171582.26d8a8c0eb2"
/nix/var/nix/profiles/per-user/root/channels/nixos
NOTE: My
nixpkgs
is not as shown above but rather a clone of this repo at commit 27cb066The text was updated successfully, but these errors were encountered: