Open
Description
The streamly cabal file has the following stanza:
library
if os(darwin)
frameworks: Cocoa
include-dirs: src/Streamly/Internal
c-sources: src/Streamly/Internal/Data/Time/Darwin.c
, src/Streamly/Internal/FileSystem/Event/Darwin.m
exposed-modules:
Streamly.Internal.FileSystem.Event.Darwin
When cabal2nix
is used on this file it does not generate a Cocoa
framework dependency, therefore the nix-shell fails. After adding the dependency manually it works.
How to reproduce:
$ git clone https://github.com/composewell/streamly.git
$ cd streamly
$ mv benchmark/streamly-benchmarks.cabal benchmark/streamly-benchmarks.cabal.bak
$ rm default.nix
$ cabal2nix --shell . > shell.nix
$ cabal build streamly
The build will fail because of Cocoa
framework dependency.
We have added the dependency manually in the shell derivation:
buildInputs =
if builtins.currentSystem == "x86_64-darwin"
then [nixpkgs.darwin.apple_sdk.frameworks.Cocoa]
else [];