Merge pull request #108468 from prusnak/openhmd

openhmd: 0.3.0-rc1-20181218 -> 0.3.0

authored by

Pavol Rusnak and committed by
GitHub
4a7d5be0 47986770

+25 -18
+25 -18
pkgs/development/libraries/openhmd/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, pkgconfig, cmake, hidapi 2 - , withExamples ? true, SDL2 ? null, libGL ? null, glew ? null 3 }: 4 5 - with lib; 6 - 7 - let onoff = if withExamples then "ON" else "OFF"; in 8 9 - stdenv.mkDerivation { 10 pname = "openhmd"; 11 - version = "0.3.0-rc1-20181218"; 12 13 src = fetchFromGitHub { 14 owner = "OpenHMD"; 15 repo = "OpenHMD"; 16 - rev = "80d51bea575a5bf71bb3a0b9683b80ac3146596a"; 17 - sha256 = "09011vnlsn238r5vbb1ab57x888ljaa34xibrnfbm5bl9417ii4z"; 18 }; 19 20 - nativeBuildInputs = [ pkgconfig cmake ]; 21 22 buildInputs = [ 23 hidapi 24 - ] ++ optionals withExamples [ 25 - SDL2 libGL glew 26 ]; 27 28 cmakeFlags = [ 29 "-DBUILD_BOTH_STATIC_SHARED_LIBS=ON" 30 - "-DOPENHMD_EXAMPLE_SIMPLE=${onoff}" 31 - "-DOPENHMD_EXAMPLE_SDL=${onoff}" 32 "-DOpenGL_GL_PREFERENCE=GLVND" 33 ]; 34 35 - postInstall = optionalString withExamples '' 36 mkdir -p $out/bin 37 install -D examples/simple/simple $out/bin/openhmd-example-simple 38 install -D examples/opengl/openglexample $out/bin/openhmd-example-opengl 39 ''; 40 41 - meta = { 42 - homepage = "http://www.openhmd.net"; 43 description = "Library API and drivers immersive technology"; 44 longDescription = '' 45 OpenHMD is a very simple FLOSS C library and a set of drivers ··· 48 Oculus Rift, HTC Vive, Windows Mixed Reality, and etc. 49 ''; 50 license = licenses.boost; 51 - maintainers = [ maintainers.oxij ]; 52 platforms = platforms.unix; 53 }; 54 }
··· 1 + { stdenv 2 + , fetchFromGitHub 3 + , cmake 4 + , pkg-config 5 + , hidapi 6 + , SDL2 7 + , libGL 8 + , glew 9 + , withExamples ? true 10 }: 11 12 + let examplesOnOff = if withExamples then "ON" else "OFF"; in 13 14 + stdenv.mkDerivation rec { 15 pname = "openhmd"; 16 + version = "0.3.0"; 17 18 src = fetchFromGitHub { 19 owner = "OpenHMD"; 20 repo = "OpenHMD"; 21 + rev = version; 22 + sha256 = "1hkpdl4zgycag5k8njvqpx01apxmm8m8pvhlsxgxpqiqy9a38ccg"; 23 }; 24 25 + nativeBuildInputs = [ cmake pkg-config ]; 26 27 buildInputs = [ 28 hidapi 29 + ] ++ stdenv.lib.optionals withExamples [ 30 + SDL2 31 + glew 32 + libGL 33 ]; 34 35 cmakeFlags = [ 36 "-DBUILD_BOTH_STATIC_SHARED_LIBS=ON" 37 + "-DOPENHMD_EXAMPLE_SIMPLE=${examplesOnOff}" 38 + "-DOPENHMD_EXAMPLE_SDL=${examplesOnOff}" 39 "-DOpenGL_GL_PREFERENCE=GLVND" 40 ]; 41 42 + postInstall = stdenv.lib.optionalString withExamples '' 43 mkdir -p $out/bin 44 install -D examples/simple/simple $out/bin/openhmd-example-simple 45 install -D examples/opengl/openglexample $out/bin/openhmd-example-opengl 46 ''; 47 48 + meta = with stdenv.lib; { 49 + homepage = "http://www.openhmd.net"; # https does not work 50 description = "Library API and drivers immersive technology"; 51 longDescription = '' 52 OpenHMD is a very simple FLOSS C library and a set of drivers ··· 55 Oculus Rift, HTC Vive, Windows Mixed Reality, and etc. 56 ''; 57 license = licenses.boost; 58 + maintainers = with maintainers; [ oxij ]; 59 platforms = platforms.unix; 60 }; 61 }