lol

microsoft_gsl: fix crossSystem build support

cmake needs to be part of nativeBuildInputs, otherwise you get a very unhelpful
debugging trace.

Signed-off-by: Austin Seipp <aseipp@pobox.com>

+15 -7
+15 -7
pkgs/development/libraries/microsoft_gsl/default.nix
··· 1 - { stdenv, fetchgit, cmake }: 1 + { stdenv, fetchgit, cmake 2 + , hostPlatform, buildPlatform 3 + }: 2 4 5 + let 6 + nativeBuild = hostPlatform == buildPlatform; 7 + in 3 8 stdenv.mkDerivation rec { 4 9 name = "microsoft_gsl-${version}"; 5 10 version = "2017-02-13"; ··· 10 15 sha256 = "03d17mnx6n175aakin313308q14wzvaa9pd0m1yfk6ckhha4qf35"; 11 16 }; 12 17 13 - # build phase just runs the unit tests 14 - buildInputs = [ cmake ]; 18 + 19 + # build phase just runs the unit tests, so skip it if 20 + # we're doing a cross build 21 + nativeBuildInputs = [ cmake ]; 22 + buildPhase = if nativeBuild then "make" else "true"; 15 23 16 24 installPhase = '' 17 25 mkdir -p $out/include ··· 20 28 21 29 meta = with stdenv.lib; { 22 30 description = "Functions and types that are suggested for use by the C++ Core Guidelines"; 23 - homepage = https://github.com/Microsoft/GSL; 24 - license = licenses.mit; 25 - platforms = platforms.all; 26 - maintainers = with maintainers; [ xwvvvvwx ]; 31 + homepage = https://github.com/Microsoft/GSL; 32 + license = licenses.mit; 33 + platforms = platforms.all; 34 + maintainers = with maintainers; [ thoughtpolice xwvvvvwx ]; 27 35 }; 28 36 }