Skip to content

Commit

Permalink
treewide: remove issue NixOS#56943 workarounds
Browse files Browse the repository at this point in the history
checked with diffoscope+difflog and launching the programs

i have fixed that issue in my other gir PRs
  • Loading branch information
Artturin committed Feb 10, 2023
1 parent aaa9ea8 commit 431dbdc
Show file tree
Hide file tree
Showing 47 changed files with 29 additions and 168 deletions.
4 changes: 0 additions & 4 deletions doc/languages-frameworks/gnome.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,6 @@ For convenience, it also adds `dconf.lib` for a GIO module implementing a GSetti

- []{#ssec-gnome-hooks-gobject-introspection} `gobject-introspection` setup hook populates `GI_TYPELIB_PATH` variable with `lib/girepository-1.0` directories of dependencies, which is then added to wrapper by `wrapGAppsHook`. It also adds `share` directories of dependencies to `XDG_DATA_DIRS`, which is intended to promote GIR files but it also [pollutes the closures](https://github.com/NixOS/nixpkgs/issues/32790) of packages using `wrapGAppsHook`.

::: {.warning}
The setup hook [currently](https://github.com/NixOS/nixpkgs/issues/56943) does not work in expressions with `strictDeps` enabled, like Python packages. In those cases, you will need to disable it with `strictDeps = false;`.
:::

- []{#ssec-gnome-hooks-gst-grl-plugins} Setup hooks of `gst_all_1.gstreamer` and `grilo` will populate the `GST_PLUGIN_SYSTEM_PATH_1_0` and `GRL_PLUGIN_PATH` variables, respectively, which will then be added to the wrapper by `wrapGAppsHook`.

You can also pass additional arguments to `makeWrapper` using `gappsWrapperArgs` in `preFixup` hook:
Expand Down
5 changes: 1 addition & 4 deletions pkgs/applications/audio/blanket/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ python3Packages.buildPythonApplication rec {
pkg-config
wrapGAppsHook4
desktop-file-utils
gobject-introspection
];

buildInputs = [
glib
gtk4
libadwaita
gobject-introspection
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
Expand All @@ -48,9 +48,6 @@ python3Packages.buildPythonApplication rec {
pygobject3
];

# Broken with gobject-introspection setup hook
# https://github.com/NixOS/nixpkgs/issues/56943
strictDeps = false;
format = "other";

postPatch = ''
Expand Down
5 changes: 0 additions & 5 deletions pkgs/applications/audio/cozy/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ python3Packages.buildPythonApplication rec {
pname = "cozy";
version = "1.2.1";

# Temporary fix
# See https://github.com/NixOS/nixpkgs/issues/57029
# and https://github.com/NixOS/nixpkgs/issues/56943
strictDeps = false;

src = fetchFromGitHub {
owner = "geigi";
repo = pname;
Expand Down
7 changes: 1 addition & 6 deletions pkgs/applications/audio/gpodder/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,12 @@ python3Packages.buildPythonApplication rec {
intltool
wrapGAppsHook
glibcLocales
gobject-introspection
];

# as of 2021-07, the gobject-introspection setup hook does not
# work with `strictDeps` enabled, thus for proper `wrapGAppsHook`
# it needs to be disabled explicitly. https://github.com/NixOS/nixpkgs/issues/56943
strictDeps = false;

buildInputs = [
python3
gtk3
gobject-introspection
gnome.adwaita-icon-theme
];

Expand Down
4 changes: 0 additions & 4 deletions pkgs/applications/audio/sonata/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ in buildPythonApplication rec {
setuptools
];

# Otherwise the setup hook for gobject-introspection is not run:
# https://github.com/NixOS/nixpkgs/issues/56943
strictDeps = false;

postPatch = ''
# Remove "Local MPD" tab which is not suitable for NixOS.
sed -i '/localmpd/d' sonata/consts.py
Expand Down
4 changes: 0 additions & 4 deletions pkgs/applications/audio/sublime-music/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@ python3Packages.buildPythonApplication rec {
++ lib.optional serverSupport bottle
;

# hook for gobject-introspection doesn't like strictDeps
# https://github.com/NixOS/nixpkgs/issues/56943
strictDeps = false;

nativeCheckInputs = with python3Packages; [
pytest
];
Expand Down
4 changes: 0 additions & 4 deletions pkgs/applications/editors/rednotebook/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ buildPythonApplication rec {
"--suffix XDG_DATA_DIRS : $XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH"
];

# Until gobject-introspection in nativeBuildInputs is supported.
# https://github.com/NixOS/nixpkgs/issues/56943#issuecomment-472568643
strictDeps = false;

meta = with lib; {
homepage = "https://rednotebook.sourceforge.io/";
changelog = "https://github.com/jendrikseipp/rednotebook/blob/v${version}/CHANGELOG.md";
Expand Down
6 changes: 2 additions & 4 deletions pkgs/applications/graphics/curtail/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,16 @@ python3.pkgs.buildPythonApplication rec {
meson
ninja
pkg-config
gobject-introspection
];

propagatedBuildInputs = [
appstream-glib
python3.pkgs.pygobject3
gobject-introspection
gettext
gtk3
];

# Currently still required for the gobject-introspection setup hook
strictDeps = false;

preInstall = ''
patchShebangs ../build-aux/meson/postinstall.py
'';
Expand Down
8 changes: 2 additions & 6 deletions pkgs/applications/graphics/mcomix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,13 @@ python3.pkgs.buildPythonApplication rec {
hash = "sha256-Nok4oqTezO84q9IDZvgi33ZeKfRL+tpg7QEDmp2ZZpU=";
};

buildInputs = [ gobject-introspection gtk3 gdk-pixbuf ];
nativeBuildInputs = [ wrapGAppsHook ];
buildInputs = [ gtk3 gdk-pixbuf ];
nativeBuildInputs = [ wrapGAppsHook gobject-introspection ];
propagatedBuildInputs = (with python3.pkgs; [ pillow pygobject3 pycairo ]);

# Tests are broken
doCheck = false;

# Correct wrapper behavior, see https://github.com/NixOS/nixpkgs/issues/56943
# until https://github.com/NixOS/nixpkgs/pull/102613
strictDeps = false;

# prevent double wrapping
dontWrapGApps = true;

Expand Down
4 changes: 0 additions & 4 deletions pkgs/applications/graphics/pick-colour-picker/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ buildPythonPackage rec {
gtk3
];

# https://github.com/NixOS/nixpkgs/issues/56943
# this must be false, otherwise the gobject-introspection hook doesn't run
strictDeps = false;

preDistPhases = [ "fixupIconPath" ];

fixupIconPath = ''
Expand Down
1 change: 0 additions & 1 deletion pkgs/applications/misc/gnome-secrets/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ python3Packages.buildPythonApplication rec {
pname = "gnome-secrets";
version = "7.2";
format = "other";
strictDeps = false; # https://github.com/NixOS/nixpkgs/issues/56943

src = fetchFromGitLab {
domain = "gitlab.gnome.org";
Expand Down
7 changes: 2 additions & 5 deletions pkgs/applications/misc/hamster/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, fetchFromGitHub, python3Packages, intltool, glib, itstool
{ lib, fetchFromGitHub, python3Packages, intltool, glib, itstool, gtk3
, wrapGAppsHook, gobject-introspection, pango, gdk-pixbuf, atk, wafHook }:

python3Packages.buildPythonApplication rec {
Expand Down Expand Up @@ -28,6 +28,7 @@ python3Packages.buildPythonApplication rec {
pango
gdk-pixbuf
atk
gtk3
];

propagatedBuildInputs = with python3Packages; [
Expand All @@ -37,10 +38,6 @@ python3Packages.buildPythonApplication rec {
dbus-python
];

# Setup hooks have trouble with strict deps.
# https://github.com/NixOS/nixpkgs/issues/56943
strictDeps = false;

dontWrapGApps = true;

# Arguments to be passed to `makeWrapper`, only used by buildPython*
Expand Down
10 changes: 5 additions & 5 deletions pkgs/applications/misc/kupfer/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
, shared-mime-info
, wrapGAppsHook
, wafHook
, bash
, dbus
}:

with python3Packages;
Expand All @@ -33,14 +35,12 @@ buildPythonApplication rec {
itstool # for help pages
desktop-file-utils # for update-desktop-database
shared-mime-info # for update-mime-info
docutils # for rst2man
dbus # for detection of dbus-send during build
];
buildInputs = [ docutils libwnck keybinder3 ];
buildInputs = [ libwnck keybinder3 bash ];
propagatedBuildInputs = [ pygobject3 gtk3 pyxdg dbus-python pycairo ];

# without strictDeps kupfer fails to build: Could not find the python module 'gi.repository.Gtk'
# see https://github.com/NixOS/nixpkgs/issues/56943 for details
strictDeps = false;

postInstall = ''
gappsWrapperArgs+=(
"--prefix" "PYTHONPATH" : "${makePythonPath propagatedBuildInputs}"
Expand Down
6 changes: 1 addition & 5 deletions pkgs/applications/misc/lutris/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,12 @@ buildPythonApplication rec {
sha256 = "sha256-rsiXm7L/M85ot6NrTyy//lMRFlLPJYve9y6Erg9Ugxg=";
};

nativeBuildInputs = [ wrapGAppsHook ];
nativeBuildInputs = [ wrapGAppsHook gobject-introspection ];
buildInputs = [
atk
gdk-pixbuf
glib-networking
gnome-desktop
gobject-introspection
gtk3
libnotify
pango
Expand Down Expand Up @@ -139,9 +138,6 @@ buildPythonApplication rec {
"--prefix PATH : ${lib.makeBinPath requiredTools}"
"\${gappsWrapperArgs[@]}"
];
# needed for glib-schemas to work correctly (will crash on dialogues otherwise)
# see https://github.com/NixOS/nixpkgs/issues/56943
strictDeps = false;

meta = with lib; {
homepage = "https://lutris.net";
Expand Down
7 changes: 2 additions & 5 deletions pkgs/applications/misc/minigalaxy/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,14 @@ python3Packages.buildPythonApplication rec {
runHook postCheck
'';

# Cannot find GSettings schemas when opening settings,
# probably https://github.com/NixOS/nixpkgs/issues/56943
strictDeps = false;

nativeBuildInputs = [
gettext
wrapGAppsHook
gobject-introspection
];

buildInputs = [
glib-networking
gobject-introspection
gtk3
];

Expand All @@ -64,6 +60,7 @@ python3Packages.buildPythonApplication rec {
];

# Run Linux games using the Steam Runtime by using steam-run in the wrapper
# FIXME: not working with makeBinaryWrapper
postFixup = ''
sed -e 's#exec -a "$0"#exec -a "$0" ${steam-run}/bin/steam-run#' -i $out/bin/minigalaxy
'';
Expand Down
3 changes: 0 additions & 3 deletions pkgs/applications/misc/onboard/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,6 @@ python3.pkgs.buildPythonApplication rec {
python3.pkgs.nose
];

# Temporary fix, see https://github.com/NixOS/nixpkgs/issues/56943
strictDeps = false;

doCheck = false;

preBuild = ''
Expand Down
2 changes: 0 additions & 2 deletions pkgs/applications/misc/printrun/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ python3Packages.buildPythonApplication rec {
'';

dontWrapGApps = true;
# https://github.com/NixOS/nixpkgs/issues/56943
strictDeps = false;

preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
Expand Down
1 change: 0 additions & 1 deletion pkgs/applications/misc/wike/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ python3.pkgs.buildPythonApplication rec {
pname = "wike";
version = "1.7.1";
format = "other";
strictDeps = false; # https://github.com/NixOS/nixpkgs/issues/56943

src = fetchFromGitHub {
owner = "hugolabe";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ python3.pkgs.buildPythonApplication rec {
requests
];

# https://github.com/NixOS/nixpkgs/issues/56943
strictDeps = false;

dontWrapGApps = true;

preFixup = ''
Expand Down
3 changes: 0 additions & 3 deletions pkgs/applications/networking/giara/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ python3.pkgs.buildPythonApplication rec {
--replace "gtk-update-icon-cache" "gtk4-update-icon-cache"
'';

# Fix setup-hooks https://github.com/NixOS/nixpkgs/issues/56943
strictDeps = false;

meta = with lib; {
description = "A Reddit app, built with Python, GTK and Handy; Created with mobile Linux in mind";
maintainers = with maintainers; [ dasj19 ];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
, glib
, gobject-introspection
, folks
, bash
}:

python3Packages.buildPythonApplication rec {
Expand All @@ -39,6 +40,7 @@ python3Packages.buildPythonApplication rec {
libsecret
gnome-online-accounts
folks
bash
];

nativeBuildInputs = [
Expand All @@ -59,9 +61,6 @@ python3Packages.buildPythonApplication rec {
# See https://nixos.org/nixpkgs/manual/#ssec-gnome-common-issues-double-wrapped
dontWrapGApps = true;

# https://github.com/NixOS/nixpkgs/issues/56943
strictDeps = false;

preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
Expand Down
2 changes: 0 additions & 2 deletions pkgs/applications/networking/protonvpn-gui/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ buildPythonApplication rec {
];

buildInputs = [
# To avoid enabling strictDeps = false (#56943)
gobject-introspection
librsvg
pango
webkitgtk
Expand Down
1 change: 0 additions & 1 deletion pkgs/applications/office/gtg/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ python3Packages.buildPythonApplication rec {
'';

format = "other";
strictDeps = false; # gobject-introspection does not run with strictDeps (https://github.com/NixOS/nixpkgs/issues/56943)

checkPhase = "xvfb-run pytest ../tests/";

Expand Down
3 changes: 1 addition & 2 deletions pkgs/applications/office/zim/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ python3Packages.buildPythonApplication rec {
sha256 = "sha256-iOF11/fhQYlvnpWJidJS1yJVavF7xLxvBl59VCh9A4U=";
};

buildInputs = [ gtk3 gobject-introspection gnome.adwaita-icon-theme ];
buildInputs = [ gtk3 gnome.adwaita-icon-theme ];
propagatedBuildInputs = with python3Packages; [ pyxdg pygobject3 ];
# see https://github.com/NixOS/nixpkgs/issues/56943#issuecomment-1131643663
nativeBuildInputs = [ gobject-introspection wrapGAppsHook ];

dontWrapGApps = true;
Expand Down
1 change: 0 additions & 1 deletion pkgs/applications/science/misc/bada-bib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ python3Packages.buildPythonApplication rec {
pname = "bada-bib";
version = "0.8.0";
format = "other";
strictDeps = false; # https://github.com/NixOS/nixpkgs/issues/56943

src = fetchFromGitHub {
owner = "RogerCrocker";
Expand Down
5 changes: 0 additions & 5 deletions pkgs/applications/terminal-emulators/guake/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ python3.pkgs.buildPythonApplication rec {
sha256 = "sha256-BW13fBH26UqMPMjV8JC4QkpgzyoPfCpAfSkJD68uOZU=";
};

# Strict deps breaks guake
# See https://github.com/NixOS/nixpkgs/issues/59930
# and https://github.com/NixOS/nixpkgs/issues/56943
strictDeps = false;

nativeBuildInputs = [
gobject-introspection
wrapGAppsHook
Expand Down
4 changes: 0 additions & 4 deletions pkgs/applications/version-management/meld/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ python3.pkgs.buildPythonApplication rec {
pycairo
];

# gobject-introspection and some other similar setup hooks do not currently work with strictDeps.
# https://github.com/NixOS/nixpkgs/issues/56943
strictDeps = false;

postPatch = ''
patchShebangs meson_shebang_normalisation.py
'';
Expand Down
Loading

0 comments on commit 431dbdc

Please sign in to comment.