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