uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
64
pkgs/development/libraries/bullet/default.nix
Normal file
64
pkgs/development/libraries/bullet/default.nix
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, libGLU
|
||||
, libGL
|
||||
, freeglut
|
||||
, Cocoa
|
||||
, OpenGL
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bullet";
|
||||
version = "3.24";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bulletphysics";
|
||||
repo = "bullet3";
|
||||
rev = version;
|
||||
sha256 = "sha256-1zQZI1MdW0Ipg5XJeiFZQi/6cI0t6Ckralc5DE3auow=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = lib.optionals stdenv.isLinux [ libGLU libGL freeglut ]
|
||||
++ lib.optionals stdenv.isDarwin [ Cocoa OpenGL ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace examples/ThirdPartyLibs/Gwen/CMakeLists.txt \
|
||||
--replace "-DGLEW_STATIC" "-DGLEW_STATIC -Wno-narrowing"
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
sed -i 's/FIND_PACKAGE(OpenGL)//' CMakeLists.txt
|
||||
sed -i 's/FIND_LIBRARY(COCOA_LIBRARY Cocoa)//' CMakeLists.txt
|
||||
'';
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBUILD_SHARED_LIBS=ON"
|
||||
"-DBUILD_CPU_DEMOS=OFF"
|
||||
"-DINSTALL_EXTRA_LIBS=ON"
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
"-DOPENGL_FOUND=true"
|
||||
"-DOPENGL_LIBRARIES=${OpenGL}/Library/Frameworks/OpenGL.framework"
|
||||
"-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks/OpenGL.framework"
|
||||
"-DOPENGL_gl_LIBRARY=${OpenGL}/Library/Frameworks/OpenGL.framework"
|
||||
"-DCOCOA_LIBRARY=${Cocoa}/Library/Frameworks/Cocoa.framework"
|
||||
"-DBUILD_BULLET2_DEMOS=OFF"
|
||||
"-DBUILD_UNIT_TESTS=OFF"
|
||||
"-DBUILD_BULLET_ROBOTICS_GUI_EXTRA=OFF"
|
||||
];
|
||||
|
||||
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang
|
||||
"-Wno-error=argument-outside-range -Wno-error=c++11-narrowing";
|
||||
|
||||
meta = with lib; {
|
||||
description = "A professional free 3D Game Multiphysics Library";
|
||||
longDescription = ''
|
||||
Bullet 3D Game Multiphysics Library provides state of the art collision
|
||||
detection, soft body and rigid body dynamics.
|
||||
'';
|
||||
homepage = "http://bulletphysics.org";
|
||||
license = licenses.zlib;
|
||||
maintainers = with maintainers; [ aforemny ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue