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-07-15 17:15:38 +00:00
|
|
|
version = "5.3.0";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "THMonster";
|
|
|
|
repo = pname;
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = "92ce90163c3d84f0fab99e6dc192a65c616ffd81"; # no tag
|
|
|
|
hash = "sha256-3eRC/XmvZXe3DyXOqSkNpTbddtGr/lcaTaFYqZLZq+w=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
cargoHash = "sha256-TQTdz+ZC5cZxWhccnUmXnq+j2EYM5486mIjn6Poe5a8=";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|