irods: 4.2.2 -> 4.2.7 + fixed + use fetchFromGitHub

gstqt5
Bruno Bzeznik 2020-05-05 17:33:21 +02:00 committed by Frederik Rietdijk
parent ccfe14cb3b
commit afe6e1c4ea
3 changed files with 48 additions and 16 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, bzip2, zlib, autoconf, automake, cmake, gnumake, help2man , texinfo, libtool , cppzmq , libarchive, avro-cpp, boost, jansson, zeromq, openssl, pam, libiodbc, kerberos, gcc, libcxx, which }:
{ 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 }:
# Common attributes of irods packages
@ -7,7 +7,7 @@ with stdenv;
{
enableParallelBuilding = true;
buildInputs = [ bzip2 zlib autoconf automake cmake gnumake help2man texinfo libtool cppzmq libarchive avro-cpp jansson zeromq openssl pam libiodbc kerberos gcc boost libcxx which ];
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 ];
cmakeFlags = [
"-DIRODS_EXTERNALS_FULLPATH_CLANG=${stdenv.cc}"
@ -18,6 +18,7 @@ with stdenv;
"-DIRODS_EXTERNALS_FULLPATH_JANSSON=${jansson}"
"-DIRODS_EXTERNALS_FULLPATH_ZMQ=${zeromq}"
"-DIRODS_EXTERNALS_FULLPATH_CPPZMQ=${cppzmq}"
"-DIRODS_EXTERNALS_FULLPATH_CATCH2=${catch2}"
"-DIRODS_LINUX_DISTRIBUTION_NAME=nix"
"-DIRODS_LINUX_DISTRIBUTION_VERSION_MAJOR=${builtins.nixVersion}"
"-DCPACK_GENERATOR=TGZ"

View File

@ -1,4 +1,4 @@
{ 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 }:
{ 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 }:
with stdenv;
@ -10,19 +10,21 @@ let
inherit stdenv bzip2 zlib autoconf automake cmake gnumake
help2man texinfo libtool cppzmq libarchive jansson
zeromq openssl pam libiodbc kerberos gcc libcxx
boost avro-cpp which;
boost avro-cpp which catch2;
};
in rec {
# irods: libs and server package
irods = stdenv.mkDerivation (common // rec {
version = "4.2.2";
prefix = "irods";
name = "${prefix}-${version}";
version = "4.2.7";
pname = "irods";
src = fetchurl {
url = "https://github.com/irods/irods/releases/download/${version}/irods-${version}.tar.gz";
sha256 = "0b89hs7sizwrs2ja7jl521byiwb58g297p0p7zg5frxmv4ig8dw7";
src = fetchFromGitHub {
owner = "irods";
repo = "irods";
rev = version;
sha256 = "1pd4l42z4igzf0l8xbp7yz0nhzsv47ziv5qj8q1hh6pfhmwlzp9s";
fetchSubmodules = true;
};
# Patches:
@ -41,6 +43,10 @@ in rec {
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"
done
export cmakeFlags="$cmakeFlags
-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath,$out/lib
-DCMAKE_MODULE_LINKER_FLAGS=-Wl,-rpath,$out/lib
@ -59,13 +65,18 @@ in rec {
# icommands (CLI) package, depends on the irods package
irods-icommands = stdenv.mkDerivation (common // rec {
version = "4.2.2";
name = "irods-icommands-${version}";
src = fetchurl {
url = "https://github.com/irods/irods_client_icommands/archive/${version}.tar.gz";
sha256 = "15zcxrx0q5c3rli3snd0b2q4i0hs3zzcrbpnibbhsip855qvs77h";
version = "4.2.7";
pname = "irods-icommands";
src = fetchFromGitHub {
owner = "irods";
repo = "irods_client_icommands";
rev = version;
sha256 = "08hqrc9iaw0y9rrrcknnl5mzbcrsvqc39pwvm62fipl3vnfqryli";
};
patches = [ ./zmqcpp-deprecated-send_recv.patch ];
buildInputs = common.buildInputs ++ [ irods ];
preConfigure = common.preConfigure + ''
@ -84,7 +95,6 @@ in rec {
description = common.meta.description + " CLI clients";
longDescription = common.meta.longDescription + ''
This package provides the CLI clients, called 'icommands'.'';
broken = true;
};
});
}

View File

@ -0,0 +1,21 @@
diff -r -u source/src/irods-grid.cpp source.new/src/irods-grid.cpp
--- source/src/irods-grid.cpp 1970-01-01 01:00:01.000000000 +0100
+++ source.new/src/irods-grid.cpp 2020-05-05 16:34:35.566464346 +0200
@@ -412,7 +412,7 @@
data_to_send.data(),
data_to_send.size() );
try {
- if (!zmq_skt.send(req)) {
+ if (!zmq_skt.send( req, zmq::send_flags::dontwait )) {
std::cerr << "ZeroMQ encountered an error sending a message.\n";
return errno;
}
@@ -426,7 +426,7 @@
zmq::message_t rep;
// wait for the server reponse
try {
- if (!zmq_skt.recv( &rep )) {
+ if (!zmq_skt.recv( rep, zmq::recv_flags::dontwait )) {
std::cerr << "ZeroMQ encountered an error receiving a message.\n";
return errno;
}