1{ lib, stdenv, bzip2, zlib, autoconf, automake, cmake, help2man, texinfo, libtool, cppzmq, libarchive
2, avro-cpp, boost, jansson, zeromq, openssl, pam, libiodbc, libkrb5, gcc, libcxx, which, catch2, nanodbc, fmt
3, nlohmann_json, spdlog }:
4
5# Common attributes of irods packages
6
7{
8 nativeBuildInputs = [ autoconf automake cmake help2man texinfo which gcc ];
9 buildInputs = [ bzip2 zlib libtool cppzmq libarchive avro-cpp jansson zeromq openssl pam libiodbc libkrb5 boost
10 libcxx catch2 nanodbc fmt nlohmann_json spdlog ];
11
12 cmakeFlags = [
13 "-DIRODS_EXTERNALS_FULLPATH_CLANG=${stdenv.cc}"
14 "-DIRODS_EXTERNALS_FULLPATH_CLANG_RUNTIME=${stdenv.cc}"
15 "-DIRODS_EXTERNALS_FULLPATH_ARCHIVE=${libarchive.lib}"
16 "-DIRODS_EXTERNALS_FULLPATH_AVRO=${avro-cpp}"
17 "-DIRODS_EXTERNALS_FULLPATH_BOOST=${boost}"
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_EXTERNALS_FULLPATH_NANODBC=${nanodbc}"
23 "-DIRODS_EXTERNALS_FULLPATH_FMT=${fmt}"
24 "-DIRODS_EXTERNALS_FULLPATH_JSON=${nlohmann_json}"
25 "-DIRODS_EXTERNALS_FULLPATH_SPDLOG=${spdlog}"
26 "-DIRODS_LINUX_DISTRIBUTION_NAME=nix"
27 "-DIRODS_LINUX_DISTRIBUTION_VERSION_MAJOR=1.0"
28 "-DCPACK_GENERATOR=TGZ"
29 "-DCMAKE_CXX_FLAGS=-I${lib.getDev libcxx}/include/c++/v1"
30 ];
31
32 postPatch = ''
33 patchShebangs ./packaging ./scripts
34 substituteInPlace CMakeLists.txt \
35 --replace "DESTINATION usr/bin" "DESTINATION bin" \
36 --replace "INCLUDE_DIRS usr/include/" "INCLUDE_DIRS include/" \
37 --replace "DESTINATION usr/lib/" "DESTINATION lib/" \
38 --replace "{IRODS_EXTERNALS_FULLPATH_JSON}/include" "{IRODS_EXTERNALS_FULLPATH_JSON}/include/nlohmann"
39 export cmakeFlags="$cmakeFlags
40 -DCMAKE_INSTALL_PREFIX=$out
41 "
42 '';
43
44 meta = with lib; {
45 description = "Integrated Rule-Oriented Data System (iRODS)";
46 longDescription = ''
47 The Integrated Rule-Oriented Data System (iRODS) is open source data management
48 software used by research organizations and government agencies worldwide.
49 iRODS is released as a production-level distribution aimed at deployment in mission
50 critical environments. It virtualizes data storage resources, so users can take
51 control of their data, regardless of where and on what device the data is stored.
52 As data volumes grow and data services become more complex, iRODS is increasingly
53 important in data management. The development infrastructure supports exhaustive
54 testing on supported platforms; plug-in support for microservices, storage resources,
55 drivers, and databases; and extensive documentation, training and support services.'';
56 homepage = "https://irods.org";
57 license = lib.licenses.bsd3;
58 maintainers = [ lib.maintainers.bzizou ];
59 platforms = lib.platforms.linux;
60 };
61}