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

obs-studio: wrap QT application to fix xcb plugin abort #65559

Merged
merged 1 commit into from Jul 30, 2019

Conversation

grahamc
Copy link
Member

@grahamc grahamc commented Jul 29, 2019

Motivation for this change

Not sure if this is the right thing to do these days, but it seemed to fix it up for me.

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.

@grahamc
Copy link
Member Author

grahamc commented Jul 29, 2019

cc #65399

@@ -20,7 +20,7 @@
, pkgconfig
, vlc
, mbedtls

, wrapQtAppsHook
Copy link
Member

Choose a reason for hiding this comment

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

Turns out we probably want to use mkDerivation from the qt5 set, instead of manually handling the wrapping. See the other comment about that.

(I need a comment to ask for changes :/)

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, turns out a lot of the qt applications in nixpkgs aren't packaged correctly at all...

@samueldr
Copy link
Member

This is all that's needed:

diff --git a/pkgs/applications/video/obs-studio/default.nix b/pkgs/applications/video/obs-studio/default.nix
index 0990062bf02..983bdff106e 100644
--- a/pkgs/applications/video/obs-studio/default.nix
+++ b/pkgs/applications/video/obs-studio/default.nix
@@ -1,4 +1,5 @@
 { config, stdenv
+, mkDerivation
 , fetchFromGitHub
 , cmake
 , fdk_aac
@@ -34,7 +35,7 @@
 
 let
   optional = stdenv.lib.optional;
-in stdenv.mkDerivation rec {
+in mkDerivation rec {
   name = "obs-studio-${version}";
   version = "23.2.1";
 

But? What's that mkDerivation? It comes from using libsForQt5.callPackage instead of the more common callPackage.

In the case of obs-studio it's already happening.

image

@grahamc
Copy link
Member Author

grahamc commented Jul 30, 2019

Fixed up!

@grahamc grahamc changed the title obs: wrap QT application to fix xcb plugin abort obs-studio: wrap QT application to fix xcb plugin abort Jul 30, 2019
@samueldr samueldr merged commit ccc5534 into NixOS:master Jul 30, 2019
@grahamc grahamc deleted the obs-studio branch July 30, 2019 13:10
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