-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: lucasew <lucas59356@gmail.com>
- Loading branch information
Showing
2 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
64 changes: 64 additions & 0 deletions
64
pkgs/applications/networking/remote/xrdp/pulseaudio-module-xrdp/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{ stdenv | ||
, fetchFromGitHub | ||
, lib | ||
, nix-update-script | ||
, pulseaudio | ||
, autoreconfHook | ||
, pkg-config | ||
, nixosTests | ||
}: | ||
|
||
stdenv.mkDerivation rec { | ||
pname = "pulseaudio-module-xrdp"; | ||
version = "0.7"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "neutrinolabs"; | ||
repo = pname; | ||
rev = "v${version}"; | ||
hash = "sha256-GT0kBfq6KvuiX30B9JzCiUxgSm9E6IhdJuQKKKprDCE="; | ||
}; | ||
|
||
preConfigure = '' | ||
tar -xvf ${pulseaudio.src} | ||
mv pulseaudio-* pulseaudio-src | ||
chmod +w -Rv pulseaudio-src | ||
cp ${pulseaudio.dev}/include/pulse/config.h pulseaudio-src | ||
configureFlags="$configureFlags PULSE_DIR=$(realpath ./pulseaudio-src)" | ||
''; | ||
|
||
installPhase = '' | ||
runHook preInstall | ||
mkdir -p $out/lib/pulseaudio/modules $out/libexec/pulsaudio-xrdp-module $out/etc/xdg/autostart | ||
install -m 755 src/.libs/*${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib/pulseaudio/modules | ||
install -m 755 instfiles/load_pa_modules.sh $out/libexec/pulsaudio-xrdp-module/pulseaudio_xrdp_init | ||
substituteInPlace $out/libexec/pulsaudio-xrdp-module/pulseaudio_xrdp_init \ | ||
--replace pactl ${pulseaudio}/bin/pactl | ||
runHook postInstall | ||
''; | ||
|
||
nativeBuildInputs = [ | ||
autoreconfHook | ||
pkg-config | ||
pulseaudio.dev | ||
]; | ||
|
||
passthru = { | ||
updateScript = nix-update-script { }; | ||
tests = { | ||
inherit (nixosTests) xrdp-with-audio-pulseaudio; | ||
}; | ||
}; | ||
|
||
meta = with lib; { | ||
description = "xrdp sink/source pulseaudio modules"; | ||
homepage = "https://github.com/neutrinolabs/pulseaudio-module-xrdp"; | ||
license = licenses.lgpl21; | ||
maintainers = with maintainers; [ lucasew ]; | ||
platforms = platforms.linux; | ||
sourceProvenance = [ sourceTypes.fromSource ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters