2022-04-27 09:35:20 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, bzip2, zlib, autoconf, automake, cmake, help2man, texinfo, libtool, cppzmq
|
2023-10-09 19:29:22 +00:00
|
|
|
, libarchive, avro-cpp_llvm, boost, zeromq, openssl, pam, libiodbc, libkrb5, gcc, libcxx, which, catch2
|
|
|
|
, nanodbc_llvm, fmt, nlohmann_json, spdlog, curl }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
2022-03-05 16:20:37 +00:00
|
|
|
avro-cpp = avro-cpp_llvm;
|
|
|
|
nanodbc = nanodbc_llvm;
|
2020-04-24 23:36:52 +00:00
|
|
|
in
|
|
|
|
let
|
|
|
|
common = import ./common.nix {
|
2022-04-27 09:35:20 +00:00
|
|
|
inherit lib stdenv bzip2 zlib autoconf automake cmake
|
2023-10-09 19:29:22 +00:00
|
|
|
help2man texinfo libtool cppzmq libarchive
|
2022-03-05 16:20:37 +00:00
|
|
|
zeromq openssl pam libiodbc libkrb5 gcc libcxx
|
|
|
|
boost avro-cpp which catch2 nanodbc fmt nlohmann_json
|
2023-10-09 19:29:22 +00:00
|
|
|
spdlog curl;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2022-03-05 16:20:37 +00:00
|
|
|
in
|
|
|
|
rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# irods: libs and server package
|
2023-10-09 19:29:22 +00:00
|
|
|
irods = stdenv.mkDerivation (finalAttrs: common // {
|
|
|
|
version = "4.3.0";
|
2020-05-15 21:57:56 +00:00
|
|
|
pname = "irods";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "irods";
|
|
|
|
repo = "irods";
|
2023-10-09 19:29:22 +00:00
|
|
|
rev = finalAttrs.version;
|
|
|
|
sha256 = "sha256-rceDGFpfoFIByzDOtgNIo9JRoVd0syM21MjEKoZUQaE=";
|
2020-05-15 21:57:56 +00:00
|
|
|
fetchSubmodules = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# fix build with recent llvm versions
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = "-Wno-deprecated-register -Wno-deprecated-declarations";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
postPatch = common.postPatch + ''
|
2020-04-24 23:36:52 +00:00
|
|
|
patchShebangs ./test
|
|
|
|
substituteInPlace plugins/database/CMakeLists.txt --replace "COMMAND cpp" "COMMAND ${gcc.cc}/bin/cpp"
|
2020-05-15 21:57:56 +00:00
|
|
|
for file in unit_tests/cmake/test_config/*.cmake
|
|
|
|
do
|
|
|
|
substituteInPlace $file --replace "CATCH2}/include" "CATCH2}/include/catch2"
|
|
|
|
done
|
2020-04-24 23:36:52 +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
|
|
|
|
"
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
substituteInPlace server/auth/CMakeLists.txt --replace SETUID ""
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = common.meta // {
|
2021-02-05 17:12:51 +00:00
|
|
|
longDescription = common.meta.longDescription + "This package provides the servers and libraries.";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
# icommands (CLI) package, depends on the irods package
|
2023-10-09 19:29:22 +00:00
|
|
|
irods-icommands = stdenv.mkDerivation (finalAttrs: common // {
|
|
|
|
version = "4.3.0";
|
2022-03-05 16:20:37 +00:00
|
|
|
pname = "irods-icommands";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "irods";
|
|
|
|
repo = "irods_client_icommands";
|
2023-10-09 19:29:22 +00:00
|
|
|
rev = finalAttrs.version;
|
|
|
|
sha256 = "sha256-90q1GPkoEUoiQXM6cA+DWwth7g8v93V471r9jm+l9aw=";
|
2022-03-05 16:20:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = common.buildInputs ++ [ irods ];
|
|
|
|
|
|
|
|
postPatch = common.postPatch + ''
|
|
|
|
patchShebangs ./bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
cmakeFlags = common.cmakeFlags ++ [
|
|
|
|
"-DCMAKE_INSTALL_PREFIX=${stdenv.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"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
meta = common.meta // {
|
|
|
|
description = common.meta.description + " CLI clients";
|
|
|
|
longDescription = common.meta.longDescription + "This package provides the CLI clients, called 'icommands'.";
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
});
|
|
|
|
}
|