2020-05-05 16:33:21 +01:00
|
|
|
{ stdenv, fetchFromGitHub, bzip2, zlib, autoconf, automake, cmake, gnumake, help2man , texinfo, libtool , cppzmq , libarchive, avro-cpp_llvm, boost, jansson, zeromq, openssl , pam, libiodbc, kerberos, gcc, libcxx, which, catch2 }:
|
2016-12-15 06:56:44 +00:00
|
|
|
|
|
|
|
with stdenv;
|
|
|
|
|
2018-01-31 17:16:30 +00:00
|
|
|
let
|
|
|
|
avro-cpp=avro-cpp_llvm;
|
|
|
|
in
|
2016-12-15 06:56:44 +00:00
|
|
|
let
|
|
|
|
common = import ./common.nix {
|
|
|
|
inherit stdenv bzip2 zlib autoconf automake cmake gnumake
|
|
|
|
help2man texinfo libtool cppzmq libarchive jansson
|
|
|
|
zeromq openssl pam libiodbc kerberos gcc libcxx
|
2020-05-05 16:33:21 +01:00
|
|
|
boost avro-cpp which catch2;
|
2016-12-15 06:56:44 +00:00
|
|
|
};
|
|
|
|
in rec {
|
|
|
|
|
|
|
|
# irods: libs and server package
|
|
|
|
irods = stdenv.mkDerivation (common // rec {
|
2020-05-05 16:33:21 +01:00
|
|
|
version = "4.2.7";
|
|
|
|
pname = "irods";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "irods";
|
|
|
|
repo = "irods";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "1pd4l42z4igzf0l8xbp7yz0nhzsv47ziv5qj8q1hh6pfhmwlzp9s";
|
|
|
|
fetchSubmodules = true;
|
2016-12-15 06:56:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# Patches:
|
|
|
|
# irods_root_path.patch : the root path is obtained by stripping 3 items of the path,
|
|
|
|
# but we don't use /usr with nix, so remove only 2 items.
|
|
|
|
patches = [ ./irods_root_path.patch ];
|
|
|
|
|
2019-10-30 02:23:29 +00:00
|
|
|
# fix build with recent llvm versions
|
|
|
|
NIX_CFLAGS_COMPILE = "-Wno-deprecated-register -Wno-deprecated-declarations";
|
2019-09-03 21:04:15 +01:00
|
|
|
|
2016-12-15 06:56:44 +00:00
|
|
|
preConfigure = common.preConfigure + ''
|
|
|
|
patchShebangs ./test
|
|
|
|
substituteInPlace plugins/database/CMakeLists.txt --replace "COMMAND cpp" "COMMAND ${gcc.cc}/bin/cpp"
|
|
|
|
substituteInPlace cmake/server.cmake --replace "DESTINATION usr/sbin" "DESTINATION sbin"
|
|
|
|
substituteInPlace cmake/server.cmake --replace "IRODS_DOC_DIR usr/share" "IRODS_DOC_DIR share"
|
|
|
|
substituteInPlace cmake/runtime_library.cmake --replace "DESTINATION usr/lib" "DESTINATION lib"
|
|
|
|
substituteInPlace cmake/development_library.cmake --replace "DESTINATION usr/lib" "DESTINATION lib"
|
|
|
|
substituteInPlace cmake/development_library.cmake --replace "DESTINATION usr/include" "DESTINATION include"
|
2020-05-05 16:33:21 +01:00
|
|
|
for file in unit_tests/cmake/test_config/*.cmake
|
|
|
|
do
|
|
|
|
substituteInPlace $file --replace "CATCH2}/include" "CATCH2}/include/catch2"
|
|
|
|
done
|
2016-12-15 06:56:44 +00:00
|
|
|
export cmakeFlags="$cmakeFlags
|
|
|
|
-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath,$out/lib
|
|
|
|
-DCMAKE_MODULE_LINKER_FLAGS=-Wl,-rpath,$out/lib
|
|
|
|
-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-rpath,$out/lib
|
|
|
|
"
|
2017-06-28 20:37:34 +01:00
|
|
|
|
|
|
|
substituteInPlace cmake/server.cmake --replace SETUID ""
|
2016-12-15 06:56:44 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = common.meta // {
|
|
|
|
longDescription = common.meta.longDescription + ''
|
|
|
|
This package provides the servers and libraries.'';
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
# icommands (CLI) package, depends on the irods package
|
|
|
|
irods-icommands = stdenv.mkDerivation (common // rec {
|
2020-05-05 16:33:21 +01:00
|
|
|
version = "4.2.7";
|
|
|
|
pname = "irods-icommands";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "irods";
|
|
|
|
repo = "irods_client_icommands";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "08hqrc9iaw0y9rrrcknnl5mzbcrsvqc39pwvm62fipl3vnfqryli";
|
2016-12-15 06:56:44 +00:00
|
|
|
};
|
|
|
|
|
2020-05-05 16:33:21 +01:00
|
|
|
patches = [ ./zmqcpp-deprecated-send_recv.patch ];
|
|
|
|
|
2016-12-15 06:56:44 +00:00
|
|
|
buildInputs = common.buildInputs ++ [ irods ];
|
|
|
|
|
|
|
|
preConfigure = common.preConfigure + ''
|
|
|
|
patchShebangs ./bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
cmakeFlags = common.cmakeFlags ++ [
|
|
|
|
"-DCMAKE_INSTALL_PREFIX=${out}"
|
|
|
|
"-DIRODS_DIR=${irods}/lib/irods/cmake"
|
|
|
|
"-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath,${irods}/lib"
|
|
|
|
"-DCMAKE_MODULE_LINKER_FLAGS=-Wl,-rpath,${irods}/lib"
|
|
|
|
"-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-rpath,${irods}/lib"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = common.meta // {
|
|
|
|
description = common.meta.description + " CLI clients";
|
|
|
|
longDescription = common.meta.longDescription + ''
|
|
|
|
This package provides the CLI clients, called 'icommands'.'';
|
|
|
|
};
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|