2022-08-13 07:41:41 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, makeWrapper
|
|
|
|
, openssl
|
2024-03-23 17:58:03 +00:00
|
|
|
, configd
|
2022-08-13 07:41:41 +00:00
|
|
|
, Security
|
|
|
|
, mpv
|
|
|
|
, ffmpeg
|
|
|
|
, nodejs
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "dmlive";
|
2024-02-13 13:46:15 +00:00
|
|
|
version = "5.3.2";
|
2022-08-13 07:41:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "THMonster";
|
|
|
|
repo = pname;
|
2024-02-13 13:46:15 +00:00
|
|
|
rev = "3736d83ac0920de78ac82fe331bc6b16dc72b5cd"; # no tag
|
|
|
|
hash = "sha256-3agUeAv6Nespn6GNw4wmy8HNPQ0VIgZAMnKiV/myKbA=";
|
2022-08-13 07:41:41 +00:00
|
|
|
};
|
|
|
|
|
2024-02-13 13:46:15 +00:00
|
|
|
cargoHash = "sha256-MxkWaEn/gMMOuje7lu7PlqsQjnF0LWpV9JzmFBG1ukU=";
|
2022-08-13 07:41:41 +00:00
|
|
|
|
|
|
|
OPENSSL_NO_VENDOR = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config makeWrapper ];
|
2024-03-23 17:58:03 +00:00
|
|
|
buildInputs = [ openssl ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ configd Security ];
|
2022-08-13 07:41:41 +00:00
|
|
|
|
|
|
|
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;
|
2023-08-12 20:24:01 +00:00
|
|
|
mainProgram = "dmlive";
|
2022-08-13 07:41:41 +00:00
|
|
|
maintainers = with maintainers; [ nickcao ];
|
|
|
|
};
|
|
|
|
}
|