Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions pkgs/tools/filesystems/irods/common.nix
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
{ lib, stdenv, bzip2, zlib, autoconf, automake, cmake, help2man, texinfo, libtool, cppzmq, libarchive
, avro-cpp, boost, jansson, zeromq, openssl, pam, libiodbc, libkrb5, gcc, libcxx, which, catch2, nanodbc, fmt
, nlohmann_json, spdlog }:
, avro-cpp, boost, zeromq, openssl, pam, libiodbc, libkrb5, gcc, libcxx, which, catch2, nanodbc, fmt
, nlohmann_json, spdlog, curl }:

# Common attributes of irods packages

{
nativeBuildInputs = [ autoconf automake cmake help2man texinfo which gcc ];
buildInputs = [ bzip2 zlib libtool cppzmq libarchive avro-cpp jansson zeromq openssl pam libiodbc libkrb5 boost
libcxx catch2 nanodbc fmt nlohmann_json spdlog ];
buildInputs = [ bzip2 zlib libtool cppzmq libarchive avro-cpp zeromq openssl pam libiodbc libkrb5 boost
libcxx catch2 nanodbc fmt nlohmann_json spdlog curl ];

cmakeFlags = [
"-DIRODS_EXTERNALS_FULLPATH_CLANG=${stdenv.cc}"
"-DIRODS_EXTERNALS_FULLPATH_CLANG_RUNTIME=${stdenv.cc}"
"-DIRODS_EXTERNALS_FULLPATH_ARCHIVE=${libarchive.lib}"
"-DIRODS_EXTERNALS_FULLPATH_AVRO=${avro-cpp}"
"-DIRODS_EXTERNALS_FULLPATH_BOOST=${boost}"
"-DIRODS_EXTERNALS_FULLPATH_JANSSON=${jansson}"
"-DIRODS_EXTERNALS_FULLPATH_ZMQ=${zeromq}"
"-DIRODS_EXTERNALS_FULLPATH_CPPZMQ=${cppzmq}"
"-DIRODS_EXTERNALS_FULLPATH_CATCH2=${catch2}"
Expand All @@ -31,13 +30,10 @@

postPatch = ''
patchShebangs ./packaging ./scripts
substituteInPlace CMakeLists.txt \
--replace "DESTINATION usr/bin" "DESTINATION bin" \
--replace "INCLUDE_DIRS usr/include/" "INCLUDE_DIRS include/" \
--replace "DESTINATION usr/lib/" "DESTINATION lib/" \
--replace "{IRODS_EXTERNALS_FULLPATH_JSON}/include" "{IRODS_EXTERNALS_FULLPATH_JSON}/include/nlohmann"
export cmakeFlags="$cmakeFlags
-DCMAKE_INSTALL_PREFIX=$out
-DIRODS_HOME_DIRECTORY=$out
-DCMAKE_INSTALL_SBINDIR=$out/sbin
"
'';

Expand Down
38 changes: 13 additions & 25 deletions pkgs/tools/filesystems/irods/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ lib, stdenv, fetchFromGitHub, bzip2, zlib, autoconf, automake, cmake, help2man, texinfo, libtool, cppzmq
, libarchive, avro-cpp_llvm, boost, jansson, zeromq, openssl, pam, libiodbc, libkrb5, gcc, libcxx, which, catch2
, nanodbc_llvm, fmt, nlohmann_json, spdlog }:
, libarchive, avro-cpp_llvm, boost, zeromq, openssl, pam, libiodbc, libkrb5, gcc, libcxx, which, catch2
, nanodbc_llvm, fmt, nlohmann_json, spdlog, curl }:

let
avro-cpp = avro-cpp_llvm;
Expand All @@ -9,43 +9,33 @@ in
let
common = import ./common.nix {
inherit lib stdenv bzip2 zlib autoconf automake cmake
help2man texinfo libtool cppzmq libarchive jansson
help2man texinfo libtool cppzmq libarchive
zeromq openssl pam libiodbc libkrb5 gcc libcxx
boost avro-cpp which catch2 nanodbc fmt nlohmann_json
spdlog;
spdlog curl;
};
in
rec {

# irods: libs and server package
irods = stdenv.mkDerivation (common // rec {
version = "4.2.11";
irods = stdenv.mkDerivation (finalAttrs: common // {
version = "4.3.0";
pname = "irods";

src = fetchFromGitHub {
owner = "irods";
repo = "irods";
rev = version;
sha256 = "0prcsiddk8n3h515jjapgfz1d6hjqywhrkcf6giqd7xc7b0slz44";
rev = finalAttrs.version;
sha256 = "sha256-rceDGFpfoFIByzDOtgNIo9JRoVd0syM21MjEKoZUQaE=";
fetchSubmodules = true;
};

# 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 ];

# fix build with recent llvm versions
env.NIX_CFLAGS_COMPILE = "-Wno-deprecated-register -Wno-deprecated-declarations";

postPatch = common.postPatch + ''
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"
for file in unit_tests/cmake/test_config/*.cmake
do
substituteInPlace $file --replace "CATCH2}/include" "CATCH2}/include/catch2"
Expand All @@ -56,7 +46,7 @@ rec {
-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-rpath,$out/lib
"

substituteInPlace cmake/server.cmake --replace SETUID ""
substituteInPlace server/auth/CMakeLists.txt --replace SETUID ""
'';

meta = common.meta // {
Expand All @@ -66,19 +56,17 @@ rec {


# icommands (CLI) package, depends on the irods package
irods-icommands = stdenv.mkDerivation (common // rec {
version = "4.2.11";
irods-icommands = stdenv.mkDerivation (finalAttrs: common // {
version = "4.3.0";
pname = "irods-icommands";

src = fetchFromGitHub {
owner = "irods";
repo = "irods_client_icommands";
rev = version;
sha256 = "0wgs585j2lp820py2pbizsk54xgz5id96fhxwwk9lqhbzxhfjhcg";
rev = finalAttrs.version;
sha256 = "sha256-90q1GPkoEUoiQXM6cA+DWwth7g8v93V471r9jm+l9aw=";
};

patches = [ ./zmqcpp-deprecated-send_recv.patch ];

buildInputs = common.buildInputs ++ [ irods ];

postPatch = common.postPatch + ''
Expand Down
49 changes: 0 additions & 49 deletions pkgs/tools/filesystems/irods/irods_root_path.patch

This file was deleted.

21 changes: 0 additions & 21 deletions pkgs/tools/filesystems/irods/zmqcpp-deprecated-send_recv.patch

This file was deleted.

6 changes: 3 additions & 3 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9322,9 +9322,9 @@ with pkgs;
idevicerestore = callPackage ../tools/misc/idevicerestore { };

inherit (callPackages ../tools/filesystems/irods rec {
stdenv = llvmPackages.libcxxStdenv;
libcxx = llvmPackages.libcxx;
boost = boost179.override { inherit stdenv; };
stdenv = llvmPackages_13.libcxxStdenv;
libcxx = llvmPackages_13.libcxx;
boost = boost178.override { inherit stdenv; };
fmt = fmt_8.override { inherit stdenv; };
nanodbc_llvm = nanodbc.override { inherit stdenv; };
avro-cpp_llvm = avro-cpp.override { inherit stdenv boost; };
Expand Down