summary refs log tree commit diff
path: root/modules/packages
diff options
context:
space:
mode:
Diffstat (limited to 'modules/packages')
-rw-r--r--modules/packages/discord-screenaudio.nix57
-rw-r--r--modules/packages/dotnet-pack.nix26
2 files changed, 83 insertions, 0 deletions
diff --git a/modules/packages/discord-screenaudio.nix b/modules/packages/discord-screenaudio.nix
new file mode 100644
index 0000000..4bf7c11
--- /dev/null
+++ b/modules/packages/discord-screenaudio.nix
@@ -0,0 +1,57 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, wrapQtAppsHook
+, pkg-config
+, qtbase
+, qtwebengine
+, knotifications
+, kxmlgui
+, kglobalaccel
+, pipewire
+, xdg-desktop-portal
+}:
+
+stdenv.mkDerivation rec {
+  pname = "discord-screenaudio";
+  version = "1.9.0";
+
+  src = fetchFromGitHub {
+    owner = "maltejur";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-PPP/+7x0dcQHowB7hUZu85LK/G+ohrPeRB0vv6e3PBg=";
+    fetchSubmodules = true;
+  };
+
+  cmakeFlags = [
+    "-DPipeWire_INCLUDE_DIRS=${pipewire.dev}/include/pipewire-0.3"
+    "-DSpa_INCLUDE_DIRS=${pipewire.dev}/include/spa-0.2"
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    wrapQtAppsHook
+  ];
+
+  buildInputs = [
+    qtbase
+    qtwebengine
+    knotifications
+    kxmlgui
+    kglobalaccel
+    pipewire
+    pipewire.pulse
+    xdg-desktop-portal
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/maltejur/discord-screenaudio";
+    description = "A custom discord client that supports streaming with audio on Linux";
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ michaelBelsanti ];
+  };
+}
diff --git a/modules/packages/dotnet-pack.nix b/modules/packages/dotnet-pack.nix
new file mode 100644
index 0000000..27c419d
--- /dev/null
+++ b/modules/packages/dotnet-pack.nix
@@ -0,0 +1,26 @@
+{ pkgs ? import <nixpkgs> {} }:
+
+#pkgs.stdenv.mkDerivation {
+#  name = "dotnet-pack";
+#  dontUnpack = true;
+#  buildInputs = with pkgs; [ dotnet-sdk dotnet-sdk_7 dotnet-sdk_8 ];
+#
+#  # Define the build phase
+#  buildPhase = ''
+#    mkdir -p $out
+#    ln -sf ${pkgs.dotnet-sdk}/* $out/
+#    ln -sf ${pkgs.dotnet-sdk_7}/* $out/
+#    ln -sf ${pkgs.dotnet-sdk_8}/* $out/
+#  '';
+#}
+
+pkgs.symlinkJoin {
+  name = "dotnet-pack";
+  paths = [ pkgs.dotnet-sdk_8 pkgs.dotnet-sdk_7 pkgs.dotnet-sdk ];
+  postBuild = ''
+    rm -rfv $out/bin
+    rm -rfv $out/dotnet
+    cp -rv ${pkgs.dotnet-sdk_8}/dotnet $out/
+    cp -rv ${pkgs.dotnet-sdk_8}/bin $out/
+  '';
+}
\ No newline at end of file