-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
exaile: init at 4.1.1 #120761
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
Merged
Merged
exaile: init at 4.1.1 #120761
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,107 @@ | ||
| { stdenv, lib, fetchFromGitHub | ||
| , gobject-introspection, makeWrapper, wrapGAppsHook | ||
| , gtk3, gst_all_1, python3 | ||
| , gettext, gnome, help2man, keybinder3, libnotify, librsvg, streamripper, udisks, webkitgtk | ||
| , iconTheme ? gnome.adwaita-icon-theme | ||
| , deviceDetectionSupport ? true | ||
| , documentationSupport ? true | ||
| , notificationSupport ? true | ||
| , scalableIconSupport ? true | ||
| , translationSupport ? true | ||
| , bpmCounterSupport ? false | ||
| , ipythonSupport ? false | ||
| , lastfmSupport ? false | ||
| , lyricsManiaSupport ? false | ||
| , lyricsWikiSupport ? false | ||
| , multimediaKeySupport ? false | ||
| , musicBrainzSupport ? false | ||
| , podcastSupport ? false | ||
| , streamripperSupport ? false | ||
| , wikipediaSupport ? false | ||
| , fetchpatch | ||
| }: | ||
|
|
||
| stdenv.mkDerivation rec { | ||
| pname = "exaile"; | ||
| version = "4.1.1"; | ||
|
|
||
| src = fetchFromGitHub { | ||
| owner = "exaile"; | ||
| repo = pname; | ||
| rev = version; | ||
| sha256 = "0s29lm0i4slgaw5l5s9a2zx0b83xac43rnil5cvyi210dxm5s048"; | ||
| }; | ||
| patches = [ | ||
| (fetchpatch { | ||
| url = "https://github.com/exaile/exaile/pull/751.patch"; | ||
| sha256 = "sha256-jCJh85Z3HQcyS4ntQP5HwYJgM7WNHcWzjf0BdNJitsM="; | ||
| }) | ||
| ]; | ||
|
|
||
| nativeBuildInputs = [ | ||
| gobject-introspection | ||
| makeWrapper | ||
| wrapGAppsHook | ||
| ] ++ lib.optionals documentationSupport [ | ||
| help2man | ||
| python3.pkgs.sphinx | ||
| python3.pkgs.sphinx_rtd_theme | ||
| ] ++ lib.optional translationSupport gettext; | ||
|
|
||
| buildInputs = [ | ||
| iconTheme | ||
| gtk3 | ||
| ] ++ (with gst_all_1; [ | ||
| gstreamer | ||
| gst-plugins-base | ||
| gst-plugins-good | ||
| ]) ++ (with python3.pkgs; [ | ||
| bsddb3 | ||
| dbus-python | ||
| mutagen | ||
| pygobject3 | ||
| pycairo | ||
| gst-python | ||
| ]) ++ lib.optional deviceDetectionSupport udisks | ||
| ++ lib.optional notificationSupport libnotify | ||
| ++ lib.optional scalableIconSupport librsvg | ||
| ++ lib.optional bpmCounterSupport gst_all_1.gst-plugins-bad | ||
| ++ lib.optional ipythonSupport python3.pkgs.ipython | ||
| ++ lib.optional lastfmSupport python3.pkgs.pylast | ||
| ++ lib.optional (lyricsManiaSupport || lyricsWikiSupport) python3.pkgs.lxml | ||
| ++ lib.optional lyricsWikiSupport python3.pkgs.beautifulsoup4 | ||
| ++ lib.optional multimediaKeySupport keybinder3 | ||
| ++ lib.optional musicBrainzSupport python3.pkgs.musicbrainzngs | ||
| ++ lib.optional podcastSupport python3.pkgs.feedparser | ||
| ++ lib.optional wikipediaSupport webkitgtk; | ||
|
|
||
| checkInputs = with python3.pkgs; [ | ||
| mox3 | ||
| pytest | ||
ryneeverett marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ]; | ||
|
|
||
| makeFlags = [ | ||
| "PREFIX=${placeholder "out"}" | ||
| ]; | ||
|
|
||
| doCheck = true; | ||
| preCheck = '' | ||
| substituteInPlace Makefile --replace "PYTHONPATH=$(shell pwd)" "PYTHONPATH=$PYTHONPATH:$(shell pwd)" | ||
| export PYTEST="py.test" | ||
| export XDG_CACHE_HOME=$(mktemp -d) | ||
| ''; | ||
|
|
||
| postInstall = '' | ||
| wrapProgram $out/bin/exaile \ | ||
| --set PYTHONPATH $PYTHONPATH \ | ||
| ${lib.optionalString streamripperSupport "--prefix PATH : ${lib.makeBinPath [ streamripper ]}"} | ||
| ''; | ||
|
|
||
| meta = with lib; { | ||
ryneeverett marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| homepage = "https://www.exaile.org/"; | ||
| description = "A music player with a simple interface and powerful music management capabilities"; | ||
| license = licenses.gpl2Only; | ||
| maintainers = with maintainers; [ ryneeverett ]; | ||
| platforms = platforms.all; | ||
| }; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Should we enable them by default?
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.
Maybe? The options I defaulted to false are all plugins that are disabled by default and can be enabled in the gui so the only real consequence is closure size. If they're all going to be true by default perhaps they should be renamed
disableX ? falseper this discussion.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.
@ryneeverett Adding too many options is not very productive as we are not build testing all of the combinations. A power user can always do something like
exaile.override { webkitgtk = 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.
@veprbl I guess I don't really accept the premise that it's a package manager's job to test whether the optional dependencies -- as declared by upstream -- are truly optional. Also isn't your argument equally valid against any number of options?
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.
Also, I ran some builds to compare closure size:
Nearly doubling the closure size in order to install the dependencies of all the plugins (which are disabled by default) seems crazy. Especially when there's no reason to believe upstream is done adding plugins.
Also, particularly for the optional python dependencies, it seems improbable that they have any effect at build time.
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.
When you write an API with a bunch of knobs you usually want those to be tested. In the current setup there is not even a test that exile's build system accepts the libraries that we may pass to it. It will be up to a user to discover if something is broken.
Not sure what you mean by that.
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.
Is there a simple way to test packages with different combinations of inputs? I'm not familiar, though a hack would be to add another top level package
exaileWithPluginsin which all the flags are true.I'm working from the assumption that options are not generally tested and if that's the case then it's not clear that many options are worse in principle than fewer options.
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.
Such package is often called
exaileFull(e.g.gitFull).More options means more combinations to test/debug, or, if you like, combinations left untested.