2022-09-09 14:08:57 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, makeWrapper
|
|
|
|
, openssl
|
2024-04-21 15:54:59 +00:00
|
|
|
, configd
|
2022-09-09 14:08:57 +00:00
|
|
|
, Security
|
|
|
|
, mpv
|
|
|
|
, ffmpeg
|
|
|
|
, nodejs
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "dmlive";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "5.3.2";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "THMonster";
|
|
|
|
repo = pname;
|
2024-02-29 20:09:43 +00:00
|
|
|
rev = "3736d83ac0920de78ac82fe331bc6b16dc72b5cd"; # no tag
|
|
|
|
hash = "sha256-3agUeAv6Nespn6GNw4wmy8HNPQ0VIgZAMnKiV/myKbA=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
cargoHash = "sha256-MxkWaEn/gMMOuje7lu7PlqsQjnF0LWpV9JzmFBG1ukU=";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
OPENSSL_NO_VENDOR = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config makeWrapper ];
|
2024-04-21 15:54:59 +00:00
|
|
|
buildInputs = [ openssl ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ configd Security ];
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram "$out/bin/dmlive" --prefix PATH : "${lib.makeBinPath [ mpv ffmpeg nodejs ]}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Tool to play and record videos or live streams with danmaku";
|
2022-09-09 14:08:57 +00:00
|
|
|
homepage = "https://github.com/THMonster/dmlive";
|
|
|
|
license = licenses.mit;
|
2023-08-22 20:05:09 +00:00
|
|
|
mainProgram = "dmlive";
|
2022-09-09 14:08:57 +00:00
|
|
|
maintainers = with maintainers; [ nickcao ];
|
|
|
|
};
|
|
|
|
}
|