Merge pull request #297735 from Guanran928/yesplaymusic

yesplaymusic: 0.4.7 -> 0.4.8-2
This commit is contained in:
Weijia Wang 2024-03-31 20:07:43 +02:00 committed by GitHub
commit 1a40a30ce5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 20 additions and 14 deletions

View file

@ -1,7 +1,7 @@
{ lib { lib
, stdenv , stdenv
, fetchurl , fetchurl
, undmg , _7zz
, dpkg , dpkg
, autoPatchelfHook , autoPatchelfHook
, wrapGAppsHook , wrapGAppsHook
@ -23,24 +23,26 @@
}: }:
let let
pname = "yesplaymusic"; pname = "yesplaymusic";
version = "0.4.7"; version = "0.4.8-2";
srcs = { srcs = let
version' = lib.head (lib.splitString "-" version);
in {
x86_64-linux = fetchurl { x86_64-linux = fetchurl {
url = "https://github.com/qier222/YesPlayMusic/releases/download/v${version}/yesplaymusic_${version}_amd64.deb"; url = "https://github.com/qier222/YesPlayMusic/releases/download/v${version}/yesplaymusic_${version'}_amd64.deb";
hash = "sha256-nnnHE2OgIqoz3dC+G0219FVBhvnWivLW1BX6+NYo6Ng="; hash = "sha256-iTWi+tZGUQU7J1mcmMdlWXSKpYGy4mMAeq9CN9fhnZ8=";
}; };
aarch64-linux = fetchurl { aarch64-linux = fetchurl {
url = "https://github.com/qier222/YesPlayMusic/releases/download/v${version}/yesplaymusic_${version}_arm64.deb"; url = "https://github.com/qier222/YesPlayMusic/releases/download/v${version}/yesplaymusic_${version'}_arm64.deb";
hash = "sha256-+rrhY5iDDt/nYs0Vz5/Ef0sgpsdBKMtb1aVfCZLgRgg="; hash = "sha256-PP0apybSORqleOBogldgIV1tYZqao8kZ474muAEDpd0";
}; };
x86_64-darwin = fetchurl { x86_64-darwin = fetchurl {
url = "https://github.com/qier222/YesPlayMusic/releases/download/v${version}/YesPlayMusic-mac-${version}-x64.dmg"; url = "https://github.com/qier222/YesPlayMusic/releases/download/v${version}/YesPlayMusic-mac-${version'}-x64.dmg";
hash = "sha256-z8CASZRWKlj1g3mhxTMMeR4klTvQ2ReSrL7Rt18qQbM="; hash = "sha256-UHnEdoXT/vArSRKXPlfDYUUUMDyF2mnDsmJEjACW2vo=";
}; };
aarch64-darwin = fetchurl { aarch64-darwin = fetchurl {
url = "https://github.com/qier222/YesPlayMusic/releases/download/v${version}/YesPlayMusic-mac-${version}-arm64.dmg"; url = "https://github.com/qier222/YesPlayMusic/releases/download/v${version}/YesPlayMusic-mac-${version'}-arm64.dmg";
hash = "sha256-McYLczudKG4tRNIw/Ws4rht0n4tiKA2M99yKtJbdlY8="; hash = "sha256-FaeumNmkPQYj9Ae2Xw/eKUuezR4bEdni8li+NRU9i1k=";
}; };
}; };
src = srcs.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); src = srcs.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
@ -76,13 +78,19 @@ if stdenv.isDarwin
then stdenv.mkDerivation { then stdenv.mkDerivation {
inherit pname version src meta; inherit pname version src meta;
nativeBuildInputs = [ undmg ]; nativeBuildInputs = [ _7zz makeWrapper ];
sourceRoot = "."; sourceRoot = ".";
installPhase = '' installPhase = ''
runHook preInstall
mkdir -p $out/Applications mkdir -p $out/Applications
cp -r *.app $out/Applications cp -r *.app $out/Applications
makeWrapper $out/Applications/YesPlayMusic.app/Contents/MacOS/YesPlayMusic $out/bin/yesplaymusic
runHook postInstall
''; '';
} }
else stdenv.mkDerivation { else stdenv.mkDerivation {

View file

@ -41325,8 +41325,6 @@ with pkgs;
xmcp = callPackage ../tools/X11/xmcp { }; xmcp = callPackage ../tools/X11/xmcp { };
yesplaymusic = callPackage ../applications/audio/yesplaymusic { };
ymuse = callPackage ../applications/audio/ymuse { }; ymuse = callPackage ../applications/audio/ymuse { };
zeyple = callPackage ../misc/zeyple { }; zeyple = callPackage ../misc/zeyple { };