Skip to content

Commit 59041b8

Browse files
committed
tauon: 7.9.0 -> 8.0.1
1 parent c223fac commit 59041b8

2 files changed

Lines changed: 49 additions & 13 deletions

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
diff --git a/src/tauon/__main__.py b/src/tauon/__main__.py
2+
index 04691586..e48afa02 100755
3+
--- a/src/tauon/__main__.py
4+
+++ b/src/tauon/__main__.py
5+
@@ -115,8 +115,8 @@ def transfer_args_and_exit() -> None:
6+
if "--no-start" in sys.argv:
7+
transfer_args_and_exit()
8+
9+
-# If we're installed, use home data locations
10+
-install_mode = bool(str(install_directory).startswith(("/opt/", "/usr/", "/app/", "/snap/")) or sys.platform in ("darwin", "win32"))
11+
+# Nixpkgs install, use home data dirs.
12+
+install_mode = True
13+
14+
# Assume that it's a classic Linux install, use standard paths
15+
if str(install_directory).startswith("/usr/") and Path("/usr/share/TauonMusicBox").is_dir():

pkgs/by-name/ta/tauon/package.nix

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
lib,
33
stdenv,
44
fetchFromGitHub,
5+
fetchPypi,
56
kissfft,
67
miniaudio,
78
pkg-config,
@@ -16,6 +17,7 @@
1617
librsvg,
1718
libsamplerate,
1819
libvorbis,
20+
xorg,
1921
mpg123,
2022
opusfile,
2123
pango,
@@ -26,16 +28,32 @@
2628
withDiscordRPC ? true,
2729
}:
2830

31+
let
32+
# fork of pypresence, to be reverted if/when there's an upstream release
33+
lynxpresence = python3Packages.buildPythonPackage rec {
34+
pname = "lynxpresence";
35+
version = "4.4.1";
36+
format = "setuptools";
37+
38+
src = fetchPypi {
39+
inherit pname version;
40+
hash = "sha256-y/KboyhEGs9RvyKayEIQu2+WaiQNOdsHDl1/pEoqEkQ=";
41+
};
42+
43+
doCheck = false; # tests require internet connection
44+
pythonImportsCheck = [ "lynxpresence" ];
45+
};
46+
in
2947
python3Packages.buildPythonApplication rec {
3048
pname = "tauon";
31-
version = "7.9.0";
49+
version = "8.0.1";
3250
pyproject = true;
3351

3452
src = fetchFromGitHub {
3553
owner = "Taiko2k";
3654
repo = "Tauon";
3755
tag = "v${version}";
38-
hash = "sha256-6aEUniLoE5Qtfht3OAe+zvC9yZwjH+KpskmjGowDuuU=";
56+
hash = "sha256-m94/zdlJu/u/dchIXhqB47bkl6Uej2hVr8R6RNg8Vaw=";
3957
};
4058

4159
postUnpack = ''
@@ -46,16 +64,16 @@ python3Packages.buildPythonApplication rec {
4664
ln -s ${miniaudio.src} source/src/phazor/miniaudio
4765
'';
4866

49-
postPatch = ''
50-
substituteInPlace src/tauon/__main__.py \
51-
--replace-fail 'install_mode = False' 'install_mode = True'
67+
patches = [
68+
./install_mode_true.patch
69+
];
5270

71+
postPatch = ''
5372
substituteInPlace src/tauon/t_modules/t_phazor.py \
5473
--replace-fail 'base_path = Path(pctl.install_directory).parent.parent / "build"' 'base_path = Path("${placeholder "out"}/${python3Packages.python.sitePackages}")'
5574
'';
5675

5776
pythonRemoveDeps = [
58-
"pysdl2-dll"
5977
"opencc"
6078
"tekore"
6179
];
@@ -105,23 +123,26 @@ python3Packages.buildPythonApplication rec {
105123
pychromecast
106124
pylast
107125
pygobject3
108-
pysdl2
126+
pysdl3
109127
requests
110128
send2trash
111129
setproctitle
112130
tidalapi
113131
]
114-
++ lib.optional withDiscordRPC pypresence
132+
++ lib.optional withDiscordRPC lynxpresence
115133
++ lib.optional stdenv.hostPlatform.isLinux pulsectl;
116134

117135
makeWrapperArgs = [
118136
"--prefix PATH : ${lib.makeBinPath [ ffmpeg ]}"
119137
"--prefix LD_LIBRARY_PATH : ${
120-
lib.makeLibraryPath [
121-
game-music-emu
122-
libopenmpt
123-
pulseaudio
124-
]
138+
lib.makeLibraryPath (
139+
[
140+
game-music-emu
141+
libopenmpt
142+
pulseaudio
143+
]
144+
++ lib.optional stdenv.hostPlatform.isLinux xorg.libXcursor
145+
)
125146
}"
126147
"--prefix PYTHONPATH : $out/share/tauon"
127148
"--set GI_TYPELIB_PATH $GI_TYPELIB_PATH"

0 commit comments

Comments
 (0)