-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
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.1.0 -> 4.1.1 #41252
qbittorrent: 4.1.0 -> 4.1.1 #41252
Conversation
96dfbe8
to
e814260
Compare
Something in upstream broke bot evaluation for all new PRs. |
@GrahamcOfBorg build qbittorrent |
Success on x86_64-linux (full log) Attempted: qbittorrent Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: qbittorrent Partial log (click to expand)
|
buildInputs = [ boost libtorrentRasterbar qtbase qttools qtsvg ] | ||
++ optional guiSupport dbus_libs; | ||
buildInputs = [ boost libtorrentRasterbar qtbase qttools qtsvg | ||
(if guiSupport then [ dbus_libs ] else [ ]) # D(esktop)-Bus depends on GUI support |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't nest arrays in buildInputs
. The old buildInputs
are correct (and with stdenv.lib
at the top is ok; alternatively you can add lib
argument and write lib.optional
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I included what previously was list concatenation into list.
Fixing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since optional
in the source code is
{
optionals = cond: elems: if cond then elems else [];
}
I prefer to use if then else
for uniformal look, when there are already if then else
needed in the code.
, boost, libtorrentRasterbar, qtbase, qttools, qtsvg | ||
, debugSupport ? false # Debugging | ||
, guiSupport ? true, dbus_libs ? null # GUI (disable to run headless) | ||
, webuiSupport ? true # WebUI | ||
}: | ||
|
||
assert guiSupport -> (dbus_libs != null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you remove this assertion, you should also make dbus_libs
non-optional above; and please rename them to dbus
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. No way to avoid assertion here.
Reverted.
rev = "release-${version}"; | ||
owner = "qbittorrent"; | ||
repo = "qbittorrent"; | ||
sha256 = "09bf1jr2sfdps8cb154gjw7zhdcpsamhnfbgacdmkfyd7qgcbykf"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The usual and expected order is owner, repo, rev, sha256.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
4fda877
to
fc373fa
Compare
buildInputs = [ boost libtorrentRasterbar qtbase qttools qtsvg ] | ||
++ optional guiSupport dbus_libs; | ||
buildInputs = [ boost libtorrentRasterbar qtbase qttools qtsvg | ||
(if guiSupport then dbus else [] ) # D(esktop)-Bus depends on GUI support |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still a nested array. The package may build like this, but such anomalies do cause issues, e.g. cross compilation support expects that all elements of buildInputs
are derivations (and []
is not).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I thought "[]" evaluates to something primitive.
Worth a try 8)
homepage = https://www.qbittorrent.org/; | ||
license = licenses.gpl2; | ||
platforms = platforms.linux; | ||
platforms = with platforms; unix; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not extend the list of supported platforms without testing that they are actually supported, otherwise we will likely just burden macOS Hydra builders with an always broken build. I have asked GrahamcOfBorg to build this for Mac too; if it does not report success and no one else confirms that this builds on Darwin, the platforms should be restricted back to Linux.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is why I do it so.
I also do not have Darwin. So ask bot to build.
Probably should look to run macOS on QEMU for testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The bot has attempted to build qbittorrent on Darwin and it did not succeed: #41252 (comment), https://logs.nix.ci/?key=nixos/nixpkgs.41252&attempt_id=ca7f7512-a616-42ca-bb60-f50432dc9303 . Supporting Darwin requires additional work, and it is out of scope of this PR.
fc373fa
to
0eeaa88
Compare
Please make GrahamcOfBorg build for Darwin, if it successful - we would leave |
buildInputs = [ boost libtorrentRasterbar qtbase qttools qtsvg ] | ||
++ optional guiSupport dbus_libs; | ||
buildInputs = [ boost libtorrentRasterbar qtbase qttools qtsvg | ||
] ++ (if guiSupport then [ dbus ] else []); # D(esktop)-Bus depends on GUI support |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This evaluates correctly.
The comment should be the other way around, "GUI support depends on dbus", but assert guiSupport -> (dbus != null);
above says exactly this, so the comment is redundant.
Please understand that the old version,
buildInputs = [ boost libtorrentRasterbar qtbase qttools qtsvg ]
++ optional guiSupport dbus;
is the most usual in Nixpkgs and it is more readable once you get accustomed. You may like the new version more now, but you will probably prefer the old version in the future, and in such cases as this essentially everyone writes optional
. The way you've made configureFlags
consistent is fine (although going in the other direction with optionals (!guiSupport) [ "--disable-gui --enable-systemd" ] ++ optional (!webuiSupport) "--disable-webui"
is more conventional; this is a good example: https://github.com/NixOS/nixpkgs/blob/18.03/pkgs/applications/networking/mailreaders/claws-mail/default.nix#L69), but the old buildInputs
are perfect and can not be improved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. D-Bus features is additional option to the GUI build.
There are --disable-qt-dbus
for Autotools and DBUS={ON,OFF}
option for CMake, and that only for GUI build.
About optional
s I agree.
I suppose it is in the process of building, but just in case: |
Success on x86_64-linux (full log) Attempted: qbittorrent Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: qbittorrent Partial log (click to expand)
|
3f7ccd4
to
7f5edc7
Compare
Failure on x86_64-darwin (full log) Attempted: qbittorrent Partial log (click to expand)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! This is almost ready.
|
||
# Otherwise qm_gen.pri assumes lrelease-qt5, which does not exist. | ||
# HACK: 2018-05-31: Otherwise qm_gen.pri assumes lrelease-qt5, which does not exist. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually this is not a hack, since this is how we are supposed to configure the path to lrelease: qbittorrent/qBittorrent@f4dc5c6
homepage = https://www.qbittorrent.org/; | ||
license = licenses.gpl2; | ||
platforms = platforms.linux; | ||
platforms = with platforms; unix; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The bot has attempted to build qbittorrent on Darwin and it did not succeed: #41252 (comment), https://logs.nix.ci/?key=nixos/nixpkgs.41252&attempt_id=ca7f7512-a616-42ca-bb60-f50432dc9303 . Supporting Darwin requires additional work, and it is out of scope of this PR.
(if webuiSupport then "" else "--disable-webui") | ||
] ++ optional debugSupport "--enable-debug"; | ||
"--with-boost=${boost.dev}" ] | ||
++ optional (!guiSupport) "--disable-gui --enable-systemd" # Also place qbittorrent-nox systemd service files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optionals
here would be a bit cleaner, see https://github.com/NixOS/nixpkgs/blob/18.03/pkgs/applications/networking/mailreaders/claws-mail/default.nix#L72-L76
@Anton-Latukha Would you add yourself to the maintainers of qbittorrent? |
7f5edc7
to
09f2d9b
Compare
@orivej Thank you. |
@GrahamcOfBorg build qbittorrent |
No attempt on x86_64-darwin (full log) The following builds were skipped because they don't evaluate on x86_64-darwin: qbittorrent Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: qbittorrent Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: qbittorrent Partial log (click to expand)
|
Motivation for this change
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)