From dace374b25132089a2bbc1fcb02c76c22bdb468a Mon Sep 17 00:00:00 2001 From: Alexandre Esteves Date: Mon, 29 Apr 2024 21:26:08 +0100 Subject: [PATCH] haskellPackages.jsaddle-wkwebview: build on darwin --- pkgs/development/haskell-modules/configuration-darwin.nix | 7 +++++++ .../haskell-modules/configuration-hackage2nix/broken.yaml | 1 - .../haskell-modules/configuration-hackage2nix/main.yaml | 1 + pkgs/development/haskell-modules/hackage-packages.nix | 3 +-- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-darwin.nix b/pkgs/development/haskell-modules/configuration-darwin.nix index 3e7bf1f89f7c..f3267f376b62 100644 --- a/pkgs/development/haskell-modules/configuration-darwin.nix +++ b/pkgs/development/haskell-modules/configuration-darwin.nix @@ -316,6 +316,13 @@ self: super: ({ # Tests fail on macOS https://github.com/mrkkrp/zip/issues/112 zip = dontCheck super.zip; + + # cabal lib set as unbuildable in linux so callCabal2nix generates a dummy derivation + jsaddle-wkwebview = overrideCabal (drv: { + libraryFrameworkDepends = with pkgs.buildPackages.darwin.apple_sdk.frameworks; [ Cocoa WebKit ]; + libraryHaskellDepends = with self; [ aeson data-default jsaddle ]; + }) super.jsaddle-wkwebview; + } // lib.optionalAttrs pkgs.stdenv.isAarch64 { # aarch64-darwin # https://github.com/fpco/unliftio/issues/87 diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml index 1c2f4bb93252..d0ed369d7235 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml @@ -3208,7 +3208,6 @@ broken-packages: - jort # failure in job https://hydra.nixos.org/build/233195250 at 2023-09-02 - joy-rewrite # failure in job https://hydra.nixos.org/build/233201002 at 2023-09-02 - jpeg # failure in job https://hydra.nixos.org/build/233204056 at 2023-09-02 - - jsaddle-wkwebview # failure in job https://hydra.nixos.org/build/233242986 at 2023-09-02 - js-good-parts # failure in job https://hydra.nixos.org/build/233198958 at 2023-09-02 - json2 # failure in job https://hydra.nixos.org/build/233242447 at 2023-09-02 - json-alt # failure in job https://hydra.nixos.org/build/233242230 at 2023-09-02 diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml index 608afdf4e20b..0f0b3520b2e0 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml @@ -735,6 +735,7 @@ supported-platforms: htune: [ platforms.linux ] # depends on alsa-pcm hw-prim-bits: [ platforms.x86 ] # x86 assembler inline-asm: [ platforms.x86 ] # x86 assembler + jsaddle-wkwebview: [ platforms.darwin ] keid-core: [ x86_64-linux ] # geomancy (only x86), vulkan (no i686, no darwin, …) keid-frp-banana: [ x86_64-linux ] # geomancy (only x86), vulkan (no i686, no darwin, …) keid-geometry: [ x86_64-linux ] # geomancy (only x86), vulkan (no i686, no darwin, …) diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index 58a9886f182d..89fc0f043495 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -177255,8 +177255,7 @@ self: { sha256 = "0r8payj72akz951jmv7frllj8cxpwgjyci7gad7250s7nmnd9f1s"; description = "Interface for JavaScript that works with GHCJS and GHC"; license = lib.licenses.mit; - hydraPlatforms = lib.platforms.none; - broken = true; + platforms = lib.platforms.darwin; }) {}; "jsc" = callPackage