@@ -1,78 +0,0 @@
1−{ stdenv, fetchFromGitHub, glibcLocales
2−, cmake, python3, libpng, zlib
3−}:
4−
5−stdenv.mkDerivation rec {
6− pname = "onnxruntime";
7− version = "1.3.1";
8−
9− src = fetchFromGitHub {
10− owner = "microsoft";
11− repo = "onnxruntime";
12− rev = "v${version}";
13− sha256 = "0rbk1jbfc447x2wybz2hsba6w1ij0fq21996l52cqv39898lvy9d";
14− # TODO: use nix-versions of grpc, onnx, eigen, googletest, etc.
15− # submodules increase src size and compile times significantly
16− # not currently feasible due to how integrated cmake build is with git
17− fetchSubmodules = true;
18− # Remove unicode file names which leads to different checksums on HFS+
19− # vs. other filesystems because of unicode normalisation.
20− postFetch = ''
21− rm -rf $out/winml/test/collateral/models/UnicodePath/
22− '';
23− };
24−
25− # TODO: build server, and move .so's to lib output
26− outputs = [ "out" "dev" ];
27−
28− nativeBuildInputs = [
29− cmake
30− python3 # for shared-lib or server
31− ];
32−
33− buildInputs = [
34− # technically optional, but highly recommended
35− libpng
36− zlib
37− ];
38−
39− cmakeDir = "../cmake";
40−
41− cmakeFlags = [
42− "-Donnxruntime_USE_OPENMP=ON"
43− "-Donnxruntime_BUILD_SHARED_LIB=ON"
44− "-Donnxruntime_ENABLE_LTO=ON"
45− ];
46−
47− # ContribOpTest.StringNormalizerTest sets locale to en_US.UTF-8"
48− preCheck = stdenv.lib.optionalString stdenv.isLinux ''
49− export LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive"
50− '';
51− doCheck = true;
52−
53− postInstall = ''
54− rm -r $out/bin # ctest runner
55− '';
56−
57− enableParallelBuilding = true;
58−
59− meta = with stdenv.lib; {
60− description = "Cross-platform, high performance scoring engine for ML models";
61− longDescription = ''
62− ONNX Runtime is a performance-focused complete scoring engine
63− for Open Neural Network Exchange (ONNX) models, with an open
64− extensible architecture to continually address the latest developments
65− in AI and Deep Learning. ONNX Runtime stays up to date with the ONNX
66− standard with complete implementation of all ONNX operators, and
67− supports all ONNX releases (1.2+) with both future and backwards
68− compatibility.
69− '';
70− homepage = "https://github.com/microsoft/onnxruntime";
71− changelog = "https://github.com/microsoft/onnxruntime/releases";
72− # https://github.com/microsoft/onnxruntime/blob/master/BUILD.md#architectures
73− platforms = platforms.unix;
74− license = licenses.mit;
75− maintainers = with maintainers; [ jonringer ];
76− };
77−
78−}