2022-09-09 14:08:57 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, makeWrapper
|
|
|
|
, openssl
|
|
|
|
, Security
|
|
|
|
, mpv
|
|
|
|
, ffmpeg
|
|
|
|
, nodejs
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "dmlive";
|
2023-03-27 19:17:25 +00:00
|
|
|
version = "5.2.0";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "THMonster";
|
|
|
|
repo = pname;
|
2023-03-27 19:17:25 +00:00
|
|
|
rev = "53c55cb3c087bc00a882331307d210c2965b04d1"; # no tag
|
|
|
|
hash = "sha256-k15IjNGiY0ISEyWxlhZST4dtink/OtoJtv4/8nUn7qY=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
cargoHash = "sha256-0zOwqxD3WX/4e19ywpghdfoGmh2KC+70HbTSYkVHzUA=";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
OPENSSL_NO_VENDOR = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config makeWrapper ];
|
|
|
|
buildInputs = [ openssl ] ++ lib.optional stdenv.isDarwin Security;
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram "$out/bin/dmlive" --prefix PATH : "${lib.makeBinPath [ mpv ffmpeg nodejs ]}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A tool to play and record videos or live streams with danmaku";
|
|
|
|
homepage = "https://github.com/THMonster/dmlive";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ nickcao ];
|
|
|
|
};
|
|
|
|
}
|