summary refs log tree commit diff
path: root/pkgs/development/libraries/dyncall/default.nix
blob: 8a829aa3c91c2a0ef4a89d848840e7196be58c20 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{ lib, stdenv, fetchurl }:

stdenv.mkDerivation {
  pname = "dyncall";
  version = "1.2";

  src = fetchurl {
    url = "https://www.dyncall.org/r1.2/dyncall-1.2.tar.gz";
    # https://www.dyncall.org/r1.2/SHA256
    sha256 = "sha256-6IFUwCQ0IVYHBPXHKUr73snpka+gYB1a3/UELqgYCNc=";
  };

  # XXX: broken tests, failures masked, lets avoid crashing a bunch for now :)
  doCheck = false;

  # install bits not automatically installed
  postInstall = ''
    # install cmake modules to make using dyncall easier
    # This is essentially what -DINSTALL_CMAKE_MODULES=ON if using cmake build
    # We don't use the cmake-based build since it installs different set of headers
    # (mostly fewer headers, but installs dyncall_alloc_wx.h "instead" dyncall_alloc.h)
    # and we'd have to patch the cmake module installation to not use CMAKE_ROOT anyway :).
    install -D -t $out/lib/cmake ./buildsys/cmake/Modules/Find*.cmake

    # manpages are nice, install them
    # doing this is in the project's "ToDo", so check this when updating!
    install -D -t $out/share/man/man3 ./*/*.3
  '';

  meta = with lib; {
    description = "Highly dynamic multi-platform foreign function call interface library";
    homepage = "https://www.dyncall.org";
    license = licenses.isc;
    maintainers = with maintainers; [ dtzWill ];
  };
}