19 buildDunePackage rec {
23 minimalOCamlVersion = "4.08";
25 src = fetchFromGitHub {
26 owner = "LaurentMazare";
27 repo = "ocaml-${pname}";
29 hash = "sha256-z/9NUBjeFWE63Z/e8OyzDiy8hrn6qzjaiBH8G9MPeos=";
33 # Pytorch 2.0 support. Drop when it reaches a release
35 url = "https://github.com/LaurentMazare/ocaml-torch/commit/ef7ef30cafecb09e45ec1ed8ce4bedae5947cfa5.patch";
36 hash = "sha256-smdwKy40iIISp/25L2J4az6KmqFS1soeChBElUyhl5A=";
40 buildInputs = [ dune-configurator ];
42 propagatedBuildInputs = [
56 preBuild = "export LIBTORCH=${torch.dev}/";
58 doCheck = !stdenv.isAarch64;
61 inherit (src.meta) homepage;
62 description = "Ocaml bindings to Pytorch";
63 maintainers = [ maintainers.bcdarwin ];
64 license = licenses.asl20;