cpp-utilities: Add Darwin support
This commit is contained in:
parent
830d948f46
commit
8e3b74171d
|
@ -3,6 +3,7 @@
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, cmake
|
, cmake
|
||||||
, cppunit
|
, cppunit
|
||||||
|
, iconv
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
|
@ -18,19 +19,23 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ];
|
nativeBuildInputs = [ cmake ];
|
||||||
nativeCheckInputs = [ cppunit ];
|
nativeCheckInputs = [ cppunit ];
|
||||||
|
buildInputs = lib.optionals stdenv.isDarwin [
|
||||||
|
iconv # needed on Darwin, see https://github.com/Martchus/cpp-utilities/issues/4
|
||||||
|
];
|
||||||
# Otherwise, tests fail since the resulting shared object libc++utilities.so is only available in PWD of the make files
|
# Otherwise, tests fail since the resulting shared object libc++utilities.so is only available in PWD of the make files
|
||||||
preCheck = ''
|
preCheck = ''
|
||||||
checkFlagsArray+=(
|
checkFlagsArray+=(
|
||||||
"LD_LIBRARY_PATH=$PWD"
|
"LD_LIBRARY_PATH=$PWD"
|
||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
doCheck = true;
|
# tests fail on Darwin
|
||||||
|
doCheck = !stdenv.isDarwin;
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/Martchus/cpp-utilities";
|
homepage = "https://github.com/Martchus/cpp-utilities";
|
||||||
description = "Common C++ classes and routines used by @Martchus' applications featuring argument parser, IO and conversion utilities";
|
description = "Common C++ classes and routines used by @Martchus' applications featuring argument parser, IO and conversion utilities";
|
||||||
license = licenses.gpl2Plus;
|
license = licenses.gpl2Plus;
|
||||||
maintainers = with maintainers; [ doronbehar ];
|
maintainers = with maintainers; [ doronbehar ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux ++ platforms.darwin;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue