2023-01-11 07:51:40 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, boost
|
|
|
|
, zlib
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "assimp";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "5.4.1";
|
2021-12-19 01:06:50 +00:00
|
|
|
outputs = [ "out" "lib" "dev" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
src = fetchFromGitHub {
|
2020-04-24 23:36:52 +00:00
|
|
|
owner = "assimp";
|
|
|
|
repo = "assimp";
|
|
|
|
rev = "v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-F3aaEaHZyOLES6zOYqHRG0BtaKk9d/bAHCtal6FsIWc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = [ boost zlib ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
cmakeFlags = [ "-DASSIMP_BUILD_ASSIMP_TOOLS=ON" ];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString ([
|
2023-02-16 17:41:37 +00:00
|
|
|
# Needed with GCC 12
|
|
|
|
"-Wno-error=array-bounds"
|
2023-07-15 17:15:38 +00:00
|
|
|
]);
|
2023-02-16 17:41:37 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Library to import various 3D model formats";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "assimp";
|
2021-12-19 01:06:50 +00:00
|
|
|
homepage = "https://www.assimp.org/";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ ehmry ];
|
2020-09-25 04:45:31 +00:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|