diff options
author | Mario Rodas <marsam@users.noreply.github.com> | 2023-10-06 09:00:41 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-06 09:00:41 -0500 |
commit | ca95b373cda1757f3b41dfe16430b1e7db30c9cf (patch) | |
tree | 8bdaeb1d99862bbb2e443696556b034e714f2bef | |
parent | 20f41f97a6345a3b625b91a2729ddb32c8bd73b1 (diff) | |
parent | 0c1c00490849d49f5bf4a06f4269d4050e1be104 (diff) | |
download | nixlib-ca95b373cda1757f3b41dfe16430b1e7db30c9cf.tar nixlib-ca95b373cda1757f3b41dfe16430b1e7db30c9cf.tar.gz nixlib-ca95b373cda1757f3b41dfe16430b1e7db30c9cf.tar.bz2 nixlib-ca95b373cda1757f3b41dfe16430b1e7db30c9cf.tar.lz nixlib-ca95b373cda1757f3b41dfe16430b1e7db30c9cf.tar.xz nixlib-ca95b373cda1757f3b41dfe16430b1e7db30c9cf.tar.zst nixlib-ca95b373cda1757f3b41dfe16430b1e7db30c9cf.zip |
Merge pull request #257973 from vs49688/supersonic
supersonic: init at 0.5.2 Closes https://github.com/NixOS/nixpkgs/pull/252989
-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 c04f16cfb5de..60162397a854 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -35771,6 +35771,10 @@ with pkgs; sunvox = callPackage ../applications/audio/sunvox { }; + supersonic-wayland = supersonic.override { + waylandSupport = true; + }; + svkbd = callPackage ../applications/accessibility/svkbd { }; swaglyrics = callPackage ../tools/misc/swaglyrics { }; |