diff options
author | Zane van Iperen <zane@zanevaniperen.com> | 2023-09-29 23:27:17 +1000 |
---|---|---|
committer | Zane van Iperen <zane@zanevaniperen.com> | 2023-09-29 23:27:17 +1000 |
commit | 0c1c00490849d49f5bf4a06f4269d4050e1be104 (patch) | |
tree | 2ddf5f1d60e0dcdbfc22e9d3d35a32dac06e58f7 | |
parent | 0d7a1fd3fd3fae491a8f4677831db566fd8033e6 (diff) | |
download | nixlib-0c1c00490849d49f5bf4a06f4269d4050e1be104.tar nixlib-0c1c00490849d49f5bf4a06f4269d4050e1be104.tar.gz nixlib-0c1c00490849d49f5bf4a06f4269d4050e1be104.tar.bz2 nixlib-0c1c00490849d49f5bf4a06f4269d4050e1be104.tar.lz nixlib-0c1c00490849d49f5bf4a06f4269d4050e1be104.tar.xz nixlib-0c1c00490849d49f5bf4a06f4269d4050e1be104.tar.zst nixlib-0c1c00490849d49f5bf4a06f4269d4050e1be104.zip |
supersonic: init at 0.5.2
Co-authored-by: Stanislav Ochotnický <stanislav@ochotnicky.com>
-rw-r--r-- | pkgs/by-name/su/supersonic/package.nix | 73 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 4 |
2 files changed, 77 insertions, 0 deletions
diff --git a/pkgs/by-name/su/supersonic/package.nix b/pkgs/by-name/su/supersonic/package.nix new file mode 100644 index 000000000000..0c2f34cf5fee --- /dev/null +++ b/pkgs/by-name/su/supersonic/package.nix @@ -0,0 +1,73 @@ +{ lib +, buildGoModule +, fetchFromGitHub +, makeDesktopItem +, copyDesktopItems +, pkg-config +, xorg +, libglvnd +, mpv +, glfw3 +, waylandSupport ? false +}: + +buildGoModule rec { + pname = "supersonic" + lib.optionalString waylandSupport "-wayland"; + version = "0.5.2"; + + src = fetchFromGitHub { + owner = "dweymouth"; + repo = "supersonic"; + rev = "v${version}"; + hash = "sha256-4SLAUqLMoUxTSi4I/QeHqudO62Gmhpm1XbCGf+3rPlc="; + }; + + vendorHash = "sha256-6Yp5OoybFpoBuIKodbwnyX3crLCl8hJ2r4plzo0plsY="; + + nativeBuildInputs = [ + copyDesktopItems + pkg-config + ]; + + # go-glfw doesn't support both X11 and Wayland in single build + tags = lib.optionals waylandSupport [ "wayland" ]; + + buildInputs = [ + libglvnd + mpv + xorg.libXxf86vm + xorg.libX11 + ] ++ (glfw3.override { inherit waylandSupport; }).buildInputs; + + postInstall = '' + for dimension in 128 256 512;do + dimensions=''${dimension}x''${dimension} + mkdir -p $out/share/icons/hicolor/$dimensions/apps + cp res/appicon-$dimension.png $out/share/icons/hicolor/$dimensions/apps/${meta.mainProgram}.png + done + '' + lib.optionalString waylandSupport '' + mv $out/bin/supersonic $out/bin/${meta.mainProgram} + ''; + + desktopItems = [ + (makeDesktopItem { + name = meta.mainProgram; + exec = meta.mainProgram; + icon = meta.mainProgram; + desktopName = "Supersonic" + lib.optionalString waylandSupport " (Wayland)"; + genericName = "Subsonic Client"; + comment = meta.description; + type = "Application"; + categories = [ "Audio" "AudioVideo" ]; + }) + ]; + + meta = with lib; { + mainProgram = "supersonic" + lib.optionalString waylandSupport "-wayland"; + description = "A lightweight cross-platform desktop client for Subsonic music servers"; + homepage = "https://github.com/dweymouth/supersonic"; + platforms = platforms.linux; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ zane sochotnicky ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a4bd4110d378..74677164dcfd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -35801,6 +35801,10 @@ with pkgs; sunvox = callPackage ../applications/audio/sunvox { }; + supersonic-wayland = supersonic.override { + waylandSupport = true; + }; + svkbd = callPackage ../applications/accessibility/svkbd { }; swaglyrics = callPackage ../tools/misc/swaglyrics { }; |