1{ 2 lib, 3 stdenv, 4}: 5 6{ version, src, ... }: 7 8stdenv.mkDerivation { 9 pname = "volume_controller"; 10 inherit version src; 11 inherit (src) passthru; 12 13 postPatch = lib.optionalString (lib.versionAtLeast version "3.4.0") '' 14 substituteInPlace linux/CMakeLists.txt \ 15 --replace-fail "# ALSA dependency for volume control" "find_package(PkgConfig REQUIRED)" \ 16 --replace-fail "find_package(ALSA REQUIRED)" "pkg_check_modules(ALSA REQUIRED alsa)" 17 ''; 18 19 installPhase = '' 20 runHook preInstall 21 22 cp -r . $out 23 24 runHook postInstall 25 ''; 26}