nixpkgs/pkgs/applications/audio/feishin/darwin.nix
Artturin 1c7b43d942 feishin: fix warning in desktop file & add forgotten inherit meta
```
feishin.desktop> ...feishin.desktop: error: (will be fatal in the future): value item "Audio" in key "Categories" in group "Desktop Entry" requires another category to be present among the following categories: AudioVideo
```
2023-10-10 09:37:04 +03:00

42 lines
846 B
Nix

{ stdenv
, lib
, meta
, fetchurl
, unzip
, mpv
, electron_24
, makeDesktopItem
, makeWrapper
, pname
, appname
, version
}:
stdenv.mkDerivation {
inherit pname version meta;
src = fetchurl {
url = "https://github.com/jeffvli/feishin/releases/download/v${version}/${appname}-${version}-mac-x64.zip";
hash = "sha256-6GYp9uzlR1eVRYhNU3kOmcUOPFY3J9eJPqN+TucNavA=";
};
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
'';
}