irods: 4.2.2 -> 4.2.7 + fixed + use fetchFromGitHub

authored by Bruno Bzeznik and committed by Frederik Rietdijk afe6e1c4 ccfe14cb

+48 -16
+3 -2
pkgs/tools/filesystems/irods/common.nix
··· 1 - { stdenv, bzip2, zlib, autoconf, automake, cmake, gnumake, help2man , texinfo, libtool , cppzmq , libarchive, avro-cpp, boost, jansson, zeromq, openssl, pam, libiodbc, kerberos, gcc, libcxx, which }: 2 3 # Common attributes of irods packages 4 ··· 7 { 8 enableParallelBuilding = true; 9 10 - buildInputs = [ bzip2 zlib autoconf automake cmake gnumake help2man texinfo libtool cppzmq libarchive avro-cpp jansson zeromq openssl pam libiodbc kerberos gcc boost libcxx which ]; 11 12 cmakeFlags = [ 13 "-DIRODS_EXTERNALS_FULLPATH_CLANG=${stdenv.cc}" ··· 18 "-DIRODS_EXTERNALS_FULLPATH_JANSSON=${jansson}" 19 "-DIRODS_EXTERNALS_FULLPATH_ZMQ=${zeromq}" 20 "-DIRODS_EXTERNALS_FULLPATH_CPPZMQ=${cppzmq}" 21 "-DIRODS_LINUX_DISTRIBUTION_NAME=nix" 22 "-DIRODS_LINUX_DISTRIBUTION_VERSION_MAJOR=${builtins.nixVersion}" 23 "-DCPACK_GENERATOR=TGZ"
··· 1 + { stdenv, bzip2, zlib, autoconf, automake, cmake, gnumake, help2man , texinfo, libtool , cppzmq , libarchive, avro-cpp, boost, jansson, zeromq, openssl, pam, libiodbc, kerberos, gcc, libcxx, which, catch2 }: 2 3 # Common attributes of irods packages 4 ··· 7 { 8 enableParallelBuilding = true; 9 10 + buildInputs = [ bzip2 zlib autoconf automake cmake gnumake help2man texinfo libtool cppzmq libarchive avro-cpp jansson zeromq openssl pam libiodbc kerberos gcc boost libcxx which catch2 ]; 11 12 cmakeFlags = [ 13 "-DIRODS_EXTERNALS_FULLPATH_CLANG=${stdenv.cc}" ··· 18 "-DIRODS_EXTERNALS_FULLPATH_JANSSON=${jansson}" 19 "-DIRODS_EXTERNALS_FULLPATH_ZMQ=${zeromq}" 20 "-DIRODS_EXTERNALS_FULLPATH_CPPZMQ=${cppzmq}" 21 + "-DIRODS_EXTERNALS_FULLPATH_CATCH2=${catch2}" 22 "-DIRODS_LINUX_DISTRIBUTION_NAME=nix" 23 "-DIRODS_LINUX_DISTRIBUTION_VERSION_MAJOR=${builtins.nixVersion}" 24 "-DCPACK_GENERATOR=TGZ"
+24 -14
pkgs/tools/filesystems/irods/default.nix
··· 1 - { stdenv, fetchurl, bzip2, zlib, autoconf, automake, cmake, gnumake, help2man , texinfo, libtool , cppzmq , libarchive, avro-cpp_llvm, boost, jansson, zeromq, openssl , pam, libiodbc, kerberos, gcc, libcxx, which }: 2 3 with stdenv; 4 ··· 10 inherit stdenv bzip2 zlib autoconf automake cmake gnumake 11 help2man texinfo libtool cppzmq libarchive jansson 12 zeromq openssl pam libiodbc kerberos gcc libcxx 13 - boost avro-cpp which; 14 }; 15 in rec { 16 17 # irods: libs and server package 18 irods = stdenv.mkDerivation (common // rec { 19 - version = "4.2.2"; 20 - prefix = "irods"; 21 - name = "${prefix}-${version}"; 22 23 - src = fetchurl { 24 - url = "https://github.com/irods/irods/releases/download/${version}/irods-${version}.tar.gz"; 25 - sha256 = "0b89hs7sizwrs2ja7jl521byiwb58g297p0p7zg5frxmv4ig8dw7"; 26 }; 27 28 # Patches: ··· 41 substituteInPlace cmake/runtime_library.cmake --replace "DESTINATION usr/lib" "DESTINATION lib" 42 substituteInPlace cmake/development_library.cmake --replace "DESTINATION usr/lib" "DESTINATION lib" 43 substituteInPlace cmake/development_library.cmake --replace "DESTINATION usr/include" "DESTINATION include" 44 export cmakeFlags="$cmakeFlags 45 -DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath,$out/lib 46 -DCMAKE_MODULE_LINKER_FLAGS=-Wl,-rpath,$out/lib ··· 59 60 # icommands (CLI) package, depends on the irods package 61 irods-icommands = stdenv.mkDerivation (common // rec { 62 - version = "4.2.2"; 63 - name = "irods-icommands-${version}"; 64 - src = fetchurl { 65 - url = "https://github.com/irods/irods_client_icommands/archive/${version}.tar.gz"; 66 - sha256 = "15zcxrx0q5c3rli3snd0b2q4i0hs3zzcrbpnibbhsip855qvs77h"; 67 }; 68 69 buildInputs = common.buildInputs ++ [ irods ]; 70 ··· 84 description = common.meta.description + " CLI clients"; 85 longDescription = common.meta.longDescription + '' 86 This package provides the CLI clients, called 'icommands'.''; 87 - broken = true; 88 }; 89 }); 90 }
··· 1 + { 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 }: 2 3 with stdenv; 4 ··· 10 inherit stdenv bzip2 zlib autoconf automake cmake gnumake 11 help2man texinfo libtool cppzmq libarchive jansson 12 zeromq openssl pam libiodbc kerberos gcc libcxx 13 + boost avro-cpp which catch2; 14 }; 15 in rec { 16 17 # irods: libs and server package 18 irods = stdenv.mkDerivation (common // rec { 19 + version = "4.2.7"; 20 + pname = "irods"; 21 22 + src = fetchFromGitHub { 23 + owner = "irods"; 24 + repo = "irods"; 25 + rev = version; 26 + sha256 = "1pd4l42z4igzf0l8xbp7yz0nhzsv47ziv5qj8q1hh6pfhmwlzp9s"; 27 + fetchSubmodules = true; 28 }; 29 30 # Patches: ··· 43 substituteInPlace cmake/runtime_library.cmake --replace "DESTINATION usr/lib" "DESTINATION lib" 44 substituteInPlace cmake/development_library.cmake --replace "DESTINATION usr/lib" "DESTINATION lib" 45 substituteInPlace cmake/development_library.cmake --replace "DESTINATION usr/include" "DESTINATION include" 46 + for file in unit_tests/cmake/test_config/*.cmake 47 + do 48 + substituteInPlace $file --replace "CATCH2}/include" "CATCH2}/include/catch2" 49 + done 50 export cmakeFlags="$cmakeFlags 51 -DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath,$out/lib 52 -DCMAKE_MODULE_LINKER_FLAGS=-Wl,-rpath,$out/lib ··· 65 66 # icommands (CLI) package, depends on the irods package 67 irods-icommands = stdenv.mkDerivation (common // rec { 68 + version = "4.2.7"; 69 + pname = "irods-icommands"; 70 + 71 + src = fetchFromGitHub { 72 + owner = "irods"; 73 + repo = "irods_client_icommands"; 74 + rev = version; 75 + sha256 = "08hqrc9iaw0y9rrrcknnl5mzbcrsvqc39pwvm62fipl3vnfqryli"; 76 }; 77 + 78 + patches = [ ./zmqcpp-deprecated-send_recv.patch ]; 79 80 buildInputs = common.buildInputs ++ [ irods ]; 81 ··· 95 description = common.meta.description + " CLI clients"; 96 longDescription = common.meta.longDescription + '' 97 This package provides the CLI clients, called 'icommands'.''; 98 }; 99 }); 100 }
+21
pkgs/tools/filesystems/irods/zmqcpp-deprecated-send_recv.patch
···
··· 1 + diff -r -u source/src/irods-grid.cpp source.new/src/irods-grid.cpp 2 + --- source/src/irods-grid.cpp 1970-01-01 01:00:01.000000000 +0100 3 + +++ source.new/src/irods-grid.cpp 2020-05-05 16:34:35.566464346 +0200 4 + @@ -412,7 +412,7 @@ 5 + data_to_send.data(), 6 + data_to_send.size() ); 7 + try { 8 + - if (!zmq_skt.send(req)) { 9 + + if (!zmq_skt.send( req, zmq::send_flags::dontwait )) { 10 + std::cerr << "ZeroMQ encountered an error sending a message.\n"; 11 + return errno; 12 + } 13 + @@ -426,7 +426,7 @@ 14 + zmq::message_t rep; 15 + // wait for the server reponse 16 + try { 17 + - if (!zmq_skt.recv( &rep )) { 18 + + if (!zmq_skt.recv( rep, zmq::recv_flags::dontwait )) { 19 + std::cerr << "ZeroMQ encountered an error receiving a message.\n"; 20 + return errno; 21 + }