1{
2 lib,
3 fetchFromGitHub,
4 rustPlatform,
5 pkg-config,
6 openssl,
7 alsa-lib,
8 ffmpeg_6,
9}:
10
11rustPlatform.buildRustPackage {
12 pname = "rustplayer";
13 version = "1.1.2-unstable-2024-07-14";
14
15 src = fetchFromGitHub {
16 owner = "Kingtous";
17 repo = "RustPlayer";
18 rev = "29a16f01912bc3e92008c7ae2f9569c8d7250bd3";
19 hash = "sha256-+36dLp54rfNK0lSSTG5+J6y51NUtBhtwfhD7L23J5aY=";
20 };
21
22 # This patch is from the source
23 patches = [
24 ./dynamic-lib.patch
25 ];
26
27 cargoHash = "sha256-cfr5q44SzJ5iYm8cu/3+RkoPaoUklmOV/UbSdZZbu38=";
28
29 nativeBuildInputs = [
30 pkg-config
31 rustPlatform.bindgenHook
32 ];
33 buildInputs = [
34 alsa-lib
35 openssl
36 ffmpeg_6
37 ];
38
39 checkFlags = [
40 # network required
41 "--skip=fetch_and_play"
42 ];
43
44 meta = with lib; {
45 homepage = "https://github.com/Kingtous/RustPlayer";
46 description = "Local audio player and network m3u8 radio player using a terminal interface";
47 license = licenses.gpl3Only;
48 maintainers = with maintainers; [ oluceps ];
49 platforms = platforms.unix;
50 };
51}