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

librecad: fix missing app name and icon on Wayland #71957

Merged
merged 1 commit into from Dec 18, 2020

Conversation

lightbulbjim
Copy link
Contributor

@lightbulbjim lightbulbjim commented Oct 25, 2019

Motivation for this change

Wayland uses the .desktop file to find the app name and icon. Without it being specified the correct icon is not shown. This was broken in the recent update to Qt5 (#69077).

Tested on Gnome/Wayland.

References:

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 @viric

@bjornfor
Copy link
Contributor

I see you've submitted this upstream: LibreCAD/LibreCAD#1151.

Perhaps we can apply some pressure to fix this upstream?

@lightbulbjim
Copy link
Contributor Author

lightbulbjim commented Oct 28, 2019 via email

Copy link
Member

@Kiwi Kiwi left a comment

Choose a reason for hiding this comment

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

I'd like if you run nixpkgs-fmt on it; alternatively git apply :)

diff --git a/pkgs/applications/misc/librecad/default.nix b/pkgs/applications/misc/librecad/default.nix
index 2d160d93853..6f7967dfdfd 100644
--- a/pkgs/applications/misc/librecad/default.nix
+++ b/pkgs/applications/misc/librecad/default.nix
@@ -17,7 +17,7 @@ let
   stdenv = gcc8Stdenv;
 in

-# Doesn't build with gcc9
+  # Doesn't build with gcc9
 mkDerivationWith stdenv.mkDerivation rec {
   pname = "librecad";
   version = "2.2.0-rc1";
@@ -31,11 +31,13 @@ mkDerivationWith stdenv.mkDerivation rec {

   patches = [
     ./fix_qt_5_11_build.patch
-    (fetchpatch {
-      # Fix missing app name and icon on Wayland.
-      url = "https://github.com/LibreCAD/LibreCAD/commit/a17f8281093403f0c7c36996232665ed21906688.patch";
-      sha256 = "1x46psh4bcx2hxck4l83ki43g1252vb033i2x94h4rpai9hww4d5";
-    })
+    (
+      fetchpatch {
+        # Fix missing app name and icon on Wayland.
+        url = "https://github.com/LibreCAD/LibreCAD/commit/a17f8281093403f0c7c36996232665ed21906688.patch";
+        sha256 = "1x46psh4bcx2hxck4l83ki43g1252vb033i2x94h4rpai9hww4d5";
+      }
+    )
   ];

   postPatch = ''

Wayland uses the .desktop file to find the app name and icon. Without it being specified the correct icon is not shown.

Tested on Gnome/Wayland.

References:

  - https://community.kde.org/Guidelines_and_HOWTOs/Wayland_Porting_Notes#Application_Icon
  - https://doc.qt.io/qt-5/qguiapplication.html#desktopFileName-prop
@lightbulbjim
Copy link
Contributor Author

I'd like if you run nixpkgs-fmt on it; alternatively git apply :)

Sure thing, done. That comment indent looks awkward to me, but no big deal.

@ofborg ofborg bot requested a review from Kiwi January 22, 2020 21:59
@Kiwi
Copy link
Member

Kiwi commented Jan 22, 2020

Aye. I don't always agree with The Machine but when we disagree it always wins the argument! I'm a huge fan of code formatters. They're much more consistent than I am, with a lot less mental overhead, and it's nice to be able to defer the decision to The Machine about what is correct when it comes to something so subjective (and I don't even always agree with myself!). It helps me stay focused on the problem I'm solving if I don't have to think about how it's formatted as well. If it compiles... format it! I should write about it on my blag... anyway, thanks! 😄

@stale
Copy link

stale bot commented Jul 20, 2020

Hello, I'm a bot and I thank you in the name of the community for your contributions.

Nixpkgs is a busy repository, and unfortunately sometimes PRs get left behind for too long. Nevertheless, we'd like to help committers reach the PRs that are still important. This PR has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human.

If this is still important to you and you'd like to remove the stale label, we ask that you leave a comment. Your comment can be as simple as "still important to me". But there's a bit more you can do:

If you received an approval by an unprivileged maintainer and you are just waiting for a merge, you can @ mention someone with merge permissions and ask them to help. You might be able to find someone relevant by using Git blame on the relevant files, or via GitHub's web interface. You can see if someone's a member of the nixpkgs-committers team, by hovering with the mouse over their username on the web interface, or by searching them directly on the list.

If your PR wasn't reviewed at all, it might help to find someone who's perhaps a user of the package or module you are changing, or alternatively, ask once more for a review by the maintainer of the package/module this is about. If you don't know any, you can use Git blame on the relevant files, or GitHub's web interface to find someone who touched the relevant files in the past.

If your PR has had reviews and nevertheless got stale, make sure you've responded to all of the reviewer's requests / questions. Usually when PR authors show responsibility and dedication, reviewers (privileged or not) show dedication as well. If you've pushed a change, it's possible the reviewer wasn't notified about your push via email, so you can always officially request them for a review, or just @ mention them and say you've addressed their comments.

Lastly, you can always ask for help at our Discourse Forum, or more specifically, at this thread or at #nixos' IRC channel.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 20, 2020
@doronbehar
Copy link
Contributor

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

1 package built:
  • librecad

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Dec 18, 2020
@doronbehar doronbehar merged commit f6f2907 into NixOS:master Dec 18, 2020
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

4 participants