From 0a091fccccde0d481063e972ec0af5f4b7a2e700 Mon Sep 17 00:00:00 2001 From: Linschlager Date: Sat, 25 Nov 2023 19:14:23 +0100 Subject: [PATCH] haskellPackages.hidapi: fix darwin build --- pkgs/development/haskell-modules/configuration-darwin.nix | 8 ++++++++ .../haskell-modules/configuration-hackage2nix/main.yaml | 1 - pkgs/development/haskell-modules/configuration-nix.nix | 2 -- pkgs/development/haskell-modules/hackage-packages.nix | 1 - 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-darwin.nix b/pkgs/development/haskell-modules/configuration-darwin.nix index 2dbfac30da5a..e306884cf4fd 100644 --- a/pkgs/development/haskell-modules/configuration-darwin.nix +++ b/pkgs/development/haskell-modules/configuration-darwin.nix @@ -123,6 +123,14 @@ self: super: ({ __darwinAllowLocalNetworking = true; }); + hidapi = + addExtraLibraries [ + darwin.apple_sdk.frameworks.AppKit + darwin.apple_sdk.frameworks.IOKit + darwin.apple_sdk.frameworks.CoreFoundation + ] + (super.hidapi.override { systemd = null; }); + hmatrix = addBuildDepend darwin.apple_sdk.frameworks.Accelerate super.hmatrix; blas-hs = overrideCabal (drv: { diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml index eb323003ef34..f824cfbf22a8 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml @@ -640,7 +640,6 @@ unsupported-platforms: haskell-snake: [ platforms.darwin ] hcwiid: [ platforms.darwin ] HDRUtils: [ platforms.darwin ] - hidapi: [ platforms.darwin ] hinotify-bytestring: [ platforms.darwin ] honk: [ platforms.darwin ] HSoM: [ platforms.darwin ] diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index 037019be4de3..fcd37d55f1cd 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -625,8 +625,6 @@ self: super: builtins.intersectAttrs super { # https://github.com/haskell-fswatch/hfsnotify/issues/62 fsnotify = dontCheck super.fsnotify; - hidapi = addExtraLibrary pkgs.udev super.hidapi; - hs-GeoIP = super.hs-GeoIP.override { GeoIP = pkgs.geoipWithDatabase; }; discount = super.discount.override { markdown = pkgs.discount; }; diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index 2507663441ff..e608ebeec372 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -146371,7 +146371,6 @@ self: { librarySystemDepends = [ systemd ]; description = "Haskell bindings to HIDAPI"; license = lib.licenses.mit; - badPlatforms = lib.platforms.darwin; }) {inherit (pkgs) systemd;}; "hidden-char" = callPackage