Use pulseaudio with absolute volume patches

This commit is contained in:
Alexander Bantyev 2021-03-30 23:35:59 +03:00
parent e49c52b173
commit 025a711879
Signed by: balsoft
GPG Key ID: E081FF12ADCB4AD5
3 changed files with 58 additions and 2 deletions

View File

@ -411,6 +411,23 @@
"type": "github" "type": "github"
} }
}, },
"pulseaudio": {
"flake": false,
"locked": {
"lastModified": 1616962871,
"narHash": "sha256-hUSMqLpFQgL8sv9fsc5E4WFZXsAHSuj/kqS9KxhghSk=",
"ref": "a2dp-avrcp-absolute-volume",
"rev": "7f58efcd7cc2e513c155f9504deda6d7a2e466ac",
"revCount": 9724,
"type": "git",
"url": "https://gitlab.freedesktop.org/MarijnS95/pulseaudio.git"
},
"original": {
"ref": "a2dp-avrcp-absolute-volume",
"type": "git",
"url": "https://gitlab.freedesktop.org/MarijnS95/pulseaudio.git"
}
},
"root": { "root": {
"inputs": { "inputs": {
"NUR": "NUR", "NUR": "NUR",
@ -428,6 +445,7 @@
"nixpkgs": "nixpkgs_5", "nixpkgs": "nixpkgs_5",
"nixpkgs-old": "nixpkgs-old", "nixpkgs-old": "nixpkgs-old",
"nixpkgs-wayland": "nixpkgs-wayland", "nixpkgs-wayland": "nixpkgs-wayland",
"pulseaudio": "pulseaudio",
"simple-nixos-mailserver": "simple-nixos-mailserver", "simple-nixos-mailserver": "simple-nixos-mailserver",
"simple-osd-daemons": "simple-osd-daemons", "simple-osd-daemons": "simple-osd-daemons",
"sonoff-lan": "sonoff-lan", "sonoff-lan": "sonoff-lan",

View File

@ -63,6 +63,10 @@
url = "git+https://code.librehq.com/qhong/crdt.el"; url = "git+https://code.librehq.com/qhong/crdt.el";
flake = false; flake = false;
}; };
pulseaudio = {
url = "git+https://gitlab.freedesktop.org/MarijnS95/pulseaudio.git?ref=a2dp-avrcp-absolute-volume";
flake = false;
};
}; };
outputs = { nixpkgs, nix, self, deploy-rs, ... }@inputs: { outputs = { nixpkgs, nix, self, deploy-rs, ... }@inputs: {

View File

@ -1,4 +1,4 @@
{ pkgs, config, lib, ... }: { pkgs, config, lib, inputs, ... }:
with rec { inherit (config) device deviceSpecific; }; with rec { inherit (config) device deviceSpecific; };
with deviceSpecific; { with deviceSpecific; {
@ -23,7 +23,41 @@ with deviceSpecific; {
sound.enable = true; sound.enable = true;
hardware.pulseaudio = { hardware.pulseaudio = {
enable = true; enable = true;
package = pkgs.pulseaudioFull; package = pkgs.callPackage ({ ... }:
let orig = pkgs.pulseaudioFull;
in pkgs.stdenv.mkDerivation rec {
pname = "pulseaudio";
version = "1.1.1"; # For compatibility
outputs = [ "out" "dev" ];
src = inputs.pulseaudio;
nativeBuildInputs = with pkgs; [
pkg-config
makeWrapper
perlPackages.perl
perlPackages.XMLParser
meson
ninja
];
inherit (orig)
propagatedBuildInputs configureFlags installFlags postInstall
preFixup;
buildInputs = orig.buildInputs
++ (with pkgs; [ libexecinfo tdb orc check ]);
preConfigure = ''
echo "$version" > .tarball-version
'';
mesonFlags = [
"-Dgtk=disabled"
"-Delogind=disabled"
"-Dvalgrind=disabled"
"-Dtcpwrap=disabled"
"-Dbluez5-gstreamer=disabled"
"-Dgstreamer=disabled"
"-Dsystemduserunitdir=lib/systemd/user"
"-Dudevrulesdir=lib/udev/rules.d"
];
}) { };
support32Bit = true; support32Bit = true;
extraConfig = '' extraConfig = ''
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1 load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1