feishin: init at 0.2.0
This commit is contained in:
parent
c35a9050ef
commit
00bb7e7c4d
39
pkgs/applications/audio/feishin/darwin.nix
Normal file
39
pkgs/applications/audio/feishin/darwin.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchurl
|
||||
, mpv
|
||||
, electron_24
|
||||
, makeDesktopItem
|
||||
, makeWrapper
|
||||
, pname
|
||||
, appname
|
||||
, version
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
inherit pname version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/jeffvli/feishin/releases/download/v${version}/${appname}-${version}-mac-x64.zip"
|
||||
hash = "sha256-WzU/Yd3cNMIpmkKWC29mQlviYXiYV5k8+80iyzilPGc=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper unzip ];
|
||||
|
||||
# Installs mpv as a requirement
|
||||
propagatedBuildInputs = [ mpv ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/{Applications/${appname}.app,bin}
|
||||
cp -R . $out/Applications/${appname}.app
|
||||
makeWrapper $out/Applications/${appname}.app/Contents/MacOS/${appname} $out/bin/${pname}
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
shellHook = ''
|
||||
set -x
|
||||
export LD_LIBRARY_PATH=${mpv}/lib
|
||||
set +x
|
||||
'';
|
||||
}
|
26
pkgs/applications/audio/feishin/default.nix
Normal file
26
pkgs/applications/audio/feishin/default.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, callPackage
|
||||
, ...
|
||||
}@args:
|
||||
|
||||
let
|
||||
extraArgs = removeAttrs args [ "callPackage" ];
|
||||
|
||||
pname = "feishin";
|
||||
version = "0.2.0";
|
||||
appname = "Feishin";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Full-featured Subsonic/Jellyfin compatible desktop music player";
|
||||
homepage = "https://github.com/jeffvli/feishin";
|
||||
changelog = "https://github.com/jeffvli/feishin/releases/tag/v${version}";
|
||||
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
||||
license = licenses.mit;
|
||||
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
||||
maintainers = with maintainers; [ onny ];
|
||||
};
|
||||
|
||||
in if stdenv.isDarwin
|
||||
then callPackage ./darwin.nix (extraArgs // { inherit pname appname version meta; })
|
||||
else callPackage ./linux.nix (extraArgs // { inherit pname appname version meta; })
|
71
pkgs/applications/audio/feishin/linux.nix
Normal file
71
pkgs/applications/audio/feishin/linux.nix
Normal file
|
@ -0,0 +1,71 @@
|
|||
{ stdenv
|
||||
, meta
|
||||
, lib
|
||||
, fetchurl
|
||||
, mpv
|
||||
, graphicsmagick
|
||||
, electron_24
|
||||
, makeDesktopItem
|
||||
, makeWrapper
|
||||
, pname
|
||||
, appname
|
||||
, version
|
||||
}:
|
||||
|
||||
let
|
||||
icon = fetchurl {
|
||||
url =
|
||||
"https://github.com/jeffvli/feishin/raw/development/assets/icons/1024x1024.png";
|
||||
sha256 = "sha256-8Qigt1CNMa3SDVK2cdqWJuMSl19yfy6nPQfME4qA48I=";
|
||||
};
|
||||
|
||||
desktopItem = makeDesktopItem {
|
||||
name = "feishin";
|
||||
desktopName = "Feishin";
|
||||
comment = "Full-featured Subsonic/Jellyfin compatible desktop music player";
|
||||
icon = "feishin";
|
||||
exec = "feishin %u";
|
||||
categories = [ "Audio" ];
|
||||
mimeTypes = [ "x-scheme-handler/feishin" ];
|
||||
};
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
inherit pname version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/jeffvli/feishin/releases/download/v${version}/${appname}-${version}-linux-x64.tar.xz";
|
||||
hash = "sha256-o+fEjdG2iN84FEchyAKWZCpsrqDm1K1k+Q2K+cwYBZE=";
|
||||
};
|
||||
|
||||
|
||||
nativeBuildInputs = [ makeWrapper graphicsmagick ];
|
||||
|
||||
# Installs mpv as a requirement
|
||||
propagatedBuildInputs = [ mpv ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
mkdir -p $out/share
|
||||
cp -r resources $out/share/${pname}/
|
||||
cp -r locales $out/share/${pname}/
|
||||
|
||||
makeWrapper ${electron_24}/bin/electron $out/bin/${pname} \
|
||||
--add-flags $out/share/${pname}/app.asar
|
||||
install -m 444 -D "${desktopItem}/share/applications/"* \
|
||||
-t $out/share/applications/
|
||||
for size in 16 24 32 48 64 128 256 512; do
|
||||
mkdir -p $out/share/icons/hicolor/"$size"x"$size"/apps
|
||||
gm convert -resize "$size"x"$size" ${icon} $out/share/icons/hicolor/"$size"x"$size"/apps/${appname}.png
|
||||
done
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
shellHook = ''
|
||||
set -x
|
||||
export LD_LIBRARY_PATH=${mpv}/lib
|
||||
set +x
|
||||
'';
|
||||
}
|
|
@ -31249,6 +31249,8 @@ with pkgs;
|
|||
imlib2 = imlib2Full;
|
||||
};
|
||||
|
||||
feishin = callPackage ../applications/audio/feishin { };
|
||||
|
||||
feishu = callPackage ../applications/networking/instant-messengers/feishu { };
|
||||
|
||||
filezilla = callPackage ../applications/networking/ftp/filezilla { };
|
||||
|
|
Loading…
Reference in a new issue