defnix: let
  inherit (defnix.build-support) compile-cc;

  inherit (defnix.pkgs) nix boehmgc;

  so = compile-cc [
    "-shared"
    "-fPIC"
    "-I${nix}/include/nix"
    "-I${boehmgc}/include"
    "-lnixformat"
    "-lnixexpr"
    "-lnixutil"
    "-L${nix}/lib"
  ] ./spawn.so.cc;
in defnix.lib.nix-exec.dlopen so "nix_spawn" 2

defnix: let
  inherit (defnix.build-support) compile-cc;

  inherit (defnix.pkgs) nix boehmgc;

  so = compile-cc [
    "-shared"
    "-fPIC"
    "-I${nix}/include/nix"
    "-I${boehmgc}/include"
    "-undefined" "dynamic_lookup"
  ] ./spawn.so.cc;
in defnix.lib.nix-exec.dlopen so "nix_spawn" 2

Fix plugin linking on darwin
Fix plugin linking on darwin
