arrayfire / arrayfire-haskell

Haskell bindings to ArrayFire
http://hackage.haskell.org/package/arrayfire
BSD 3-Clause "New" or "Revised" License
59 stars 5 forks source link

Switch to Nix flakes; make the tests pass with newest ArrayFire #55

Closed twesterhout closed 1 year ago

twesterhout commented 1 year ago

Added nix flake support to the project

Minor details:

dmjio commented 1 year ago

Thanks for doing this. This is great. Is this expected to work on Darwin as well?

twesterhout commented 1 year ago

I would hope so, but I don't have direct access to a Darwin system. I have an open PR to update ArrayFire in Nixpkgs: https://github.com/NixOS/nixpkgs/pull/250753/files, so I'm hoping I can use their CI runners. In any case, I'm happy to make any changes that would be necessary to make it work under Darwin.

dmjio commented 1 year ago

Seems like mesa on Darwin is broken, no need to keep that from merging this in though.

 λ git arrayfire-3.9.0 → nix-build -A arrayfire .
these 13 derivations will be built:
  /nix/store/iwvzz2763bd6c5hnk0a8nxrxrcfhqg1q-mesa-23.1.3.drv
  /nix/store/78ng33mjn08slx7b410imvc62w96xk0i-libGL-23.1.3.drv
  /nix/store/2l8h57gv88wq1rklbxaxi4calb0dby9x-glu-9.0.2.drv
  /nix/store/hm9xpgqabls8a31bhqx53yh52wvv066y-source.drv
  /nix/store/i87vjfy9mv7sv6yv29x2j0xkkmqf4wrd-source.drv
  /nix/store/1rgrdfbmlsz4rfwicimlrsaxajdlsmd4-forge-1.0.8.drv
  /nix/store/csy1v6r9c62r71qya2x5dwhlhzajyrxc-source.drv
  /nix/store/j2p17ky6d2i9l3panwl3xq6kym2352j9-source.drv
  /nix/store/nvmdxmvpmiyqp1g0rn87wl29vvbxz54m-source.drv
  /nix/store/py9njzpgzj1pg0d8iipkcplpm0gigiam-source.drv
  /nix/store/x4vdlhvrd6ash3gra2d59l1ilg73srck-source.drv
  /nix/store/z57v4dpgsrvcd85bgwa66wacbzz4bqbk-source.drv
  /nix/store/l8aa45jhjcw800g9iia6zsfj6n2a6ydr-arrayfire-3.9.0-pre.drv
building '/nix/store/csy1v6r9c62r71qya2x5dwhlhzajyrxc-source.drv'...

.....

The Meson build system
Version: 1.1.1
Source dir: /private/tmp/nix-build-mesa-23.1.3.drv-0/mesa-23.1.3
Build dir: /private/tmp/nix-build-mesa-23.1.3.drv-0/mesa-23.1.3/build
Build type: native build
Project name: mesa
Project version: 23.1.3
C compiler for the host machine: clang (clang 11.1.0 "clang version 11.1.0")
C linker for the host machine: clang ld64 609
C++ compiler for the host machine: clang++ (clang 11.1.0 "clang version 11.1.0")
C++ linker for the host machine: clang++ ld64 609
Host machine cpu family: x86_64
Host machine cpu: x86_64

meson.build:364:3: ERROR: Feature gbm cannot be enabled: GBM only supports DRM/KMS platforms

A full log can be found at /private/tmp/nix-build-mesa-23.1.3.drv-0/mesa-23.1.3/build/meson-logs/meson-log.txt
error: builder for '/nix/store/iwvzz2763bd6c5hnk0a8nxrxrcfhqg1q-mesa-23.1.3.drv' failed with exit code 1;
       last 10 log lines:
       > C compiler for the host machine: clang (clang 11.1.0 "clang version 11.1.0")
       > C linker for the host machine: clang ld64 609
       > C++ compiler for the host machine: clang++ (clang 11.1.0 "clang version 11.1.0")
       > C++ linker for the host machine: clang++ ld64 609
       > Host machine cpu family: x86_64
       > Host machine cpu: x86_64
       >
       > meson.build:364:3: ERROR: Feature gbm cannot be enabled: GBM only supports DRM/KMS platforms
       >
       > A full log can be found at /private/tmp/nix-build-mesa-23.1.3.drv-0/mesa-23.1.3/build/meson-logs/meson-log.txt
       For full logs, run 'nix-store -l /nix/store/iwvzz2763bd6c5hnk0a8nxrxrcfhqg1q-mesa-23.1.3.drv'.
error: 1 dependencies of derivation '/nix/store/78ng33mjn08slx7b410imvc62w96xk0i-libGL-23.1.3.drv' failed to build
error: 1 dependencies of derivation '/nix/store/l8aa45jhjcw800g9iia6zsfj6n2a6ydr-arrayfire-3.9.0-pre.drv' failed to build