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

notepadqq: use qt5's mkDerivation #66324

Merged
merged 1 commit into from Aug 13, 2019
Merged

Conversation

xaverdh
Copy link
Contributor

@xaverdh xaverdh commented Aug 8, 2019

Motivation for this change

See #65399

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nix-review --run "nix-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.
Notify maintainers

cc @rszibele

Copy link
Contributor

@worldofpeace worldofpeace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is because the executable is a bash script and wrapQtAppsHook only wraps ELF headers.

You should use wrapQtApp $out/bin/notepadqq in preFixup.

@xaverdh
Copy link
Contributor Author

xaverdh commented Aug 8, 2019

This is because the executable is a bash script and wrapQtAppsHook only wraps ELF headers.

You should use wrapQtApp $out/bin/notepadqq in preFixup.

Thanks, should have realized it was a bash script..

@xaverdh xaverdh changed the title [WIP] notepadqq: use qt5's mkDerivation notepadqq: use qt5's mkDerivation Aug 8, 2019
@@ -13,7 +12,7 @@ in stdenv.mkDerivation {
};

nativeBuildInputs = [
pkgconfig which qttools
pkgconfig which qttools wrapQtAppsHook
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pkgconfig which qttools wrapQtAppsHook
pkgconfig which qttools

is added automatically

@teto
Copy link
Member

teto commented Aug 9, 2019

tried a nix-review and while it compiles, it seems stuck on start:

(ins)[nix-shell:~/.cache/nix-review/pr-66324]$ ./results/notepadqq/bin/notepadqq 
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile

then nothing happens

@xaverdh
Copy link
Contributor Author

xaverdh commented Aug 9, 2019

tried a nix-review and while it compiles, it seems stuck on start:

(ins)[nix-shell:~/.cache/nix-review/pr-66324]$ ./results/notepadqq/bin/notepadqq 
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile

then nothing happens

I also get that warning on startup, it also complains about some missing icons, but then runs just fine.

@@ -1,9 +1,8 @@
{ stdenv, fetchFromGitHub, pkgconfig, which, qtbase, qtsvg, qttools, qtwebkit}:
{ mkDerivation, lib, fetchFromGitHub, pkgconfig, which, qtbase, qtsvg, qttools, qtwebkit, wrapQtAppsHook }:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{ mkDerivation, lib, fetchFromGitHub, pkgconfig, which, qtbase, qtsvg, qttools, qtwebkit, wrapQtAppsHook }:
{ mkDerivation, lib, fetchFromGitHub, pkgconfig, which, qtbase, qtsvg, qttools, qtwebkit }:

@xaverdh
Copy link
Contributor Author

xaverdh commented Aug 10, 2019

@teto can you strace the binary? I ran nix-review on this exact pr and had no trouble running the binary. So I guess there is some external state involved?

@worldofpeace worldofpeace merged commit d914581 into NixOS:master Aug 13, 2019
@worldofpeace
Copy link
Contributor

I've noticed this in other applications since switching to qt wrappers, perhaps post the error in the tracking issue.

@teto
Copy link
Member

teto commented Aug 14, 2019

Here is an strace result
https://transfer.sh/614Sd/log

@xaverdh xaverdh deleted the notepadqq-qt-fix branch August 21, 2019 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants