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
61
pkgs/development/libraries/openhmd/default.nix
Normal file
61
pkgs/development/libraries/openhmd/default.nix
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
{ lib, stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, pkg-config
|
||||
, hidapi
|
||||
, SDL2
|
||||
, libGL
|
||||
, glew
|
||||
, withExamples ? true
|
||||
}:
|
||||
|
||||
let examplesOnOff = if withExamples then "ON" else "OFF"; in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "openhmd";
|
||||
version = "0.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "OpenHMD";
|
||||
repo = "OpenHMD";
|
||||
rev = version;
|
||||
sha256 = "1hkpdl4zgycag5k8njvqpx01apxmm8m8pvhlsxgxpqiqy9a38ccg";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
|
||||
buildInputs = [
|
||||
hidapi
|
||||
] ++ lib.optionals withExamples [
|
||||
SDL2
|
||||
glew
|
||||
libGL
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBUILD_BOTH_STATIC_SHARED_LIBS=ON"
|
||||
"-DOPENHMD_EXAMPLE_SIMPLE=${examplesOnOff}"
|
||||
"-DOPENHMD_EXAMPLE_SDL=${examplesOnOff}"
|
||||
"-DOpenGL_GL_PREFERENCE=GLVND"
|
||||
];
|
||||
|
||||
postInstall = lib.optionalString withExamples ''
|
||||
mkdir -p $out/bin
|
||||
install -D examples/simple/simple $out/bin/openhmd-example-simple
|
||||
install -D examples/opengl/openglexample $out/bin/openhmd-example-opengl
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://www.openhmd.net"; # https does not work
|
||||
description = "Library API and drivers immersive technology";
|
||||
longDescription = ''
|
||||
OpenHMD is a very simple FLOSS C library and a set of drivers
|
||||
for interfacing with Virtual Reality (VR) Headsets aka
|
||||
Head-mounted Displays (HMDs), controllers and trackers like
|
||||
Oculus Rift, HTC Vive, Windows Mixed Reality, and etc.
|
||||
'';
|
||||
license = licenses.boost;
|
||||
maintainers = with maintainers; [ oxij ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue