From 7e45a0e6d86d06548d69489d20b702b28979dbd9 Mon Sep 17 00:00:00 2001 From: TomaSajt <62384384+TomaSajt@users.noreply.github.com> Date: Fri, 18 Oct 2024 12:00:58 +0200 Subject: [PATCH] uiua: add webcamSupport option --- pkgs/by-name/ui/uiua/package.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ui/uiua/package.nix b/pkgs/by-name/ui/uiua/package.nix index 5bcf16fdd8aa..19dbe22d987f 100644 --- a/pkgs/by-name/ui/uiua/package.nix +++ b/pkgs/by-name/ui/uiua/package.nix @@ -4,9 +4,11 @@ rustPlatform, fetchFromGitHub, pkg-config, - audioSupport ? true, + darwin, + audioSupport ? true, alsa-lib, + webcamSupport ? false, # passthru.tests.run runCommand, @@ -30,7 +32,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-4XHKcmOeaeSGfl7uvQQdhm29DBWEdZLX021d9+Ebrww="; nativeBuildInputs = - lib.optionals stdenv.hostPlatform.isDarwin [ rustPlatform.bindgenHook ] + lib.optionals (webcamSupport || stdenv.hostPlatform.isDarwin) [ rustPlatform.bindgenHook ] ++ lib.optionals audioSupport [ pkg-config ]; buildInputs = @@ -41,7 +43,7 @@ rustPlatform.buildRustPackage rec { ++ lib.optionals (audioSupport && stdenv.hostPlatform.isDarwin) [ AudioUnit ] ++ lib.optionals (audioSupport && stdenv.hostPlatform.isLinux) [ alsa-lib ]; - buildFeatures = lib.optional audioSupport "audio"; + buildFeatures = lib.optional audioSupport "audio" ++ lib.optional webcamSupport "webcam"; passthru.updateScript = ./update.sh; passthru.tests.run = runCommand "uiua-test-run" { nativeBuildInputs = [ uiua ]; } ''