python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / tools / filesystems / xtreemfs / default.nix
blobe8f283b096ce7d1dd455d2dda05514a32b6db628
1 { stdenv
2 , lib
3 , fetchFromGitHub
4 , fetchpatch
5 , makeWrapper
6 , ant
7 , attr
8 , boost
9 , cmake
10 , file
11 , fuse
12 , jdk
13 , openssl
14 , python3
15 , valgrind
16 , which
19 stdenv.mkDerivation {
20   src = fetchFromGitHub {
21     # using unstable release because stable (v1.5.1) has broken repl java plugin
22     rev = "7ddcb081aa125b0cfb008dc98addd260b8353ab3";
23     owner = "xtreemfs";
24     repo = "xtreemfs";
25     sha256 = "1hjmd32pla27zf98ghzz6r5ml8ry86m9dsryv1z01kxv5l95b3m0";
26   };
28   pname = "XtreemFS";
29   version = "1.5.1.81";
31   nativeBuildInputs = [ makeWrapper python3 ];
32   buildInputs = [ which attr ];
34   patches = [
35     (fetchpatch {
36       url = "https://github.com/xtreemfs/xtreemfs/commit/ebfdc2fff56c09f310159d92026883941e42a953.patch";
37       sha256 = "075w00ad88qm6xpm5679m0gfzkrc53w17sk7ycybf4hzxjs29ygy";
38       name = "xtreemfs-fix-for-openssl_1_1";
39     })
40   ];
42   preConfigure = ''
43     export JAVA_HOME=${jdk}
44     export ANT_HOME=${ant}
46     export BOOST_INCLUDEDIR=${boost.dev}/include
47     export BOOST_LIBRARYDIR=${boost.out}/lib
48     export CMAKE_INCLUDE_PATH=${openssl.dev}/include
49     export CMAKE_LIBRARY_PATH=${lib.getLib openssl}/lib
51     substituteInPlace cpp/cmake/FindValgrind.cmake \
52       --replace "/usr/local" "${valgrind}"
54     substituteInPlace cpp/CMakeLists.txt \
55       --replace '"/lib64" "/usr/lib64"' '"${attr.out}/lib" "${fuse}/lib"'
57     export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${fuse}/include"
58     export NIX_CFLAGS_LINK="$NIX_CFLAGS_LINK -L${fuse}/lib"
60     export DESTDIR=$out
62     substituteInPlace Makefile \
63       --replace "/usr/share/" "/share/" \
64       --replace 'BIN_DIR=$(DESTDIR)/usr/bin' "BIN_DIR=$out/bin"
66     substituteInPlace etc/init.d/generate_initd_scripts.sh \
67       --replace "/bin/bash" "${stdenv.shell}"
69     substituteInPlace cpp/thirdparty/gtest-1.7.0/configure \
70       --replace "/usr/bin/file" "${file}/bin/file"
72     substituteInPlace cpp/thirdparty/protobuf-2.5.0/configure \
73       --replace "/usr/bin/file" "${file}/bin/file"
75     substituteInPlace cpp/thirdparty/protobuf-2.5.0/gtest/configure \
76       --replace "/usr/bin/file" "${file}/bin/file"
78     # do not put cmake into buildInputs
79     export PATH="$PATH:${cmake}/bin"
80   '';
82   doCheck = false;
84   postInstall = ''
85     rm -r $out/sbin
86   '';
88   meta = {
89     description = "A distributed filesystem";
90     maintainers = with lib.maintainers; [ raskin matejc ];
91     platforms = lib.platforms.linux;
92     license = lib.licenses.bsd3;
93   };