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

qbittorrent: 4.5.5 -> 4.6.0 + other changes #263111

Merged
merged 2 commits into from
Nov 6, 2023

Conversation

paveloom
Copy link
Member

Description of changes

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@foolnotion
Copy link
Contributor

note that the switch to qt6 is likely to affect theming for a lot of people. qt support outside kde is wonky at best. I use swaywm and qbittorret-4.6.0 from your branch does not obey any theme.

@paveloom
Copy link
Member Author

@foolnotion I'm not aware of possible theming issues on Sway. That said, I've added qtwayland as a dependency in the latest force push. I would suggest trying again. Make sure you have the Qt theme set, though. Here's what I use on NixOS:

qt = {
  enable = true;
  platformTheme = "gnome";
  style = "adwaita";
};

@foolnotion
Copy link
Contributor

foolnotion commented Oct 25, 2023

@foolnotion I'm not aware of possible theming issues on Sway. That said, I've added qtwayland as a dependency in the latest force push. I would suggest trying again. Make sure you have the Qt theme set, though. Here's what I use on NixOS:

qt = {
  enable = true;
  platformTheme = "gnome";
  style = "adwaita";
};

I have something similar, I'd suggest worry about this after it gets merged. Just be aware a lot of people have issues with theming e.g. #260696

@peterhoeg
Copy link
Member

The issue is with KDE users as the current qt5 based Plasma doesn't have any Qt6 themes. There really is no way around that until Plasma 6 lands. The nicer way to do this is to build both qt5 and qt6 versions of this and have the end-user choose. This is what we do for a number of other applications that support both 5 and 6.

@paveloom
Copy link
Member Author

All right, both Qt versions are built now.

@paveloom paveloom force-pushed the qbittorrent branch 2 times, most recently from 305708d to 76e1358 Compare October 25, 2023 13:27
@Tungsten842
Copy link
Member

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

1 package marked as broken and skipped:
  • springLobby
12 packages built:
  • btfs
  • deluge (deluge-2_x ,deluge-gtk)
  • deluge.dist (deluge-2_x.dist)
  • deluged
  • deluged.dist
  • libtorrent-rasterbar (libtorrent-rasterbar-2_0_x)
  • libtorrent-rasterbar.dev (libtorrent-rasterbar-2_0_x.dev)
  • libtorrent-rasterbar.python (libtorrent-rasterbar-2_0_x.python ,python311Packages.libtorrent-rasterbar ,python311Packages.libtorrent-rasterbar.dev ,python311Packages.libtorrent-rasterbar.python)
  • python310Packages.libtorrent-rasterbar (python310Packages.libtorrent-rasterbar.dev ,python310Packages.libtorrent-rasterbar.python)
  • qbittorrent
  • qbittorrent-nox
  • qbittorrent-qt5

@Tungsten842
Copy link
Member

@paveloom
Copy link
Member Author

It builds, just the install script needs a little bit of tweaking. I can't really debug it since I don't have a suitable Darwin machine.

@Tungsten842
Copy link
Member

It builds, just the install script needs a little bit of tweaking. I can't really debug it since I don't have a suitable Darwin machine.

In this case I think that you should either mark the darwin platform as broken, or simply remove the darwin support for now, until someone figures out how to fix it.

@paveloom
Copy link
Member Author

Marked as broken on Darwin.

Copy link
Member

@Tungsten842 Tungsten842 left a comment

Choose a reason for hiding this comment

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

Tested and working as expected

@mjm
Copy link
Contributor

mjm commented Oct 25, 2023

diff --git a/pkgs/applications/networking/p2p/qbittorrent/default.nix b/pkgs/applications/networking/p2p/qbittorrent/default.nix
index 27330a97c1...8842ba0aed 100644
--- a/pkgs/applications/networking/p2p/qbittorrent/default.nix
+++ b/pkgs/applications/networking/p2p/qbittorrent/default.nix
@@ -75,7 +75,7 @@
 
   postInstall = lib.optionalString stdenv.isDarwin ''
     mkdir -p $out/{Applications,bin}
-    cp -R src/${pname}.app $out/Applications
+    cp -R ${pname}.app $out/Applications
     makeWrapper $out/{Applications/${pname}.app/Contents/MacOS,bin}/${pname}
   '';
 

This change makes it work for me on aarch64-darwin.

@paveloom
Copy link
Member Author

@mjm Nice! And the nox one is called qbittorrent-nox.app?

@mjm
Copy link
Contributor

mjm commented Oct 25, 2023

Indeed it is! I've been able to build all 3 variants (qt6, qt5, nox) with your latest changes.

@paveloom paveloom force-pushed the qbittorrent branch 2 times, most recently from 9a0d03d to b4fb61f Compare October 27, 2023 11:51
@peterhoeg
Copy link
Member

One last thing - you're using both lib.optional and lib.optionals in there - the former is not recommended due to its poor error handling, so the better way is something like this:

  1. add inherit (lib) optionals; to the top let bit
  2. reference just optionals (without the lib) everywhere you are currently using lib.optionals
  3. change existing lib.optional to optionals and make the 2nd parameter a list

@peterhoeg
Copy link
Member

You can of course use the full lib.optionals but this way it becomes easier for an erroneous lib.optional to sneak its way in.

@paveloom
Copy link
Member Author

Done with fully qualified calls.

@peterhoeg
Copy link
Member

merge conflicts

@peterhoeg
Copy link
Member

Very last thing (I promise!) - please squash the qbittorrent commits into one, so that this PR contains just 2: 1 regarding libtorrent-rasterbar and the 1 concerning qbittorrent.

We cannot do selective squashing through GH.

@paveloom
Copy link
Member Author

paveloom commented Nov 2, 2023

Why squash all into one? This will make the diff unreadable.

@peterhoeg
Copy link
Member

peterhoeg commented Nov 3, 2023 via email

Other changes:
- Refactor
- Switch to CMake
- Build with Qt6 by default and add a separate derivation for Qt5
@paveloom
Copy link
Member Author

paveloom commented Nov 3, 2023

I would expect all relevant commits to be reverted as well, if needed. They are related under one merge anyway, so one would just revert the merge. All of the following commits from future merges will depend on changes done here, so it's not like one could just revert one commit in general (especially the CMake one that changes the build system in use).

Per-commit diffs are much easier to read and understand when their summary states one logical change. They are also useful when you actually encountered an issue and want to find its source (be it by reading the summaries of commits or by using git bisect). All of the commits here can be checked out, and qBittorrent can be compiled from all of them (except for Darwin systems, but that's because I don't have a suitable machine at the moment).

That said, I don't care too much about protecting these opinions, so I squashed the commits anyway.

@peterhoeg
Copy link
Member

peterhoeg commented Nov 6, 2023 via email

@peterhoeg peterhoeg merged commit b645bf2 into NixOS:master Nov 6, 2023
22 of 23 checks passed
@paveloom paveloom deleted the qbittorrent branch November 7, 2023 07:22
@paveloom paveloom mentioned this pull request Nov 16, 2023
13 tasks
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

10 participants