splayer: 3.0.0-beta.8.2025 -> 3.0.0-beta.9 (#485302)
This commit is contained in:
@@ -10,21 +10,23 @@
|
||||
rustPlatform,
|
||||
cargo,
|
||||
rustc,
|
||||
python3,
|
||||
makeWrapper,
|
||||
copyDesktopItems,
|
||||
makeDesktopItem,
|
||||
nix-update-script,
|
||||
removeReferencesTo,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "splayer";
|
||||
version = "3.0.0-beta.8.2025";
|
||||
version = "3.0.0-beta.9";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "imsyy";
|
||||
repo = "SPlayer";
|
||||
tag = "v${finalAttrs.version}";
|
||||
fetchSubmodules = false;
|
||||
hash = "sha256-LS9Z+dfL50ICaF8WskiKswl3LD7aSrpJHu6DY9m6ByE=";
|
||||
hash = "sha256-+9F4ckATxRE+/PhMi5c1GVDq5V9QMOogCD9uT6QkREM=";
|
||||
};
|
||||
|
||||
pnpmDeps = fetchPnpmDeps {
|
||||
@@ -35,7 +37,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
;
|
||||
pnpm = pnpm_10;
|
||||
fetcherVersion = 2;
|
||||
hash = "sha256-t1pZJ7j+VyvXSTctNVg2XkoQ4CA6DlkxOlK9akDghUU=";
|
||||
hash = "sha256-tAOtrxQasIQ1IS2jKdcX4KEM5p3zhshqw8phzsj667Q=";
|
||||
};
|
||||
|
||||
cargoDeps = rustPlatform.fetchCargoVendor {
|
||||
@@ -44,7 +46,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
version
|
||||
src
|
||||
;
|
||||
hash = "sha256-LJuY9BFI+/GSckilZCXs3cw1EEG5Oy/iSljIABqsD/E=";
|
||||
hash = "sha256-QKk1coOuZNaqKgvbBgorvOotHmTJ+YXTHBfyhF0L37E=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
@@ -54,6 +56,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
rustPlatform.cargoSetupHook
|
||||
cargo
|
||||
rustc
|
||||
python3
|
||||
makeWrapper
|
||||
copyDesktopItems
|
||||
];
|
||||
@@ -73,6 +76,21 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
# After the pnpm configure, we need to build the binaries of all instances
|
||||
# of better-sqlite3. It has a native part that it wants to build using a
|
||||
# script which is disallowed.
|
||||
# What's more, we need to use headers from electron to avoid ABI mismatches.
|
||||
# Adapted from mkYarnModules.
|
||||
for f in $(find . -path '*/node_modules/better-sqlite3' -type d); do
|
||||
(cd "$f" && (
|
||||
npm run build-release --offline --nodedir="${electron.headers}"
|
||||
find build -type f -exec \
|
||||
${lib.getExe removeReferencesTo} \
|
||||
-t "${electron.headers}" {} \;
|
||||
))
|
||||
done
|
||||
rm -rf build/Release/{.deps,obj,obj.target,test_extension.node}
|
||||
|
||||
pnpm build
|
||||
|
||||
npm exec electron-builder -- \
|
||||
@@ -130,9 +148,18 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
meta = {
|
||||
description = "Simple Netease Cloud Music player";
|
||||
homepage = "https://github.com/imsyy/SPlayer";
|
||||
changelog = "https://github.com/imsyy/SPlayer/releases/tag/v${finalAttrs.version}";
|
||||
license = lib.licenses.agpl3Only;
|
||||
maintainers = with lib.maintainers; [ ccicnce113424 ];
|
||||
mainProgram = "splayer";
|
||||
platforms = lib.platforms.linux;
|
||||
sourceProvenance = with lib.sourceTypes; [
|
||||
fromSource
|
||||
# public/wasm/ffmpeg.wasm
|
||||
# source: https://github.com/apoint123/ffmpeg-audio-player
|
||||
# native/ferrous-opencc-wasm/pkg/ferrous_opencc_wasm_bg.wasm
|
||||
# source: native/ferrous-opencc-wasm
|
||||
binaryBytecode
|
||||
];
|
||||
};
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user