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

tangram: init at 1.3.1 #100912

Merged
merged 1 commit into from
Jan 19, 2021
Merged

tangram: init at 1.3.1 #100912

merged 1 commit into from
Jan 19, 2021

Conversation

austinbutler
Copy link
Member

@austinbutler austinbutler commented Oct 18, 2020

Motivation for this change

Add package. Unfortunately while it builds it doesn't run.

❯ result/bin/.re.sonny.Tangram-wrapped 

(gjs:13038): GLib-GObject-WARNING **: 19:03:21.993: cannot register existing type 'GDBusConnection'

(gjs:13038): GLib-GObject-WARNING **: 19:03:21.993: cannot register existing type 'GInitable'

(gjs:13038): GLib-GObject-CRITICAL **: 19:03:21.993: g_type_interface_add_prerequisite: assertion 'G_TYPE_IS_INTERFACE (interface_type)' failed

(gjs:13038): GLib-CRITICAL **: 19:03:21.993: g_once_init_leave: assertion 'result != 0' failed

(gjs:13038): GLib-GObject-CRITICAL **: 19:03:21.993: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(gjs:13038): GLib-GObject-WARNING **: 19:03:21.993: cannot register existing type 'GAsyncInitable'

(gjs:13038): GLib-GObject-CRITICAL **: 19:03:21.993: g_type_interface_add_prerequisite: assertion 'G_TYPE_IS_INTERFACE (interface_type)' failed

(gjs:13038): GLib-CRITICAL **: 19:03:21.993: g_once_init_leave: assertion 'result != 0' failed

(gjs:13038): GLib-GObject-CRITICAL **: 19:03:21.993: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(gjs:13038): GLib-CRITICAL **: 19:03:21.993: g_once_init_leave: assertion 'result != 0' failed

(gjs:13038): Gjs-WARNING **: 19:03:21.993: JS ERROR: Error: Unsupported type (null), deriving from fundamental (null)
_init@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:473:5
@resource:///org/gnome/gjs/modules/script/package.js:32:13
@result/bin/.re.sonny.Tangram-wrapped:2:1


(gjs:13038): Gjs-CRITICAL **: 19:03:21.993: Script result/bin/.re.sonny.Tangram-wrapped threw an exception

@jtojnar in searching around for similar areas I've seen your name, any ideas?

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1 labels Oct 18, 2020
@jtojnar
Copy link
Member

jtojnar commented Oct 18, 2020

You need to run it using result/bin/re.sonny.Tangram. And that you will need to fix using something like

dontWrapGApps = true;
# Fixes https://github.com/NixOS/nixpkgs/issues/31168
postFixup = ''
for file in $out/share/org.gnome.Characters/org.gnome.Characters \
$out/share/org.gnome.Characters/org.gnome.Characters.BackgroundService
do
sed -e $"2iimports.package._findEffectiveEntryPointName = () => \'$(basename $file)\' " \
-i $file
wrapGApp "$file"
done
'';

@austinbutler
Copy link
Member Author

@jtojnar gave that a go, it builds if I exclude wrapGApp "$file", but it still does not run.

With wrapGApp I get: Builder called die: Cannot wrap '/nix/store/kckv4zfhzp9h1nyyklazdnz7a4xhjiaa-tangram-1.3.1/share/Tangram/re.sonny.Tangram.data.gresource' because it is not an executable file.

When I leave wrapGApp out it builds, but I get this when I run it:

❯ result/bin/re.sonny.Tangram     
(.re.sonny.Tangram-wrapped:11449): Gjs-WARNING **: 21:37:56.568: JS ERROR: ImportError: No JS module 'main' found in search path
start@resource:///org/gnome/gjs/modules/script/package.js:206:5
@/nix/store/rhbnkf6swgqmx23nyqng6r39x4ykahjf-tangram-1.3.1/bin/.re.sonny.Tangram-wrapped:2:17

(.re.sonny.Tangram-wrapped:11449): Gjs-CRITICAL **: 21:37:56.568: Script /nix/store/rhbnkf6swgqmx23nyqng6r39x4ykahjf-tangram-1.3.1/bin/.re.sonny.Tangram-wrapped threw an exception

@jtojnar
Copy link
Member

jtojnar commented Oct 18, 2020

Sorry, you also need, dontWrapGApps = true;.

@austinbutler
Copy link
Member Author

@jtojnar added that, it builds, but I get the same error output.

❯ result/bin/re.sonny.Tangram 

(gjs:9224): GLib-GObject-WARNING **: 09:46:07.840: cannot register existing type 'GDBusConnection'

(gjs:9224): GLib-GObject-WARNING **: 09:46:07.840: cannot register existing type 'GInitable'

(gjs:9224): GLib-GObject-CRITICAL **: 09:46:07.841: g_type_interface_add_prerequisite: assertion 'G_TYPE_IS_INTERFACE (interface_type)' failed

(gjs:9224): GLib-CRITICAL **: 09:46:07.841: g_once_init_leave: assertion 'result != 0' failed

(gjs:9224): GLib-GObject-CRITICAL **: 09:46:07.841: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(gjs:9224): GLib-GObject-WARNING **: 09:46:07.841: cannot register existing type 'GAsyncInitable'

(gjs:9224): GLib-GObject-CRITICAL **: 09:46:07.841: g_type_interface_add_prerequisite: assertion 'G_TYPE_IS_INTERFACE (interface_type)' failed

(gjs:9224): GLib-CRITICAL **: 09:46:07.841: g_once_init_leave: assertion 'result != 0' failed

(gjs:9224): GLib-GObject-CRITICAL **: 09:46:07.841: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(gjs:9224): GLib-CRITICAL **: 09:46:07.841: g_once_init_leave: assertion 'result != 0' failed

(gjs:9224): Gjs-WARNING **: 09:46:07.841: JS ERROR: Error: Unsupported type (null), deriving from fundamental (null)
_init@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:473:5
@resource:///org/gnome/gjs/modules/script/package.js:32:13
@result/bin/re.sonny.Tangram:2:1


(gjs:9224): Gjs-CRITICAL **: 09:46:07.841: Script result/bin/re.sonny.Tangram threw an exception

@jtojnar
Copy link
Member

jtojnar commented Oct 18, 2020

You really need all of those attributes.

@austinbutler
Copy link
Member Author

Unfortunately I don't know what you mean.

@jtojnar
Copy link
Member

jtojnar commented Oct 18, 2020

diff --git a/pkgs/applications/networking/instant-messengers/tangram/default.nix b/pkgs/applications/networking/instant-messengers/tangram/default.nix
index 0a87e68fd3a..3dcdd915e7e 100644
--- a/pkgs/applications/networking/instant-messengers/tangram/default.nix
+++ b/pkgs/applications/networking/instant-messengers/tangram/default.nix
@@ -16,7 +16,6 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = [
-    desktop-file-utils
     gdk-pixbuf
     gjs
     glib
@@ -28,6 +27,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [
     appstream-glib
     gettext
+    desktop-file-utils
     gobject-introspection
     hicolor-icon-theme
     meson
@@ -44,10 +44,13 @@ stdenv.mkDerivation rec {
     patchShebangs build-aux/meson/postinstall.py
   '';
 
+  # Fixes https://github.com/NixOS/nixpkgs/issues/31168
   postFixup = ''
-    for file in "$out/share/Tangram"/*; do
+    for file in $out/bin/re.sonny.Tangram; do
       sed -e $"2iimports.package._findEffectiveEntryPointName = () => \'$(basename $file)\' " \
          -i $file
+
+      wrapGApp "$file"
      done
   '';
 

@austinbutler
Copy link
Member Author

Thanks @jtojnar that does get it to launch. Unfortunately it seems to suffer from the same instabilities as epiphany such as #32580. Using WEBKIT_DISABLE_COMPOSITING_MODE=1 helps, but it is still fairly unusable. What is the best course of action? Leave this draft until those issues are resolved? Close this draft for now?

@jtojnar
Copy link
Member

jtojnar commented Oct 18, 2020

Keeping this open is fine.

@austinbutler
Copy link
Member Author

Result of nixpkgs-review pr 100912 run on x86_64-linux 1

1 package built:
  • tangram

@austinbutler austinbutler marked this pull request as ready for review January 11, 2021 04:28
@austinbutler
Copy link
Member Author

Now that the Epiphany issue is resolved, this is working and ready.

@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review which is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
If you have any questions or problems please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 100912 run on x86_64-linux 1

1 package built:
  • tangram

@SuperSandro2000 SuperSandro2000 merged commit 6270a85 into NixOS:master Jan 19, 2021
@austinbutler austinbutler deleted the tangram branch January 27, 2021 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants