mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
tauon: 7.9.0 -> 8.0.1
This commit is contained in:
parent
c223facf3a
commit
59041b8f6a
2 changed files with 49 additions and 13 deletions
15
pkgs/by-name/ta/tauon/install_mode_true.patch
Normal file
15
pkgs/by-name/ta/tauon/install_mode_true.patch
Normal file
|
@ -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():
|
|
@ -2,6 +2,7 @@
|
|||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
fetchPypi,
|
||||
kissfft,
|
||||
miniaudio,
|
||||
pkg-config,
|
||||
|
@ -16,6 +17,7 @@
|
|||
librsvg,
|
||||
libsamplerate,
|
||||
libvorbis,
|
||||
xorg,
|
||||
mpg123,
|
||||
opusfile,
|
||||
pango,
|
||||
|
@ -26,16 +28,32 @@
|
|||
withDiscordRPC ? true,
|
||||
}:
|
||||
|
||||
let
|
||||
# fork of pypresence, to be reverted if/when there's an upstream release
|
||||
lynxpresence = python3Packages.buildPythonPackage rec {
|
||||
pname = "lynxpresence";
|
||||
version = "4.4.1";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-y/KboyhEGs9RvyKayEIQu2+WaiQNOdsHDl1/pEoqEkQ=";
|
||||
};
|
||||
|
||||
doCheck = false; # tests require internet connection
|
||||
pythonImportsCheck = [ "lynxpresence" ];
|
||||
};
|
||||
in
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "tauon";
|
||||
version = "7.9.0";
|
||||
version = "8.0.1";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Taiko2k";
|
||||
repo = "Tauon";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-6aEUniLoE5Qtfht3OAe+zvC9yZwjH+KpskmjGowDuuU=";
|
||||
hash = "sha256-m94/zdlJu/u/dchIXhqB47bkl6Uej2hVr8R6RNg8Vaw=";
|
||||
};
|
||||
|
||||
postUnpack = ''
|
||||
|
@ -46,16 +64,16 @@ python3Packages.buildPythonApplication rec {
|
|||
ln -s ${miniaudio.src} source/src/phazor/miniaudio
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/tauon/__main__.py \
|
||||
--replace-fail 'install_mode = False' 'install_mode = True'
|
||||
patches = [
|
||||
./install_mode_true.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/tauon/t_modules/t_phazor.py \
|
||||
--replace-fail 'base_path = Path(pctl.install_directory).parent.parent / "build"' 'base_path = Path("${placeholder "out"}/${python3Packages.python.sitePackages}")'
|
||||
'';
|
||||
|
||||
pythonRemoveDeps = [
|
||||
"pysdl2-dll"
|
||||
"opencc"
|
||||
"tekore"
|
||||
];
|
||||
|
@ -105,23 +123,26 @@ python3Packages.buildPythonApplication rec {
|
|||
pychromecast
|
||||
pylast
|
||||
pygobject3
|
||||
pysdl2
|
||||
pysdl3
|
||||
requests
|
||||
send2trash
|
||||
setproctitle
|
||||
tidalapi
|
||||
]
|
||||
++ lib.optional withDiscordRPC pypresence
|
||||
++ lib.optional withDiscordRPC lynxpresence
|
||||
++ lib.optional stdenv.hostPlatform.isLinux pulsectl;
|
||||
|
||||
makeWrapperArgs = [
|
||||
"--prefix PATH : ${lib.makeBinPath [ ffmpeg ]}"
|
||||
"--prefix LD_LIBRARY_PATH : ${
|
||||
lib.makeLibraryPath [
|
||||
game-music-emu
|
||||
libopenmpt
|
||||
pulseaudio
|
||||
]
|
||||
lib.makeLibraryPath (
|
||||
[
|
||||
game-music-emu
|
||||
libopenmpt
|
||||
pulseaudio
|
||||
]
|
||||
++ lib.optional stdenv.hostPlatform.isLinux xorg.libXcursor
|
||||
)
|
||||
}"
|
||||
"--prefix PYTHONPATH : $out/share/tauon"
|
||||
"--set GI_TYPELIB_PATH $GI_TYPELIB_PATH"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue