about summary refs log tree commit diff
path: root/pkgs/applications/video
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2022-08-26 22:44:45 +0200
committerGitHub <noreply@github.com>2022-08-26 22:44:45 +0200
commit4919d1d95537128dcd9e2b4da13620d9179c5bb7 (patch)
treef67cc037a360882c11a5627c16cfcdf4deff2604 /pkgs/applications/video
parent12f74551c79d33235229888af1df6c127d3aeb86 (diff)
parent8acd2a6a6c5890c0897deb023e60d9847bb31c4e (diff)
Merge pull request #186398 from NickCao/dmlive
Diffstat (limited to 'pkgs/applications/video')
-rw-r--r--pkgs/applications/video/dmlive/default.nix42
1 files changed, 42 insertions, 0 deletions
diff --git a/pkgs/applications/video/dmlive/default.nix b/pkgs/applications/video/dmlive/default.nix
new file mode 100644
index 0000000000000..49c542b459fbf
--- /dev/null
+++ b/pkgs/applications/video/dmlive/default.nix
@@ -0,0 +1,42 @@
+{ lib
+, stdenv
+, rustPlatform
+, fetchFromGitHub
+, pkg-config
+, makeWrapper
+, openssl
+, Security
+, mpv
+, ffmpeg
+, nodejs
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "dmlive";
+  version = "unstable-2022-08-22";
+
+  src = fetchFromGitHub {
+    owner = "THMonster";
+    repo = pname;
+    rev = "fd4fa1859f05350658db598a50d29f59d22b55a1";
+    hash = "sha256-NVabHLxPHi7hWoztthPmVC5VRKQKglpytuUQOY1Hzrw=";
+  };
+
+  cargoHash = "sha256-TziP7n9Xgi/wHaiF/NI6noMp1iR6vRuAXxvKJwQHbTw=";
+
+  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 ];
+  };
+}