Merge pull request #87447 from bcdarwin/ocaml-torch
ocamlPackages.torch: init at 0.8
This commit is contained in:
commit
5e22232f8f
|
@ -0,0 +1,56 @@
|
|||
{ stdenv
|
||||
, buildDunePackage
|
||||
, fetchFromGitHub
|
||||
, cmdliner
|
||||
, ctypes
|
||||
, npy
|
||||
, ocaml-compiler-libs
|
||||
, ppx_custom_printf
|
||||
, ppx_expect
|
||||
, ppx_sexp_conv
|
||||
, sexplib
|
||||
, stdio
|
||||
, pytorch
|
||||
}:
|
||||
|
||||
buildDunePackage rec {
|
||||
pname = "torch";
|
||||
version = "0.8";
|
||||
|
||||
owner = "LaurentMazare";
|
||||
|
||||
minimumOCamlVersion = "4.07";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
inherit owner;
|
||||
repo = "ocaml-${pname}";
|
||||
rev = version;
|
||||
sha256 = "19w31paj24pns2ahk9j9rgpkb5hpcd41kfaarxrlddww5dl6pxvi";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
cmdliner
|
||||
ctypes
|
||||
npy
|
||||
ocaml-compiler-libs
|
||||
pytorch
|
||||
pytorch.dev
|
||||
ppx_custom_printf
|
||||
ppx_expect
|
||||
ppx_sexp_conv
|
||||
sexplib
|
||||
stdio
|
||||
];
|
||||
|
||||
preBuild = ''export LIBTORCH=${pytorch.dev}/'';
|
||||
|
||||
doCheck = true;
|
||||
checkPhase = "dune runtest";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
inherit (src.meta) homepage;
|
||||
description = "Ocaml bindings to Pytorch";
|
||||
maintainers = [ maintainers.bcdarwin ];
|
||||
license = licenses.asl20;
|
||||
};
|
||||
}
|
|
@ -758,6 +758,10 @@ let
|
|||
|
||||
tls = callPackage ../development/ocaml-modules/tls { };
|
||||
|
||||
torch = callPackage ../development/ocaml-modules/torch {
|
||||
inherit (pkgs.python3Packages) pytorch;
|
||||
};
|
||||
|
||||
type_conv_108_08_00 = callPackage ../development/ocaml-modules/type_conv/108.08.00.nix { };
|
||||
type_conv_109_60_01 = callPackage ../development/ocaml-modules/type_conv/109.60.01.nix { };
|
||||
type_conv_112_01_01 = callPackage ../development/ocaml-modules/type_conv/112.01.01.nix { };
|
||||
|
|
Loading…
Reference in New Issue