Merge pull request #260484 from vs49688/supersonic

supersonic: add darwin support

authored by

Weijia Wang and committed by
GitHub
58d98b07 30e70ade

+28 -3
+28 -3
pkgs/by-name/su/supersonic/package.nix
··· 1 { lib 2 , buildGoModule 3 , fetchFromGitHub 4 , makeDesktopItem 5 , copyDesktopItems 6 , pkg-config 7 , xorg 8 , libglvnd 9 , mpv 10 - , glfw3 11 , waylandSupport ? false 12 }: 13 14 buildGoModule rec { 15 pname = "supersonic" + lib.optionalString waylandSupport "-wayland"; 16 version = "0.5.2"; ··· 27 nativeBuildInputs = [ 28 copyDesktopItems 29 pkg-config 30 ]; 31 32 # go-glfw doesn't support both X11 and Wayland in single build ··· 35 buildInputs = [ 36 libglvnd 37 mpv 38 xorg.libXxf86vm 39 xorg.libX11 40 - ] ++ (glfw3.override { inherit waylandSupport; }).buildInputs; 41 42 postInstall = '' 43 for dimension in 128 256 512;do ··· 66 mainProgram = "supersonic" + lib.optionalString waylandSupport "-wayland"; 67 description = "A lightweight cross-platform desktop client for Subsonic music servers"; 68 homepage = "https://github.com/dweymouth/supersonic"; 69 - platforms = platforms.linux; 70 license = licenses.gpl3Plus; 71 maintainers = with maintainers; [ zane sochotnicky ]; 72 };
··· 1 { lib 2 + , stdenv 3 , buildGoModule 4 , fetchFromGitHub 5 , makeDesktopItem 6 , copyDesktopItems 7 , pkg-config 8 + , desktopToDarwinBundle 9 , xorg 10 + , wayland 11 + , wayland-protocols 12 + , libxkbcommon 13 , libglvnd 14 , mpv 15 + , darwin 16 , waylandSupport ? false 17 }: 18 19 + assert waylandSupport -> stdenv.isLinux; 20 + 21 buildGoModule rec { 22 pname = "supersonic" + lib.optionalString waylandSupport "-wayland"; 23 version = "0.5.2"; ··· 34 nativeBuildInputs = [ 35 copyDesktopItems 36 pkg-config 37 + ] ++ lib.optionals stdenv.isDarwin [ 38 + desktopToDarwinBundle 39 ]; 40 41 # go-glfw doesn't support both X11 and Wayland in single build ··· 44 buildInputs = [ 45 libglvnd 46 mpv 47 + ] ++ lib.optionals stdenv.isLinux [ 48 xorg.libXxf86vm 49 xorg.libX11 50 + ] ++ lib.optionals (stdenv.isLinux && !waylandSupport) [ 51 + xorg.libXrandr 52 + xorg.libXinerama 53 + xorg.libXcursor 54 + xorg.libXi 55 + xorg.libXext 56 + ] ++ lib.optionals (stdenv.isLinux && waylandSupport) [ 57 + wayland 58 + wayland-protocols 59 + libxkbcommon 60 + ] ++ lib.optionals stdenv.isDarwin [ 61 + darwin.apple_sdk_11_0.frameworks.Cocoa 62 + darwin.apple_sdk_11_0.frameworks.Kernel 63 + darwin.apple_sdk_11_0.frameworks.OpenGL 64 + darwin.apple_sdk_11_0.frameworks.UserNotifications 65 + ]; 66 67 postInstall = '' 68 for dimension in 128 256 512;do ··· 91 mainProgram = "supersonic" + lib.optionalString waylandSupport "-wayland"; 92 description = "A lightweight cross-platform desktop client for Subsonic music servers"; 93 homepage = "https://github.com/dweymouth/supersonic"; 94 + platforms = platforms.linux ++ platforms.darwin; 95 license = licenses.gpl3Plus; 96 maintainers = with maintainers; [ zane sochotnicky ]; 97 };