mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-02 19:14:14 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
65 lines
1.6 KiB
Nix
65 lines
1.6 KiB
Nix
{ stdenv
|
|
, fetchFromGitHub
|
|
, lib
|
|
, pulseaudio
|
|
, autoreconfHook
|
|
, pkg-config
|
|
, nixosTests
|
|
, gitUpdater
|
|
}:
|
|
|
|
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 = gitUpdater { rev-prefix = "v"; };
|
|
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 ];
|
|
};
|
|
}
|