2022-08-13 09:41:41 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, makeWrapper
|
|
|
|
, openssl
|
|
|
|
, Security
|
|
|
|
, mpv
|
|
|
|
, ffmpeg
|
|
|
|
, nodejs
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "dmlive";
|
2023-09-29 13:55:35 +02:00
|
|
|
version = "5.3.1";
|
2022-08-13 09:41:41 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "THMonster";
|
|
|
|
repo = pname;
|
2023-09-29 13:55:35 +02:00
|
|
|
rev = "0a07fd1b831bc9e9d34e474284430297b63446c7"; # no tag
|
|
|
|
hash = "sha256-Jvxbdm9Swh8m03uZEMTkUhIHNfhE+N2a3w7j+liweKE=";
|
2022-08-13 09:41:41 +02:00
|
|
|
};
|
|
|
|
|
2023-09-29 13:55:35 +02:00
|
|
|
cargoHash = "sha256-/84T7K6WUt2Bfx9qdZjyOHcJEGoquCfRX1ctQBuUjEc=";
|
2022-08-13 09:41:41 +02: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;
|
2023-08-12 22:24:01 +02:00
|
|
|
mainProgram = "dmlive";
|
2022-08-13 09:41:41 +02:00
|
|
|
maintainers = with maintainers; [ nickcao ];
|
|
|
|
};
|
|
|
|
}
|