diff --git a/pkgs/applications/audio/termusic/default.nix b/pkgs/applications/audio/termusic/default.nix index 158f2e708b17..0df3cfcb46b8 100644 --- a/pkgs/applications/audio/termusic/default.nix +++ b/pkgs/applications/audio/termusic/default.nix @@ -1,39 +1,66 @@ -{ lib -, stdenv -, rustPlatform -, fetchCrate -, fetchpatch +{ + alsa-lib +, AppKit +, CoreAudio +, CoreGraphics +, dbus +, Foundation +, fetchFromGitHub +, glib +, gst_all_1 +, IOKit +, lib +, MediaPlayer +, openssl , pkg-config -, alsa-lib -, darwin +, protobuf +, rustPlatform +, Security +, sqlite +, stdenv }: rustPlatform.buildRustPackage rec { pname = "termusic"; - version = "0.7.10"; + version = "0.7.11"; - src = fetchCrate { - inherit pname version; - hash = "sha256-m0hi5u4BcRcEDEpg1BoWXc25dfhD6+OJtqSZfSdV0HM="; + src = fetchFromGitHub { + owner = "tramhao"; + repo = "termusic"; + rev = "v${version}"; + hash = "sha256-ykOBXM/WF+zasAt+6mgY2aSFCpGaYcqk+YI7YLM3MWs="; }; - cargoHash = "sha256-A83gLsaPm6t4nm7DJfcp9z1huDU/Sfy9gunP8pzBiCA="; + cargoHash = "sha256-BrOpU0RFdlRXQIMjfHfs/XYIdBCYKFSA+5by/rGzC8Y="; nativeBuildInputs = [ pkg-config + protobuf rustPlatform.bindgenHook ]; - buildInputs = lib.optionals stdenv.isLinux [ - alsa-lib + buildInputs = [ + dbus + glib + gst_all_1.gstreamer + openssl + sqlite ] ++ lib.optionals stdenv.isDarwin [ - darwin.apple_sdk.frameworks.AudioUnit + AppKit + CoreAudio + CoreGraphics + Foundation + IOKit + MediaPlayer + Security + ] ++ lib.optionals stdenv.isLinux [ + alsa-lib ]; - meta = with lib; { + meta = { description = "Terminal Music Player TUI written in Rust"; homepage = "https://github.com/tramhao/termusic"; - license = with licenses; [ gpl3Only ]; - maintainers = with maintainers; [ devhell ]; + license = with lib.licenses; [ gpl3Only ]; + maintainers = with lib.maintainers; [ devhell ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a5d7e8bb161f..7e6b96914a03 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1944,7 +1944,9 @@ with pkgs; tere = callPackage ../tools/misc/tere { }; - termusic = callPackage ../applications/audio/termusic { }; + termusic = darwin.apple_sdk_11_0.callPackage ../applications/audio/termusic { + inherit (darwin.apple_sdk_11_0.frameworks) AppKit CoreAudio CoreGraphics Foundation IOKit MediaPlayer Security; + }; tfk8s = callPackage ../tools/misc/tfk8s { };