moosefs: add darwin build
This commit is contained in:
parent
6382f577bb
commit
8e71a4574f
|
@ -24,14 +24,30 @@ stdenv.mkDerivation rec {
|
||||||
buildInputs =
|
buildInputs =
|
||||||
[ fuse libpcap zlib python ];
|
[ fuse libpcap zlib python ];
|
||||||
|
|
||||||
|
buildFlags = lib.optionals stdenv.isDarwin [ "CPPFLAGS=-UHAVE_STRUCT_STAT_ST_BIRTHTIME" ];
|
||||||
|
|
||||||
|
# Fix the build on macOS with macFUSE installed
|
||||||
|
postPatch = lib.optionalString stdenv.isDarwin ''
|
||||||
|
substituteInPlace configure --replace \
|
||||||
|
"/usr/local/lib/pkgconfig" "/nonexistent"
|
||||||
|
'';
|
||||||
|
|
||||||
|
preBuild = lib.optional stdenv.isDarwin ''
|
||||||
|
substituteInPlace config.h --replace \
|
||||||
|
"#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1" \
|
||||||
|
"#undef HAVE_STRUCT_STAT_ST_BIRTHTIME"
|
||||||
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
substituteInPlace $out/sbin/mfscgiserv --replace "datapath=\"$out" "datapath=\""
|
substituteInPlace $out/sbin/mfscgiserv --replace "datapath=\"$out" "datapath=\""
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
doCheck = true;
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://moosefs.com";
|
homepage = "https://moosefs.com";
|
||||||
description = "Open Source, Petabyte, Fault-Tolerant, Highly Performing, Scalable Network Distributed File System";
|
description = "Open Source, Petabyte, Fault-Tolerant, Highly Performing, Scalable Network Distributed File System";
|
||||||
platforms = platforms.linux;
|
platforms = platforms.unix;
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
maintainers = [ maintainers.mfossen ];
|
maintainers = [ maintainers.mfossen ];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue