radiotray-ng: use checkInputs, but disable tests, also cleanup

This commit is contained in:
Jan Malakhovski 2018-08-08 18:15:17 +00:00
parent 1662443fa1
commit 1cb596748f

View File

@ -23,7 +23,7 @@
# rt2rtng
, python2
# Testing
, gmock
, gtest
# Fixup
, wrapGAppsHook
, makeWrapper
@ -58,11 +58,10 @@ stdenv.mkDerivation rec {
libxdg_basedir
lsb-release
wxGTK
] ++ stdenv.lib.optional doCheck gmock
++ gstInputs
] ++ gstInputs
++ pythonInputs;
prePatch = ''
postPatch = ''
for x in debian/CMakeLists.txt include/radiotray-ng/common.hpp data/*.desktop; do
substituteInPlace $x --replace /usr $out
done
@ -74,14 +73,16 @@ stdenv.mkDerivation rec {
--replace radiotray-ng-notification radiotray-ng-on
'';
cmakeFlags = stdenv.lib.optional doCheck "-DBUILD_TESTS=ON";
cmakeFlags = [
"-DBUILD_TESTS=${if doCheck then "ON" else "OFF"}"
];
enableParallelBuilding = true;
# XXX: as of 0.2.2, tries to download gmock instead of checking for provided
doCheck = false;
checkInputs = [ gtest ];
checkPhase = "ctest";
# doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
doCheck = false; # fails to pick up supplied gtest, tries to download it instead
preFixup = ''
gappsWrapperArgs+=(--suffix PATH : ${stdenv.lib.makeBinPath [ dbus ]})