nixpkgs/pkgs/development/libraries/lib3mf/default.nix

34 lines
904 B
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, cmake, ninja, libuuid, libossp_uuid, gtest }:
2019-04-07 09:27:15 +00:00
stdenv.mkDerivation rec {
pname = "lib3mf";
2020-10-19 23:14:53 +00:00
version = "2.0.0";
2019-04-07 09:27:15 +00:00
src = fetchFromGitHub {
owner = "3MFConsortium";
repo = pname;
rev = "v${version}";
2020-10-19 23:14:53 +00:00
sha256 = "0w4d9zvl95g1x3r5nyd6cr27g6fwhhwaivh8a5r1xs5l6if21x19";
2019-04-07 09:27:15 +00:00
};
nativeBuildInputs = [ cmake ninja ];
buildInputs = if stdenv.isDarwin then [ libossp_uuid ] else [ libuuid ];
2019-04-07 09:27:15 +00:00
postPatch = ''
2020-10-19 23:14:53 +00:00
rmdir Tests/googletest
ln -s ${gtest.src} Tests/googletest
2019-04-21 15:24:49 +00:00
# fix libdir=''${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
sed -i 's,=''${\(exec_\)\?prefix}/,=,' lib3MF.pc.in
2019-04-07 09:27:15 +00: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;
};
}