summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorStanisław Pitucha <git@viraptor.info>2023-03-03 22:58:48 +1100
committerGitHub <noreply@github.com>2023-03-03 22:58:48 +1100
commitf31ed14fc05a8e2a42c3a80e882d38cb0cf1d71b (patch)
treeeb611265894444d0cd81741117418dd81af3f98d /pkgs
parent0e1bda5fa6eb0f211cd77fd1118cb8b05bd09d95 (diff)
parent57221929c932530aba1c48dbb689d80767bca958 (diff)
downloadnixpkgs-f31ed14fc05a8e2a42c3a80e882d38cb0cf1d71b.tar
nixpkgs-f31ed14fc05a8e2a42c3a80e882d38cb0cf1d71b.tar.gz
nixpkgs-f31ed14fc05a8e2a42c3a80e882d38cb0cf1d71b.tar.bz2
nixpkgs-f31ed14fc05a8e2a42c3a80e882d38cb0cf1d71b.tar.lz
nixpkgs-f31ed14fc05a8e2a42c3a80e882d38cb0cf1d71b.tar.xz
nixpkgs-f31ed14fc05a8e2a42c3a80e882d38cb0cf1d71b.tar.zst
nixpkgs-f31ed14fc05a8e2a42c3a80e882d38cb0cf1d71b.zip
Merge pull request #211341 from PowerUser64/sonobus
sonobus: init at 1.6.2
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/audio/sonobus/default.nix83
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 85 insertions, 0 deletions
diff --git a/pkgs/applications/audio/sonobus/default.nix b/pkgs/applications/audio/sonobus/default.nix
new file mode 100644
index 00000000000..da82fcc5a86
--- /dev/null
+++ b/pkgs/applications/audio/sonobus/default.nix
@@ -0,0 +1,83 @@
+{ lib
+, pkg-config
+, stdenv
+, fetchFromGitHub
+, autoPatchelfHook
+, alsa-lib
+, cmake
+, freetype
+, libGL
+, libX11
+, libXcursor
+, libXext
+, libXinerama
+, libXrandr
+, libjack2
+, libopus
+, curl
+, gtk3
+, webkitgtk
+}:
+
+stdenv.mkDerivation rec {
+  pname = "sonobus";
+  version = "1.6.2";
+
+  src = fetchFromGitHub {
+    owner = "sonosaurus";
+    repo = "sonobus";
+    rev = version;
+    sha256 = "sha256-/Pb+PYmoCYA6Qcy/tR1Ejyt+rZ3pfJeWV4j7bQWYE58=";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [
+    autoPatchelfHook
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [
+    alsa-lib
+    freetype
+    libjack2
+    libopus
+    curl
+    gtk3
+    webkitgtk
+  ];
+
+  runtimeDependencies = [
+    libGL
+    libX11
+    libXcursor
+    libXext
+    libXinerama
+    libXrandr
+  ];
+
+  postPatch = lib.optionalString (stdenv.isLinux) ''
+    # needs special setup on Linux, dunno if it can work on Darwin
+    # https://github.com/NixOS/nixpkgs/issues/19098
+    # Also, I get issues with linking without that, not sure why
+    sed -i -e '/juce::juce_recommended_lto_flags/d' CMakeLists.txt
+    patchShebangs linux/install.sh
+  '';
+
+  # The program does not provide any CMake install instructions
+  installPhase = lib.optionalString (stdenv.isLinux) ''
+    runHook preInstall
+    cd ../linux
+    ./install.sh "$out"
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "High-quality network audio streaming";
+    homepage = "https://sonobus.net/";
+    license = with licenses; [ gpl3Plus ];
+    maintainers = with maintainers; [ PowerUser64 ];
+    platforms = platforms.unix;
+    broken = stdenv.isDarwin;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index da31cb1c716..c4531f413c5 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -30487,6 +30487,8 @@ with pkgs;
 
   sonixd = callPackage ../applications/audio/sonixd { };
 
+  sonobus = callPackage ../applications/audio/sonobus { };
+
   sosreport = python3Packages.callPackage ../applications/logging/sosreport { };
 
   spectmorph = callPackage ../applications/audio/spectmorph { };