1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-15 00:54:46 +00:00
nixpkgs/pkgs/applications/audio/scream/default.nix

47 lines
1.3 KiB
Nix
Raw Normal View History

{ stdenv, lib, config, fetchFromGitHub, cmake, pkg-config
, alsaSupport ? stdenv.isLinux, alsa-lib
, pulseSupport ? config.pulseaudio or stdenv.isLinux, libpulseaudio
2021-06-28 17:33:41 +01:00
, jackSupport ? false, libjack2
}:
stdenv.mkDerivation rec {
pname = "scream";
2021-06-28 17:33:41 +01:00
version = "3.7";
src = fetchFromGitHub {
owner = "duncanthrax";
repo = pname;
rev = version;
2021-06-28 17:33:41 +01:00
sha256 = "0d9abrw62cd08lcg4il415b7ap89iggbljvbl5jqv2y23il0pvyz";
};
buildInputs = lib.optional pulseSupport libpulseaudio
2021-06-28 17:33:41 +01:00
++ lib.optional jackSupport libjack2
++ lib.optional alsaSupport alsa-lib;
nativeBuildInputs = [ cmake pkg-config ];
cmakeFlags = [
"-DPULSEAUDIO_ENABLE=${if pulseSupport then "ON" else "OFF"}"
"-DALSA_ENABLE=${if alsaSupport then "ON" else "OFF"}"
2021-06-28 17:33:41 +01:00
"-DJACK_ENABLE=${if jackSupport then "ON" else "OFF"}"
];
cmakeDir = "../Receivers/unix";
doInstallCheck = true;
installCheckPhase = ''
set +o pipefail
# Programs exit with code 1 when testing help, so grep for a string
$out/bin/scream -h 2>&1 | grep -q Usage:
'';
meta = with lib; {
description = "Audio receiver for the Scream virtual network sound card";
homepage = "https://github.com/duncanthrax/scream";
license = licenses.mspl;
platforms = platforms.linux;
maintainers = with maintainers; [ arcnmx ];
};
}