about summary refs log tree commit diff
diff options
context:
space:
mode:
authoriivusly <iivusly@icloud.com>2024-06-17 12:45:57 -0700
committeriivusly <iivusly@icloud.com>2024-06-17 12:46:57 -0700
commit435bd5829a6015e3151889e81bd4cb731c312d9d (patch)
tree2865dbec7ea863e6b6929cd2832bc76e721ebcb4
parentfe07b5a3561a96d61671192babe1ff823bb4c947 (diff)
spotify-qt: add to application dir on darwin
When on darwin, "spotify-qt.app" is placed inside of bin instead of Applications, thus it will not be able to be called via shell or be able to be opened though the users Applications directory. Just a quick move does the job

Update pkgs/applications/audio/spotify-qt/default.nix

Co-authored-by: Pol Dellaiera <pol.dellaiera@protonmail.com>
-rw-r--r--pkgs/applications/audio/spotify-qt/default.nix11
1 files changed, 9 insertions, 2 deletions
diff --git a/pkgs/applications/audio/spotify-qt/default.nix b/pkgs/applications/audio/spotify-qt/default.nix
index d5947d145172b..0fbf7c9438427 100644
--- a/pkgs/applications/audio/spotify-qt/default.nix
+++ b/pkgs/applications/audio/spotify-qt/default.nix
@@ -1,4 +1,5 @@
-{ fetchFromGitHub
+{ stdenvNoCC
+, fetchFromGitHub
 , lib
 , cmake
 , mkDerivation
@@ -26,12 +27,18 @@ mkDerivation rec {
 
    installFlags = [ "DESTDIR=$(out)" ];
 
+   postInstall = lib.optionalString stdenvNoCC.isDarwin ''
+     mkdir -p $out/Applications
+     mv $out/bin/spotify-qt.app $out/Applications
+     ln $out/Applications/spotify-qt.app/Contents/MacOS/spotify-qt $out/bin/spotify-qt
+   '';
+
    meta = with lib; {
     description = "Lightweight unofficial Spotify client using Qt";
     mainProgram = "spotify-qt";
     homepage = "https://github.com/kraxarn/spotify-qt";
     license = licenses.gpl3Only;
-    maintainers = with maintainers; [ ];
+    maintainers = with maintainers; [ iivusly ];
     platforms = platforms.unix;
    };
 }