2023-08-28 16:58:54 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchzip
|
|
|
|
, makeWrapper
|
|
|
|
, dotnetCorePackages
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
pname = "bililiverecorder";
|
|
|
|
|
|
|
|
dotnet = with dotnetCorePackages; combinePackages [
|
|
|
|
runtime_6_0
|
|
|
|
aspnetcore_6_0
|
|
|
|
];
|
|
|
|
|
2023-10-08 00:24:55 +02:00
|
|
|
version = "2.9.1";
|
|
|
|
hash = "sha256-jAjUrEYfaihMuyL/sLDzdPfq0sKoEglCfRFz0sAtx3g=";
|
2023-08-28 16:58:54 +02:00
|
|
|
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit pname version;
|
|
|
|
|
|
|
|
src = fetchzip {
|
|
|
|
url = "https://github.com/BililiveRecorder/BililiveRecorder/releases/download/v${version}/BililiveRecorder-CLI-any.zip";
|
|
|
|
stripRoot = false;
|
|
|
|
inherit hash;
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out/{bin,share/${pname}-${version}}
|
|
|
|
cp -r * $out/share/${pname}-${version}/.
|
|
|
|
|
|
|
|
makeWrapper "${dotnet}/bin/dotnet" $out/bin/BililiveRecorder \
|
|
|
|
--add-flags "$out/share/${pname}-${version}/BililiveRecorder.Cli.dll"
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A convenient free open source bilibili live recording tool";
|
|
|
|
homepage = "https://rec.danmuji.org/";
|
|
|
|
changelog = "https://github.com/BililiveRecorder/BililiveRecorder/releases/tag/${version}";
|
2023-09-04 14:08:30 +02:00
|
|
|
mainProgram = "BililiveRecorder";
|
2023-08-28 16:58:54 +02:00
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ zaldnoay ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|