From e8f703ab9bfa90dd0e16b246463f103579c00aab Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 2 Jun 2024 21:11:33 +0300 Subject: [PATCH 1/5] libratbag: fix `ratbagctl` typelib error `ImportError: cannot import name Gio, introspection typelib not found` --- pkgs/os-specific/linux/libratbag/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/libratbag/default.nix b/pkgs/os-specific/linux/libratbag/default.nix index a35ab1dcc01c..3a13c53cf586 100644 --- a/pkgs/os-specific/linux/libratbag/default.nix +++ b/pkgs/os-specific/linux/libratbag/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config +{ lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config, wrapGAppsNoGuiHook, gobject-introspection , glib, systemd, udev, libevdev, gitMinimal, check, valgrind, swig, python3 , json-glib, libunistring }: @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ - meson ninja pkg-config gitMinimal swig check valgrind + meson ninja pkg-config gitMinimal swig check valgrind wrapGAppsNoGuiHook gobject-introspection ]; buildInputs = [ From 43cdb75ca3f0bac2ce1485c9936cb13e193efd01 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 2 Jun 2024 21:22:54 +0300 Subject: [PATCH 2/5] openrazer-daemon: Fix typelib error `ImportError: cannot import name GLib, introspection typelib not found` --- pkgs/development/python-modules/openrazer/daemon.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/python-modules/openrazer/daemon.nix b/pkgs/development/python-modules/openrazer/daemon.nix index 6fafcec4a38b..05f7ee5ed48d 100644 --- a/pkgs/development/python-modules/openrazer/daemon.nix +++ b/pkgs/development/python-modules/openrazer/daemon.nix @@ -12,6 +12,7 @@ setuptools, wrapGAppsNoGuiHook, notify2, + glib }: let @@ -34,6 +35,10 @@ buildPythonPackage (common // { nativeBuildInputs = [ setuptools wrapGAppsNoGuiHook ]; + buildInputs = [ + glib + ]; + propagatedBuildInputs = [ daemonize dbus-python From 0e87e55595031aad7369a8f21086a0b5ad168588 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 2 Jun 2024 21:28:39 +0300 Subject: [PATCH 3/5] openrazer-daemon: move deps to correct attributes --- pkgs/development/python-modules/openrazer/daemon.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/openrazer/daemon.nix b/pkgs/development/python-modules/openrazer/daemon.nix index 05f7ee5ed48d..e2fd6cae9e71 100644 --- a/pkgs/development/python-modules/openrazer/daemon.nix +++ b/pkgs/development/python-modules/openrazer/daemon.nix @@ -33,17 +33,16 @@ buildPythonPackage (common // { --replace-fail "plugdev" "openrazer" ''; - nativeBuildInputs = [ setuptools wrapGAppsNoGuiHook ]; + nativeBuildInputs = [ setuptools wrapGAppsNoGuiHook gobject-introspection ]; buildInputs = [ glib + gtk3 ]; propagatedBuildInputs = [ daemonize dbus-python - gobject-introspection - gtk3 pygobject3 pyudev setproctitle From b75575e178906486edb72c05ad0e65c45ca7a215 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 2 Jun 2024 21:46:20 +0300 Subject: [PATCH 4/5] whipper: Fix typelib error `ImportError: cannot import name GLib, introspection typelib not found` --- pkgs/applications/audio/whipper/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/audio/whipper/default.nix b/pkgs/applications/audio/whipper/default.nix index 53d7262d78df..3af08cce73d0 100644 --- a/pkgs/applications/audio/whipper/default.nix +++ b/pkgs/applications/audio/whipper/default.nix @@ -3,9 +3,12 @@ , fetchFromGitHub , fetchpatch , installShellFiles +, wrapGAppsNoGuiHook +, gobject-introspection , libcdio-paranoia , cdrdao , libsndfile +, glib , flac , sox , util-linux @@ -37,6 +40,8 @@ in python3.pkgs.buildPythonApplication rec { nativeBuildInputs = with python3.pkgs; [ installShellFiles + wrapGAppsNoGuiHook + gobject-introspection setuptools-scm docutils @@ -54,7 +59,7 @@ in python3.pkgs.buildPythonApplication rec { setuptools ]; - buildInputs = [ libsndfile ]; + buildInputs = [ libsndfile glib ]; nativeCheckInputs = with python3.pkgs; [ twisted @@ -62,8 +67,11 @@ in python3.pkgs.buildPythonApplication rec { makeWrapperArgs = [ "--prefix" "PATH" ":" (lib.makeBinPath bins) + "\${gappsWrapperArgs[@]}" ]; + dontWrapGApps = true; + outputs = [ "out" "man" ]; postBuild = '' make -C man From 581b56878481bf9066571eb734faa640d08a2ff7 Mon Sep 17 00:00:00 2001 From: Artturin Date: Thu, 6 Jun 2024 15:22:39 +0300 Subject: [PATCH 5/5] targetcli: fix typelib error Add pygobject3,glib,gobject-introspection to not rely on something propagating them --- pkgs/os-specific/linux/targetcli/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/targetcli/default.nix b/pkgs/os-specific/linux/targetcli/default.nix index 6058b3509772..c30f64589bb8 100644 --- a/pkgs/os-specific/linux/targetcli/default.nix +++ b/pkgs/os-specific/linux/targetcli/default.nix @@ -1,4 +1,4 @@ -{ lib, python3, fetchFromGitHub, nixosTests }: +{ lib, python3, fetchFromGitHub, nixosTests, wrapGAppsNoGuiHook, gobject-introspection, glib }: python3.pkgs.buildPythonApplication rec { pname = "targetcli"; @@ -11,7 +11,10 @@ python3.pkgs.buildPythonApplication rec { hash = "sha256-9QYo7jGk9iWr26j0qPQCqYsJ+vLXAsO4Xs7+7VT9/yc="; }; - propagatedBuildInputs = with python3.pkgs; [ configshell rtslib ]; + nativeBuildInputs = [ wrapGAppsNoGuiHook gobject-introspection ]; + buildInputs = [ glib ]; + + propagatedBuildInputs = with python3.pkgs; [ configshell rtslib pygobject3 ]; postInstall = '' install -D targetcli.8 -t $out/share/man/man8/