2019-07-29 18:04:12 +01:00
|
|
|
{ stdenv, fetchFromGitHub, cmake, ninja, libuuid, libossp_uuid, gtest }:
|
2019-04-07 10:27:15 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "lib3mf";
|
|
|
|
version = "1.8.1";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "3MFConsortium";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "11wpk6n9ga2p57h1dcrp37w77mii0r7r6mlrgmykf7rvii1rzgqd";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ninja ];
|
|
|
|
|
2019-07-29 18:04:12 +01:00
|
|
|
buildInputs = if stdenv.isDarwin then [ libossp_uuid ] else [ libuuid ];
|
2019-04-07 10:27:15 +01:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
rmdir UnitTests/googletest
|
|
|
|
ln -s ${gtest.src} UnitTests/googletest
|
2019-04-21 16:24:49 +01:00
|
|
|
|
|
|
|
# fix libdir=''${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
|
|
|
|
sed -i 's,=''${\(exec_\)\?prefix}/,=,' lib3MF.pc.in
|
2019-04-07 10:27:15 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Reference implementation of the 3D Manufacturing Format file standard";
|
|
|
|
homepage = "https://3mf.io/";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ gebner ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|