diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/assimp')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/assimp/default.nix | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/assimp/default.nix b/nixpkgs/pkgs/development/libraries/assimp/default.nix new file mode 100644 index 000000000000..ec2d5561570e --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/assimp/default.nix @@ -0,0 +1,40 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, boost +, zlib +}: + +stdenv.mkDerivation rec { + pname = "assimp"; + version = "5.3.1"; + outputs = [ "out" "lib" "dev" ]; + + src = fetchFromGitHub { + owner = "assimp"; + repo = "assimp"; + rev = "v${version}"; + hash = "sha256-/1A8n7oe9WsF3FpbLZxhifzrdj38t9l5Kc8Q5jfDoyY="; + }; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ boost zlib ]; + + cmakeFlags = [ "-DASSIMP_BUILD_ASSIMP_TOOLS=ON" ]; + + env.NIX_CFLAGS_COMPILE = toString ([ + # Needed with GCC 12 + "-Wno-error=array-bounds" + ] ++ lib.optionals stdenv.hostPlatform.isRiscV [ + "-Wno-error=free-nonheap-object" + ]); + + meta = with lib; { + description = "A library to import various 3D model formats"; + homepage = "https://www.assimp.org/"; + license = licenses.bsd3; + maintainers = with maintainers; [ ehmry ]; + platforms = platforms.linux ++ platforms.darwin; + }; +} |