Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib
2, stdenv
3, fetchFromGitHub
4, cmake
5, boost
6, zlib
7}:
8
9stdenv.mkDerivation rec {
10 pname = "assimp";
11 version = "5.2.5";
12 outputs = [ "out" "lib" "dev" ];
13
14 src = fetchFromGitHub{
15 owner = "assimp";
16 repo = "assimp";
17 rev = "v${version}";
18 hash = "sha256-vQx+PaET5mlvvIGHk6pEnZvM3qw8DiC3hd1Po6OAHxQ=";
19 };
20
21 nativeBuildInputs = [ cmake ];
22 buildInputs = [ boost zlib ];
23
24 cmakeFlags = [ "-DASSIMP_BUILD_ASSIMP_TOOLS=ON" ];
25
26 env.NIX_CFLAGS_COMPILE = toString [
27 # Needed with GCC 12
28 "-Wno-error=array-bounds"
29 ];
30
31 meta = with lib; {
32 description = "A library to import various 3D model formats";
33 homepage = "https://www.assimp.org/";
34 license = licenses.bsd3;
35 maintainers = with maintainers; [ ehmry ];
36 platforms = platforms.linux ++ platforms.darwin;
37 };
38}