irods: init at 4.2.0

+160
+57
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 + 5 + with stdenv; 6 + 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 + propagateBuildInputs = [ boost ]; 13 + 14 + cmakeFlags = [ 15 + "-DIRODS_EXTERNALS_FULLPATH_CLANG=${stdenv.cc}" 16 + "-DIRODS_EXTERNALS_FULLPATH_CLANG_RUNTIME=${stdenv.cc}" 17 + "-DIRODS_EXTERNALS_FULLPATH_ARCHIVE=${libarchive.lib}" 18 + "-DIRODS_EXTERNALS_FULLPATH_AVRO=${avro-cpp}" 19 + "-DIRODS_EXTERNALS_FULLPATH_BOOST=${boost}" 20 + "-DIRODS_EXTERNALS_FULLPATH_JANSSON=${jansson}" 21 + "-DIRODS_EXTERNALS_FULLPATH_ZMQ=${zeromq}" 22 + "-DIRODS_EXTERNALS_FULLPATH_CPPZMQ=${cppzmq}" 23 + "-DIRODS_LINUX_DISTRIBUTION_NAME=nix" 24 + "-DIRODS_LINUX_DISTRIBUTION_VERSION_MAJOR=${builtins.nixVersion}" 25 + "-DCPACK_GENERATOR=TGZ" 26 + "-DCMAKE_CXX_FLAGS=-I${libcxx}/include/c++/v1" 27 + ]; 28 + 29 + preConfigure = '' 30 + patchShebangs ./packaging 31 + patchShebangs ./scripts 32 + substituteInPlace CMakeLists.txt --replace "DESTINATION usr/bin" "DESTINATION bin" 33 + substituteInPlace CMakeLists.txt --replace "INCLUDE_DIRS usr/include/" "INCLUDE_DIRS include/" 34 + substituteInPlace CMakeLists.txt --replace "DESTINATION usr/lib/" "DESTINATION lib/" 35 + export cmakeFlags="$cmakeFlags 36 + -DCMAKE_INSTALL_PREFIX=$out 37 + " 38 + ''; 39 + 40 + meta = { 41 + description = "Integrated Rule-Oriented Data System (iRODS)"; 42 + longDescription = '' 43 + The Integrated Rule-Oriented Data System (iRODS) is open source data management 44 + software used by research organizations and government agencies worldwide. 45 + iRODS is released as a production-level distribution aimed at deployment in mission 46 + critical environments. It virtualizes data storage resources, so users can take 47 + control of their data, regardless of where and on what device the data is stored. 48 + As data volumes grow and data services become more complex, iRODS is increasingly 49 + important in data management. The development infrastructure supports exhaustive 50 + testing on supported platforms; plug-in support for microservices, storage resources, 51 + drivers, and databases; and extensive documentation, training and support services.''; 52 + homepage = http://irods.org; 53 + license = stdenv.lib.licenses.bsd3; 54 + maintainers = [ stdenv.lib.maintainers.bzizou ]; 55 + platforms = stdenv.lib.platforms.all; 56 + }; 57 + }
+84
pkgs/tools/filesystems/irods/default.nix
··· 1 + { stdenv, fetchurl, python, 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 + with stdenv; 4 + 5 + let 6 + common = import ./common.nix { 7 + inherit stdenv bzip2 zlib autoconf automake cmake gnumake 8 + help2man texinfo libtool cppzmq libarchive jansson 9 + zeromq openssl pam libiodbc kerberos gcc libcxx 10 + boost avro-cpp which; 11 + }; 12 + in rec { 13 + 14 + # irods: libs and server package 15 + irods = stdenv.mkDerivation (common // rec { 16 + version = "4.2.0"; 17 + prefix = "irods"; 18 + name = "${prefix}-${version}"; 19 + 20 + src = fetchurl { 21 + url = "https://github.com/irods/irods/releases/download/${version}/irods-${version}.tar.gz"; 22 + sha256 = "b5c0d7209219629da139058ce462a237ecc22ad4dae613413a428961e4ff9d3e"; 23 + }; 24 + 25 + # Patches: 26 + # irods_root_path.patch : the root path is obtained by stripping 3 items of the path, 27 + # but we don't use /usr with nix, so remove only 2 items. 28 + patches = [ ./irods_root_path.patch ]; 29 + 30 + preConfigure = common.preConfigure + '' 31 + patchShebangs ./test 32 + substituteInPlace plugins/database/CMakeLists.txt --replace "COMMAND cpp" "COMMAND ${gcc.cc}/bin/cpp" 33 + substituteInPlace cmake/server.cmake --replace "DESTINATION usr/sbin" "DESTINATION sbin" 34 + substituteInPlace cmake/server.cmake --replace "IRODS_DOC_DIR usr/share" "IRODS_DOC_DIR share" 35 + substituteInPlace cmake/runtime_library.cmake --replace "DESTINATION usr/lib" "DESTINATION lib" 36 + substituteInPlace cmake/development_library.cmake --replace "DESTINATION usr/lib" "DESTINATION lib" 37 + substituteInPlace cmake/development_library.cmake --replace "DESTINATION usr/include" "DESTINATION include" 38 + export cmakeFlags="$cmakeFlags 39 + -DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath,$out/lib 40 + -DCMAKE_MODULE_LINKER_FLAGS=-Wl,-rpath,$out/lib 41 + -DCMAKE_SHARED_LINKER_FLAGS=-Wl,-rpath,$out/lib 42 + " 43 + ''; 44 + 45 + meta = common.meta // { 46 + longDescription = common.meta.longDescription + '' 47 + This package provides the servers and libraries.''; 48 + }; 49 + }); 50 + 51 + 52 + # icommands (CLI) package, depends on the irods package 53 + irods-icommands = stdenv.mkDerivation (common // rec { 54 + version = "4.2.0"; 55 + name = "irods-icommands-${version}"; 56 + src = fetchurl { 57 + url = "http://github.com/irods/irods_client_icommands/archive/${version}.tar.gz"; 58 + sha256 = "b581067c8139b5ef7897f15fc1fc79f69d2e784a0f36d96e8fa3cb260b6378ce"; 59 + }; 60 + 61 + buildInputs = common.buildInputs ++ [ irods ]; 62 + 63 + propagateBuildInputs = [ boost ]; 64 + 65 + preConfigure = common.preConfigure + '' 66 + patchShebangs ./bin 67 + ''; 68 + 69 + cmakeFlags = common.cmakeFlags ++ [ 70 + "-DCMAKE_INSTALL_PREFIX=${out}" 71 + "-DIRODS_DIR=${irods}/lib/irods/cmake" 72 + "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath,${irods}/lib" 73 + "-DCMAKE_MODULE_LINKER_FLAGS=-Wl,-rpath,${irods}/lib" 74 + "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-rpath,${irods}/lib" 75 + ]; 76 + 77 + meta = common.meta // { 78 + description = common.meta.description + " CLI clients"; 79 + longDescription = common.meta.longDescription + '' 80 + This package provides the CLI clients, called 'icommands'.''; 81 + }; 82 + }); 83 + } 84 +
+11
pkgs/tools/filesystems/irods/irods_root_path.patch
··· 1 + --- a/lib/core/src/irods_default_paths.cpp 2016-10-24 17:09:02.955889536 +0200 2 + +++ b/lib/core/src/irods_default_paths.cpp 2016-10-24 17:09:43.178722157 +0200 3 + @@ -18,7 +18,7 @@ 4 + try { 5 + boost::filesystem::path path{dl_info.dli_fname}; 6 + path = boost::filesystem::canonical(path); 7 + - 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 8 + + path.remove_filename().remove_filename(); // Removes filename and the two directories (usr and lib) between libirods_common.so and base of irods install 9 + return path; 10 + } catch(const boost::filesystem::filesystem_error& e) { 11 + THROW(-1, e.what());
+8
pkgs/top-level/all-packages.nix
··· 2203 2203 2204 2204 ifuse = callPackage ../tools/filesystems/ifuse/default.nix { }; 2205 2205 2206 + inherit (callPackages ../tools/filesystems/irods rec { 2207 + stdenv = llvmPackages_38.libcxxStdenv; 2208 + libcxx = llvmPackages_38.libcxx; 2209 + boost = boost160.override { inherit stdenv; }; 2210 + }) 2211 + irods 2212 + irods-icommands; 2213 + 2206 2214 ignition = recurseIntoAttrs { 2207 2215 2208 2216 math = callPackage ../development/libraries/ignition-math { };