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

34 lines
902 B
Nix
Raw Normal View History

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