Hi all,
I’m attempting to package semgrep, but I’ve found myself in deep water with OCaml/Dune. To summarize where I’m at, semgrep
uses Python as the main interface but relies on semgrep_core
underneath the hood which is an OCaml project. The source for the core is located in the same repository.
This was my initial attempt at writing a package for core:
{ lib
, ocamlPackages
, fetchFromGitHub
}:
with ocamlPackages;
buildDunePackage rec {
pname = "semgrep_core";
version = "0.92.1";
src = fetchFromGitHub {
owner = "returntocorp";
repo = "semgrep";
rev = "refs/tags/v${version}";
sha256 = "sha256-rZhp2eeNmBjhH96MQC1z6ytPe0MNnkeVOp9cdRr6Y4w=";
};
nativeBuildInputs = [ atdge ];
}
This fails with an error:
> File "semgrep-core/src/core/dune", line 1, characters 0-0:
> Error: File unavailable: semgrep-core/src/core/Semgrep_output_v0.atd
> File "semgrep-core/src/core/dune", line 20, characters 5-18:
> 20 | ppx_profiling
> ^^^^^^^^^^^^^
> Error: Library "ppx_profiling" not found.
At this point, I’m pretty lost because I’ve never dealt with OCaml or Dune, so I’m not sure if I need to bring in this dependency or if I’m just doing something wrong (searching nixpkgs didn’t bring up anything matching the dependency).
Any help is appreciated!