nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 64 lines 1.3 kB view raw
1{ 2 lib, 3 rustPlatform, 4 fetchFromGitHub, 5 fetchurl, 6 pkg-config, 7 makeWrapper, 8 openssl, 9 mpv, 10 ffmpeg, 11}: 12 13let 14 desktop = fetchurl { 15 url = "https://github.com/THMonster/Revda/raw/e1c236f6f940443419b6202735b6f8a0c9cdbe8b/misc/dmlive-mime.desktop"; 16 hash = "sha256-k4h0cSfjuTZAYLjbaTfcye1aC5obd6D3tAZjgBV8xCI="; 17 }; 18in 19 20rustPlatform.buildRustPackage { 21 pname = "dmlive"; 22 version = "5.7.0-unstable-2026-01-02"; 23 24 src = fetchFromGitHub { 25 owner = "THMonster"; 26 repo = "dmlive"; 27 rev = "47b06e57fc0fa9cf888f7c054f776a73d65e77ce"; # no tag 28 hash = "sha256-Q1QOJZ6VW65MG0wzJAgW9p4mF6a48qYRdDaeQyDTbk8="; 29 }; 30 31 cargoHash = "sha256-hRJ81Opxh3tHHZAVTXzQKTmv+psbeGW1KHyoRBfnnWI="; 32 33 nativeBuildInputs = [ 34 pkg-config 35 makeWrapper 36 ]; 37 38 buildInputs = [ 39 openssl 40 ]; 41 42 postInstall = '' 43 wrapProgram "$out/bin/dmlive" --suffix PATH : "${ 44 lib.makeBinPath [ 45 mpv 46 ffmpeg 47 ] 48 }" 49 install -Dm644 ${desktop} $out/share/applications/dmlive-mime.desktop 50 ''; 51 52 env.OPENSSL_NO_VENDOR = true; 53 54 meta = { 55 description = "Tool to play and record videos or live streams with danmaku"; 56 homepage = "https://github.com/THMonster/dmlive"; 57 license = lib.licenses.mit; 58 mainProgram = "dmlive"; 59 maintainers = with lib.maintainers; [ 60 nickcao 61 rebmit 62 ]; 63 }; 64}