-
-
Notifications
You must be signed in to change notification settings - Fork 18.9k
tauon: 7.9.0 -> 8.0.1 #405753
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
tauon: 7.9.0 -> 8.0.1 #405753
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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,15 @@ | ||
| diff --git a/src/tauon/__main__.py b/src/tauon/__main__.py | ||
| index 04691586..e48afa02 100755 | ||
| --- a/src/tauon/__main__.py | ||
| +++ b/src/tauon/__main__.py | ||
| @@ -115,8 +115,8 @@ def transfer_args_and_exit() -> None: | ||
| if "--no-start" in sys.argv: | ||
| transfer_args_and_exit() | ||
|
|
||
| -# If we're installed, use home data locations | ||
| -install_mode = bool(str(install_directory).startswith(("/opt/", "/usr/", "/app/", "/snap/")) or sys.platform in ("darwin", "win32")) | ||
| +# Nixpkgs install, use home data dirs. | ||
| +install_mode = True | ||
|
|
||
| # Assume that it's a classic Linux install, use standard paths | ||
| if str(install_directory).startswith("/usr/") and Path("/usr/share/TauonMusicBox").is_dir(): |
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
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,102 @@ | ||||||||||
| { | ||||||||||
| stdenv, | ||||||||||
| lib, | ||||||||||
| fetchurl, | ||||||||||
| fetchFromGitHub, | ||||||||||
| python, | ||||||||||
| buildPythonPackage, | ||||||||||
| setuptools-scm, | ||||||||||
| packaging, | ||||||||||
| aiohttp, | ||||||||||
| requests, | ||||||||||
|
|
||||||||||
| # native dependencies | ||||||||||
| sdl3, | ||||||||||
| sdl3-ttf, | ||||||||||
| sdl3-image, | ||||||||||
| }: | ||||||||||
|
|
||||||||||
| let | ||||||||||
| dochash = | ||||||||||
| if stdenv.hostPlatform.isLinux then | ||||||||||
| "sha256-+1zLd308zL+m68kLMeOWWxT0wYDgCd6g9cc2hEtaeUs=" | ||||||||||
| else if stdenv.hostPlatform.isDarwin then | ||||||||||
| "sha256-2uB9+ABgv5O376LyHb0ShGjM4LHYzMRMxk/k+1LBmv0=" | ||||||||||
| else if stdenv.hostPlatform.isWindows then | ||||||||||
| "sha256-46bQSPYctycizf2GXichd5V74LjxwIAPhBmklXAJ/Jg=" | ||||||||||
| else | ||||||||||
| throw "PySDL3 does not support ${stdenv.hostPlatform.uname.system}"; | ||||||||||
| lib_ext = stdenv.hostPlatform.extensions.sharedLibrary; | ||||||||||
| in | ||||||||||
| buildPythonPackage rec { | ||||||||||
| pname = "pysdl3"; | ||||||||||
| version = "0.9.8b1"; | ||||||||||
| pyproject = true; | ||||||||||
|
|
||||||||||
| pythonImportsCheck = [ "sdl3" ]; | ||||||||||
|
|
||||||||||
| src = fetchFromGitHub { | ||||||||||
| owner = "Aermoss"; | ||||||||||
| repo = "PySDL3"; | ||||||||||
| tag = "v${version}"; | ||||||||||
| hash = "sha256-FVUCcqKTq6qdNkYHTYFiUxt2HIaNC5LK0BEUfz8Mue8="; | ||||||||||
| }; | ||||||||||
|
|
||||||||||
| docfile = fetchurl { | ||||||||||
| url = "https://github.com/Aermoss/PySDL3/releases/download/v${version}/${stdenv.hostPlatform.uname.system}-Docs.py"; | ||||||||||
| hash = "${dochash}"; | ||||||||||
| }; | ||||||||||
|
|
||||||||||
| postUnpack = '' | ||||||||||
| cp ${docfile} source/sdl3/__doc__.py | ||||||||||
| ''; | ||||||||||
|
|
||||||||||
| postInstall = '' | ||||||||||
| mkdir $out/${python.sitePackages}/sdl3/bin | ||||||||||
| ln -s ${sdl3}/lib/libSDL3${lib_ext} -t $out/${python.sitePackages}/sdl3/bin | ||||||||||
| ln -s ${sdl3-ttf}/lib/libSDL3_ttf${lib_ext} -t $out/${python.sitePackages}/sdl3/bin | ||||||||||
| ln -s ${sdl3-image}/lib/libSDL3_image${lib_ext} -t $out/${python.sitePackages}/sdl3/bin | ||||||||||
| ''; | ||||||||||
|
|
||||||||||
| build-system = [ | ||||||||||
| setuptools-scm | ||||||||||
| ]; | ||||||||||
|
|
||||||||||
| buildInputs = [ | ||||||||||
| sdl3 | ||||||||||
| sdl3-ttf | ||||||||||
| sdl3-image | ||||||||||
| ]; | ||||||||||
|
|
||||||||||
| dependencies = [ | ||||||||||
| packaging | ||||||||||
| aiohttp | ||||||||||
| requests | ||||||||||
| ]; | ||||||||||
|
|
||||||||||
| # PySDL3 tries to update both itself and SDL binaries at runtime. This hook | ||||||||||
| # sets some env variables to tell it not to do that. | ||||||||||
| setupHook = ./setup-hook.sh; | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you add a comment above that explains the reason for this
Suggested change
|
||||||||||
|
|
||||||||||
| env = { | ||||||||||
| SDL_VIDEODRIVER = "dummy"; | ||||||||||
| SDL_AUDIODRIVER = "dummy"; | ||||||||||
| SDL_RENDER_DRIVER = "software"; | ||||||||||
| PYTHONFAULTHANDLER = "1"; | ||||||||||
| }; | ||||||||||
|
|
||||||||||
| meta = { | ||||||||||
| description = "Pure Python wrapper for SDL3"; | ||||||||||
| homepage = "https://github.com/Aermoss/PySDL3"; | ||||||||||
| license = lib.licenses.mit; | ||||||||||
| maintainers = with lib.maintainers; [ jansol ]; | ||||||||||
|
jansol marked this conversation as resolved.
Outdated
|
||||||||||
| platforms = [ | ||||||||||
| "aarch64-linux" | ||||||||||
| "x86_64-linux" | ||||||||||
| "aarch64-windows" | ||||||||||
| "x86_64-windows" | ||||||||||
| "aarch64-darwin" | ||||||||||
| "x86_64-darwin" | ||||||||||
| ]; | ||||||||||
| }; | ||||||||||
| } | ||||||||||
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,10 @@ | ||
| # See also | ||
| # https://pysdl3.readthedocs.io/en/latest/install.html#the-environment-variable-method | ||
|
|
||
| # Don't check Pypi for new PySDL3 releases at runtime | ||
| export SDL_CHECK_VERSION=0 | ||
|
pbsds marked this conversation as resolved.
Outdated
|
||
| # Don't try to download SDL binaries at runtime | ||
| export SDL_DOWNLOAD_BINARIES=0 | ||
| # Nixpkgs does not provide a metadata.json. Instead we want PySDL3 to find the | ||
| # SDL libraries we symlink into its site-packages | ||
| export SDL_DISABLE_METADATA=1 | ||
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
rather than fetching this generated asset, please generate it in the derivation if possible. The procedure seems to be in https://github.com/Aermoss/PySDL3/blob/main/.github/workflows/generate_docs.yml.
If we do have to fetch it, then we should set
meta.sourceProvenanceaccordingly.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 generator attempts to first download the file from the github release so that would not really change anything. If downloading it from the github release fails, it starts scraping docs from libsdl.org which I'm also not a huge fan of (it mostly seems like a great way to get our CI machines IP blocked these days).
Ideally we'd generate the docs from our own SDL3 build. I was going to propose supporting that case to upstream but didn't manage to get nixpkgs SDL3 to generate its documentation...
Uh oh!
There was an error while loading. Please reload this page.
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.
sounds like a big can of worms, i'm not against fetching it in the meanwhile 👍
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.
What shoud
meta.sourceProvenancebe set to in this case?binaryBytecode?