From a2143e6870204313596c502aa921ec68a31742d9 Mon Sep 17 00:00:00 2001 From: aucub <78630225+aucub@users.noreply.github.com> Date: Sun, 10 Nov 2024 05:40:39 +0800 Subject: [PATCH] dart.flutter_volume_controller: init --- .../dart/package-source-builders/default.nix | 1 + .../flutter_volume_controller/default.nix | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/development/compilers/dart/package-source-builders/flutter_volume_controller/default.nix diff --git a/pkgs/development/compilers/dart/package-source-builders/default.nix b/pkgs/development/compilers/dart/package-source-builders/default.nix index 00bee092f69e..73bd36b9dfb7 100644 --- a/pkgs/development/compilers/dart/package-source-builders/default.nix +++ b/pkgs/development/compilers/dart/package-source-builders/default.nix @@ -2,6 +2,7 @@ { flutter_secure_storage_linux = callPackage ./flutter-secure-storage-linux { }; + flutter_volume_controller = callPackage ./flutter_volume_controller { }; fvp = callPackage ./fvp { }; handy_window = callPackage ./handy-window { }; matrix = callPackage ./matrix { }; diff --git a/pkgs/development/compilers/dart/package-source-builders/flutter_volume_controller/default.nix b/pkgs/development/compilers/dart/package-source-builders/flutter_volume_controller/default.nix new file mode 100644 index 000000000000..b582ac0448c0 --- /dev/null +++ b/pkgs/development/compilers/dart/package-source-builders/flutter_volume_controller/default.nix @@ -0,0 +1,25 @@ +{ + stdenv, + mdk-sdk, +}: + +{ version, src, ... }: + +stdenv.mkDerivation rec { + pname = "flutter_volume_controller"; + inherit version src; + inherit (src) passthru; + + postPatch = '' + substituteInPlace linux/CMakeLists.txt \ + --replace-fail '# Include ALSA' 'find_package(PkgConfig REQUIRED)' \ + --replace-fail 'find_package(ALSA REQUIRED)' 'pkg_check_modules(ALSA REQUIRED alsa)' + ''; + + installPhase = '' + runHook preInstall + mkdir $out + cp -r ./* $out/ + runHook postInstall + ''; +}