forked from mirrors/nixpkgs
Merge pull request #132519 from lovesegfault/networkaudiod
networkaudiod: init
This commit is contained in:
commit
974e1b51d6
|
@ -251,6 +251,7 @@
|
|||
./services/audio/mpd.nix
|
||||
./services/audio/mpdscribble.nix
|
||||
./services/audio/mopidy.nix
|
||||
./services/audio/networkaudiod.nix
|
||||
./services/audio/roon-bridge.nix
|
||||
./services/audio/roon-server.nix
|
||||
./services/audio/slimserver.nix
|
||||
|
|
19
nixos/modules/services/audio/networkaudiod.nix
Normal file
19
nixos/modules/services/audio/networkaudiod.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
name = "networkaudiod";
|
||||
cfg = config.services.networkaudiod;
|
||||
in {
|
||||
options = {
|
||||
services.networkaudiod = {
|
||||
enable = mkEnableOption "Networkaudiod (NAA)";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.packages = [ pkgs.networkaudiod ];
|
||||
systemd.services.networkaudiod.wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
}
|
71
pkgs/servers/networkaudiod/default.nix
Normal file
71
pkgs/servers/networkaudiod/default.nix
Normal file
|
@ -0,0 +1,71 @@
|
|||
{ stdenv
|
||||
, autoPatchelfHook
|
||||
, dpkg
|
||||
, fetchurl
|
||||
, lib
|
||||
, alsa-lib
|
||||
}:
|
||||
let
|
||||
inherit (stdenv.targetPlatform) system;
|
||||
throwSystem = throw "Unsupported system: ${system}";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "networkaudiod";
|
||||
version = "4.1.1-46";
|
||||
|
||||
src = {
|
||||
x86_64-linux = fetchurl {
|
||||
url = "https://www.signalyst.eu/bins/naa/linux/buster/${pname}_${version}_amd64.deb";
|
||||
sha256 = "sha256-un5VcCnvCCS/KWtW991Rt9vz3flYilERmRNooEsKCkA=";
|
||||
};
|
||||
aarch64-linux = fetchurl {
|
||||
url = "https://www.signalyst.eu/bins/naa/linux/buster/${pname}_${version}_arm64.deb";
|
||||
sha256 = "sha256-fjSCWX9VYhVJ43N2kSqd5gfTtDJ1UiH4j5PJ9I5Skag=";
|
||||
};
|
||||
}.${system} or throwSystem;
|
||||
|
||||
unpackPhase = ''
|
||||
dpkg -x $src .
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ autoPatchelfHook dpkg ];
|
||||
|
||||
buildInputs = [
|
||||
alsa-lib
|
||||
stdenv.cc.cc.lib
|
||||
];
|
||||
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
# main executable
|
||||
mkdir -p $out/bin
|
||||
cp ./usr/sbin/networkaudiod $out/bin
|
||||
|
||||
# systemd service file
|
||||
mkdir -p $out/lib/systemd/system
|
||||
cp ./lib/systemd/system/networkaudiod.service $out/lib/systemd/system
|
||||
|
||||
# documentation
|
||||
mkdir -p $out/share/doc/networkaudiod
|
||||
cp -r ./usr/share/doc/networkaudiod $out/share/doc/
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
substituteInPlace $out/lib/systemd/system/networkaudiod.service \
|
||||
--replace /usr/sbin/networkaudiod $out/bin/networkaudiod
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.signalyst.com/index.html";
|
||||
description = "Network Audio Adapter daemon";
|
||||
license = licenses.unfree;
|
||||
maintainers = with maintainers; [ lovesegfault ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
|
@ -19879,6 +19879,8 @@ in
|
|||
|
||||
neard = callPackage ../servers/neard { };
|
||||
|
||||
networkaudiod = callPackage ../servers/networkaudiod { };
|
||||
|
||||
unit = callPackage ../servers/http/unit { };
|
||||
|
||||
ncdns = callPackage ../servers/dns/ncdns { };
|
||||
|
|
Loading…
Reference in a new issue