1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-14 08:34:50 +00:00
nixpkgs/pkgs/development/ocaml-modules/torch/default.nix
Vincent Laporte d71a03ad69
ocamlPackages.torch: 0.9b → 0.10 (#94922)
Disable tests on Aarch64 as `src/tests/vision_tests.ml` fails.
2020-08-15 15:15:48 +02:00

56 lines
951 B
Nix

{ lib
, 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.10";
minimumOCamlVersion = "4.07";
src = fetchFromGitHub {
owner = "LaurentMazare";
repo = "ocaml-${pname}";
rev = version;
sha256 = "1rqrv6hbical8chk0bl2nf60q6m4b5d1gab9fc5q03vkz2987f9b";
};
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 = !stdenv.isAarch64;
checkPhase = "dune runtest";
meta = with lib; {
inherit (src.meta) homepage;
description = "Ocaml bindings to Pytorch";
maintainers = [ maintainers.bcdarwin ];
license = licenses.asl20;
};
}