summary refs log tree commit diff
diff options
context:
space:
mode:
authorVuiMuich <vuimuich@quantentunnel.de>2023-08-11 08:56:43 +0200
committerGitHub <noreply@github.com>2023-08-11 08:56:43 +0200
commit91eae85639115d0f7006a57235eeb8d40d493ffc (patch)
tree7b922e007151b5af23af0af512a71e638202be72
parent11717e91b4c5e62d5d67453ea4cde8c368b70439 (diff)
downloadnixpkgs-91eae85639115d0f7006a57235eeb8d40d493ffc.tar
nixpkgs-91eae85639115d0f7006a57235eeb8d40d493ffc.tar.gz
nixpkgs-91eae85639115d0f7006a57235eeb8d40d493ffc.tar.bz2
nixpkgs-91eae85639115d0f7006a57235eeb8d40d493ffc.tar.lz
nixpkgs-91eae85639115d0f7006a57235eeb8d40d493ffc.tar.xz
nixpkgs-91eae85639115d0f7006a57235eeb8d40d493ffc.tar.zst
nixpkgs-91eae85639115d0f7006a57235eeb8d40d493ffc.zip
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 <pol.dellaiera@protonmail.com>
-rw-r--r--pkgs/applications/audio/termusic/default.nix63
-rw-r--r--pkgs/top-level/all-packages.nix4
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 { };