From 91eae85639115d0f7006a57235eeb8d40d493ffc Mon Sep 17 00:00:00 2001 From: VuiMuich Date: Fri, 11 Aug 2023 08:56:43 +0200 Subject: termusic: 0.7.10 -> 0.7.11 (#247425) * termusic: 0.7.10 -> 0.7.11 * termusic: sort attributes alphabetically, remove `with lib;` * termusic: fix builds on Darwin * termusic: fix builds on Darwin * termusic: fix builds on x86_64 Darwin * termusic: fix builds on Darwin * Revert "termusic: fix builds on Darwin" This reverts commit 90670409e9e3c9bcea18335e91f414cf038525b5. This reverts commit f137ccf1094714b6f0f88b775771c6d826fc2736. * termusic: fix builds on Darwin * termusic: fix builds on Darwin --------- Co-authored-by: Pol Dellaiera --- pkgs/applications/audio/termusic/default.nix | 63 ++++++++++++++++++++-------- pkgs/top-level/all-packages.nix | 4 +- 2 files changed, 48 insertions(+), 19 deletions(-) diff --git a/pkgs/applications/audio/termusic/default.nix b/pkgs/applications/audio/termusic/default.nix index 158f2e708b1..0df3cfcb46b 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 a5d7e8bb161..7e6b96914a0 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 { }; -- cgit 1.4.1