2023-03-01 16:18:11 +01:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2023-07-29 15:08:14 +02:00
|
|
|
, meta
|
2023-03-01 16:18:11 +01:00
|
|
|
, fetchurl
|
2023-07-29 15:08:14 +02:00
|
|
|
, unzip
|
2023-03-01 16:18:11 +01:00
|
|
|
, mpv
|
|
|
|
, electron_24
|
|
|
|
, makeDesktopItem
|
|
|
|
, makeWrapper
|
|
|
|
, pname
|
|
|
|
, appname
|
|
|
|
, version
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2023-10-10 08:31:22 +02:00
|
|
|
inherit pname version meta;
|
2023-03-01 16:18:11 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2023-07-29 15:08:14 +02:00
|
|
|
url = "https://github.com/jeffvli/feishin/releases/download/v${version}/${appname}-${version}-mac-x64.zip";
|
2023-11-03 10:05:24 +01:00
|
|
|
hash = "sha256-sJg3hYOiELm+edw2JTFt6cPFdbDj6mLcLngeqEPaPgs=";
|
2023-03-01 16:18:11 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
}
|