7 automaticcomponenttoolkit,
17 stdenv.mkDerivation rec {
21 src = fetchFromGitHub {
22 owner = "3MFConsortium";
25 hash = "sha256-XEwrJINiNpI2+1wXxczirci8VJsUVs5iDUAMS6jWuNk=";
40 "-DCMAKE_INSTALL_INCLUDEDIR=include/lib3mf"
41 "-DUSE_INCLUDED_ZLIB=OFF"
42 "-DUSE_INCLUDED_LIBZIP=OFF"
43 "-DUSE_INCLUDED_GTEST=OFF"
44 "-DUSE_INCLUDED_SSL=OFF"
52 ] ++ lib.optional (!stdenv.hostPlatform.isDarwin) libuuid;
55 # fix libdir=''${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
56 sed -i 's,libdir=''${\(exec_\)\?prefix}/,libdir=,' lib3mf.pc.in
58 # replace bundled binaries
59 rm -r AutomaticComponentToolkit
60 ln -s ${automaticcomponenttoolkit}/bin AutomaticComponentToolkit
63 rm -r Libraries/{fast_float,googletest,libressl,libzip,zlib}
65 cat <<"EOF" >> Tests/CPP_Bindings/CMakeLists.txt
66 find_package(GTest REQUIRED)
67 target_link_libraries(''${TESTNAME} PRIVATE GTest::gtest)
70 mkdir Libraries/fast_float
71 ln -s ${lib.getInclude fast-float}/include/fast_float Libraries/fast_float/Include
73 # functions are no longer in openssl, remove them from test cleanup function
74 substituteInPlace Tests/CPP_Bindings/Source/UnitTest_EncryptionUtils.cpp \
75 --replace-warn "RAND_cleanup();" "" \
76 --replace-warn "EVP_cleanup();" "" \
77 --replace-warn "CRYPTO_cleanup_all_ex_data();" ""
83 description = "Reference implementation of the 3D Manufacturing Format file standard";
84 homepage = "https://3mf.io/";
85 license = licenses.bsd2;
86 maintainers = with maintainers; [ gebner ];
87 platforms = platforms.all;