Commit f6556280 authored by mivorasu's avatar mivorasu Committed by mivorasu
Browse files

dart.volume_controller: init

parent 09d976e1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -23,5 +23,6 @@
  sqlite3_flutter_libs = callPackage ./sqlite3_flutter_libs { };
  system_tray = callPackage ./system-tray { };
  super_native_extensions = callPackage ./super_native_extensions { };
  volume_controller = callPackage ./volume_controller { };
  xdg_directories = callPackage ./xdg_directories { };
}
+26 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
}:

{ version, src, ... }:

stdenv.mkDerivation {
  pname = "volume_controller";
  inherit version src;
  inherit (src) passthru;

  postPatch = lib.optionalString (lib.versionAtLeast version "3.4.0") ''
    substituteInPlace linux/CMakeLists.txt \
      --replace-fail "# ALSA dependency for volume control" "find_package(PkgConfig REQUIRED)" \
      --replace-fail "find_package(ALSA REQUIRED)" "pkg_check_modules(ALSA REQUIRED alsa)"
  '';

  installPhase = ''
    runHook preInstall

    cp -r . $out

    runHook postInstall
  '';
}