1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-19 12:11:28 +00:00

scream: 3.4 -> 3.6

Renamed from scream-receivers
This commit is contained in:
arcnmx 2020-10-02 12:39:15 -07:00
parent 7ed23e37bd
commit c219dfc434
3 changed files with 44 additions and 59 deletions

View file

@ -0,0 +1,43 @@
{ stdenv, lib, config, fetchFromGitHub, cmake, pkg-config
, alsaSupport ? stdenv.isLinux, alsaLib
, pulseSupport ? config.pulseaudio or stdenv.isLinux, libpulseaudio
}:
stdenv.mkDerivation rec {
pname = "scream";
version = "3.6";
src = fetchFromGitHub {
owner = "duncanthrax";
repo = pname;
rev = version;
sha256 = "01k2zhfb781gfj3apmcjqbm5m05m6pvnh7fb5k81zwvqibai000v";
};
buildInputs = lib.optional pulseSupport libpulseaudio
++ lib.optional alsaSupport alsaLib;
nativeBuildInputs = [ cmake pkg-config ];
cmakeFlags = [
"-DPULSEAUDIO_ENABLE=${if pulseSupport then "ON" else "OFF"}"
"-DALSA_ENABLE=${if alsaSupport 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 ];
};
}

View file

@ -1,56 +0,0 @@
{ stdenv, lib, fetchFromGitHub, alsaLib
, pulseSupport ? false, libpulseaudio ? null
}:
stdenv.mkDerivation rec {
pname = "scream-receivers";
version = "3.4";
src = fetchFromGitHub {
owner = "duncanthrax";
repo = "scream";
rev = version;
sha256 = "1ig89bmzfrm57nd8lamzsdz5z81ks5vjvq3f0xhgm2dk2mrgjsj3";
};
buildInputs = [ alsaLib ] ++ lib.optional pulseSupport libpulseaudio;
buildPhase = ''
(cd Receivers/alsa && make)
(cd Receivers/alsa-ivshmem && make)
'' + lib.optionalString pulseSupport ''
(cd Receivers/pulseaudio && make)
(cd Receivers/pulseaudio-ivshmem && make)
'';
installPhase = ''
mkdir -p $out/bin
mv ./Receivers/alsa/scream-alsa $out/bin/
mv ./Receivers/alsa-ivshmem/scream-ivshmem-alsa $out/bin/
'' + lib.optionalString pulseSupport ''
mv ./Receivers/pulseaudio/scream-pulse $out/bin/
mv ./Receivers/pulseaudio-ivshmem/scream-ivshmem-pulse $out/bin/
'';
doInstallCheck = true;
installCheckPhase = ''
export PATH=$PATH:$out/bin
set -o verbose
set +o pipefail
# Programs exit with code 1 when testing help, so grep for a string
scream-alsa -h 2>&1 | grep -q Usage:
scream-ivshmem-alsa 2>&1 | grep -q Usage:
'' + lib.optionalString pulseSupport ''
scream-pulse -h 2>&1 | grep -q Usage:
scream-ivshmem-pulse 2>&1 | grep -q Usage:
'';
meta = with lib; {
description = "Audio receivers for the Scream virtual network sound card";
homepage = "https://github.com/duncanthrax/scream";
license = licenses.mspl;
platforms = platforms.linux;
maintainers = with maintainers; [ ];
};
}

View file

@ -8060,9 +8060,7 @@ in
scmpuff = callPackage ../applications/version-management/git-and-tools/scmpuff { };
scream-receivers = callPackage ../misc/scream-receivers {
pulseSupport = config.pulseaudio or false;
};
scream = callPackage ../applications/audio/scream { };
scimark = callPackage ../misc/scimark { };