diff options
Diffstat (limited to 'pkgs/tools/filesystems/moosefs/default.nix')
-rw-r--r-- | pkgs/tools/filesystems/moosefs/default.nix | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/pkgs/tools/filesystems/moosefs/default.nix b/pkgs/tools/filesystems/moosefs/default.nix index df3dd661d75..ee0d5eedc92 100644 --- a/pkgs/tools/filesystems/moosefs/default.nix +++ b/pkgs/tools/filesystems/moosefs/default.nix @@ -1,39 +1,53 @@ -{ stdenv +{ lib, stdenv , fetchFromGitHub , makeWrapper , python , fuse -, pkgconfig +, pkg-config , libpcap , zlib }: stdenv.mkDerivation rec { pname = "moosefs"; - version = "3.0.114"; + version = "3.0.115"; src = fetchFromGitHub { owner = pname; repo = pname; rev = "v${version}"; - sha256 = "0bilrzzlg599xy21cm7r0xb2sanngr74j3z03xgybcm10kl97i7j"; + sha256 = "0dap9dqwwx8adma6arxg015riqc86cmjv2m44hk0kz7s24h79ipq"; }; - nativeBuildInputs = [ pkgconfig makeWrapper ]; + nativeBuildInputs = [ pkg-config makeWrapper ]; buildInputs = - [ fuse libpcap zlib ]; + [ 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 = '' substituteInPlace $out/sbin/mfscgiserv --replace "datapath=\"$out" "datapath=\"" - wrapProgram $out/sbin/mfscgiserv \ - --prefix PATH ":" "${python}/bin" ''; - meta = with stdenv.lib; { + doCheck = true; + + meta = with lib; { homepage = "https://moosefs.com"; description = "Open Source, Petabyte, Fault-Tolerant, Highly Performing, Scalable Network Distributed File System"; - platforms = platforms.linux; + platforms = platforms.unix; license = licenses.gpl2; maintainers = [ maintainers.mfossen ]; }; |