mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-14 02:27:41 +00:00
cpp-utilities: Add Darwin support
This commit is contained in:
parent
830d948f46
commit
8e3b74171d
@ -3,6 +3,7 @@
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, cppunit
|
||||
, iconv
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -18,19 +19,23 @@ stdenv.mkDerivation rec {
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
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
|
||||
preCheck = ''
|
||||
checkFlagsArray+=(
|
||||
"LD_LIBRARY_PATH=$PWD"
|
||||
)
|
||||
'';
|
||||
doCheck = true;
|
||||
# tests fail on Darwin
|
||||
doCheck = !stdenv.isDarwin;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/Martchus/cpp-utilities";
|
||||
description = "Common C++ classes and routines used by @Martchus' applications featuring argument parser, IO and conversion utilities";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ doronbehar ];
|
||||
platforms = platforms.linux;
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user