diff --git a/pkgs/tools/filesystems/irods/common.nix b/pkgs/tools/filesystems/irods/common.nix index fa80e024e3db..a7fdf9e2fb25 100644 --- a/pkgs/tools/filesystems/irods/common.nix +++ b/pkgs/tools/filesystems/irods/common.nix @@ -1,10 +1,13 @@ -{ lib, stdenv, bzip2, zlib, autoconf, automake, cmake, gnumake, help2man , texinfo, libtool , cppzmq , libarchive, avro-cpp, boost, jansson, zeromq, openssl, pam, libiodbc, libkrb5, gcc, libcxx, which, catch2 }: +{ lib, stdenv, bzip2, zlib, autoconf, automake, cmake, gnumake, help2man, texinfo, libtool, cppzmq, libarchive +, avro-cpp, boost, jansson, zeromq, openssl, pam, libiodbc, libkrb5, gcc, libcxx, which, catch2, nanodbc, fmt +, nlohmann_json, spdlog }: # Common attributes of irods packages { nativeBuildInputs = [ autoconf automake cmake gnumake help2man texinfo which gcc ]; - buildInputs = [ bzip2 zlib libtool cppzmq libarchive avro-cpp jansson zeromq openssl pam libiodbc libkrb5 boost libcxx catch2 ]; + buildInputs = [ bzip2 zlib libtool cppzmq libarchive avro-cpp jansson zeromq openssl pam libiodbc libkrb5 boost + libcxx catch2 nanodbc fmt nlohmann_json spdlog ]; cmakeFlags = [ "-DIRODS_EXTERNALS_FULLPATH_CLANG=${stdenv.cc}" @@ -16,18 +19,23 @@ "-DIRODS_EXTERNALS_FULLPATH_ZMQ=${zeromq}" "-DIRODS_EXTERNALS_FULLPATH_CPPZMQ=${cppzmq}" "-DIRODS_EXTERNALS_FULLPATH_CATCH2=${catch2}" + "-DIRODS_EXTERNALS_FULLPATH_NANODBC=${nanodbc}" + "-DIRODS_EXTERNALS_FULLPATH_FMT=${fmt}" + "-DIRODS_EXTERNALS_FULLPATH_JSON=${nlohmann_json}" + "-DIRODS_EXTERNALS_FULLPATH_SPDLOG=${spdlog}" "-DIRODS_LINUX_DISTRIBUTION_NAME=nix" "-DIRODS_LINUX_DISTRIBUTION_VERSION_MAJOR=1.0" "-DCPACK_GENERATOR=TGZ" "-DCMAKE_CXX_FLAGS=-I${lib.getDev libcxx}/include/c++/v1" ]; - preConfigure = '' - patchShebangs ./packaging - patchShebangs ./scripts - substituteInPlace CMakeLists.txt --replace "DESTINATION usr/bin" "DESTINATION bin" - substituteInPlace CMakeLists.txt --replace "INCLUDE_DIRS usr/include/" "INCLUDE_DIRS include/" - substituteInPlace CMakeLists.txt --replace "DESTINATION usr/lib/" "DESTINATION lib/" + 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 " diff --git a/pkgs/tools/filesystems/irods/default.nix b/pkgs/tools/filesystems/irods/default.nix index cbc9f19c664a..7931911b65f3 100644 --- a/pkgs/tools/filesystems/irods/default.nix +++ b/pkgs/tools/filesystems/irods/default.nix @@ -1,27 +1,32 @@ -{ lib, stdenv, fetchFromGitHub, bzip2, zlib, autoconf, automake, cmake, gnumake, help2man , texinfo, libtool , cppzmq , libarchive, avro-cpp_llvm, boost, jansson, zeromq, openssl , pam, libiodbc, libkrb5, gcc, libcxx, which, catch2 }: +{ lib, stdenv, fetchFromGitHub, bzip2, zlib, autoconf, automake, cmake, gnumake, 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 }: let - avro-cpp=avro-cpp_llvm; + avro-cpp = avro-cpp_llvm; + nanodbc = nanodbc_llvm; in let common = import ./common.nix { inherit lib stdenv bzip2 zlib autoconf automake cmake gnumake - help2man texinfo libtool cppzmq libarchive jansson - zeromq openssl pam libiodbc libkrb5 gcc libcxx - boost avro-cpp which catch2; + help2man texinfo libtool cppzmq libarchive jansson + zeromq openssl pam libiodbc libkrb5 gcc libcxx + boost avro-cpp which catch2 nanodbc fmt nlohmann_json + spdlog; }; -in rec { +in +rec { # irods: libs and server package irods = stdenv.mkDerivation (common // rec { - version = "4.2.7"; + version = "4.2.11"; pname = "irods"; src = fetchFromGitHub { owner = "irods"; repo = "irods"; rev = version; - sha256 = "1pd4l42z4igzf0l8xbp7yz0nhzsv47ziv5qj8q1hh6pfhmwlzp9s"; + sha256 = "0prcsiddk8n3h515jjapgfz1d6hjqywhrkcf6giqd7xc7b0slz44"; fetchSubmodules = true; }; @@ -33,7 +38,7 @@ in rec { # fix build with recent llvm versions NIX_CFLAGS_COMPILE = "-Wno-deprecated-register -Wno-deprecated-declarations"; - preConfigure = common.preConfigure + '' + 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" @@ -62,36 +67,36 @@ in rec { # icommands (CLI) package, depends on the irods package irods-icommands = stdenv.mkDerivation (common // rec { - version = "4.2.7"; - pname = "irods-icommands"; + version = "4.2.11"; + pname = "irods-icommands"; - src = fetchFromGitHub { - owner = "irods"; - repo = "irods_client_icommands"; - rev = version; - sha256 = "08hqrc9iaw0y9rrrcknnl5mzbcrsvqc39pwvm62fipl3vnfqryli"; - }; + src = fetchFromGitHub { + owner = "irods"; + repo = "irods_client_icommands"; + rev = version; + sha256 = "0wgs585j2lp820py2pbizsk54xgz5id96fhxwwk9lqhbzxhfjhcg"; + }; - patches = [ ./zmqcpp-deprecated-send_recv.patch ]; + patches = [ ./zmqcpp-deprecated-send_recv.patch ]; - buildInputs = common.buildInputs ++ [ irods ]; + buildInputs = common.buildInputs ++ [ irods ]; - preConfigure = common.preConfigure + '' - patchShebangs ./bin - ''; + 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" + 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" ]; - meta = common.meta // { - description = common.meta.description + " CLI clients"; - longDescription = common.meta.longDescription + "This package provides the CLI clients, called 'icommands'."; - }; + meta = common.meta // { + description = common.meta.description + " CLI clients"; + longDescription = common.meta.longDescription + "This package provides the CLI clients, called 'icommands'."; + }; }); } diff --git a/pkgs/tools/filesystems/irods/irods_root_path.patch b/pkgs/tools/filesystems/irods/irods_root_path.patch index 16b6ba08cbb2..58e618c663c0 100644 --- a/pkgs/tools/filesystems/irods/irods_root_path.patch +++ b/pkgs/tools/filesystems/irods/irods_root_path.patch @@ -1,25 +1,3 @@ -diff -r -u irods-4.2.0.orig/lib/core/src/irods_default_paths.cpp irods-4.2.0/lib/core/src/irods_default_paths.cpp ---- irods-4.2.0.orig/lib/core/src/irods_default_paths.cpp 2016-11-15 06:23:55.000000000 +0000 -+++ irods-4.2.0/lib/core/src/irods_default_paths.cpp 2016-12-20 18:03:17.156883399 +0000 -@@ -18,7 +18,7 @@ - try { - boost::filesystem::path path{dl_info.dli_fname}; - path = boost::filesystem::canonical(path); -- path.remove_filename().remove_filename().remove_filename(); // Removes filename and the two directories (usr and lib) between libirods_common.so and base of irods install -+ path.remove_filename().remove_filename(); // Removes filename and the two directories (usr and lib) between libirods_common.so and base of irods install - return path; - } catch(const boost::filesystem::filesystem_error& e) { - THROW(-1, e.what()); -@@ -27,8 +27,7 @@ - - boost::filesystem::path - get_irods_config_directory() { -- boost::filesystem::path path{get_irods_root_directory()}; -- path.append("etc").append("irods"); -+ boost::filesystem::path path("/etc/irods"); - return path; - } - diff -r -u irods-4.2.0.orig/scripts/irods/paths.py irods-4.2.0/scripts/irods/paths.py --- irods-4.2.0.orig/scripts/irods/paths.py 2016-11-15 06:23:55.000000000 +0000 +++ irods-4.2.0/scripts/irods/paths.py 2016-12-21 15:17:07.437864606 +0000 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3a92b35031fc..2b749d79ee25 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6609,13 +6609,15 @@ with pkgs; }; inherit (callPackages ../tools/filesystems/irods rec { - stdenv = llvmPackages.libcxxStdenv; - libcxx = llvmPackages.libcxx; - boost = boost160.override { inherit stdenv; }; - avro-cpp_llvm = avro-cpp.override { inherit stdenv boost; }; - }) - irods - irods-icommands; + stdenv = llvmPackages.libcxxStdenv; + libcxx = llvmPackages.libcxx; + boost = boost17x.override { inherit stdenv; }; + fmt = fmt_8.override { inherit stdenv; }; + nanodbc_llvm = nanodbc.override { inherit stdenv; }; + avro-cpp_llvm = avro-cpp.override { inherit stdenv boost; }; + }) + irods + irods-icommands; ignite = callPackage ../applications/virtualization/ignite { };