diff --git a/pkgs/by-name/ir/irods-icommands/package.nix b/pkgs/by-name/ir/irods-icommands/package.nix new file mode 100644 index 0000000000000..fd92911ec6a0b --- /dev/null +++ b/pkgs/by-name/ir/irods-icommands/package.nix @@ -0,0 +1,48 @@ +{ + lib, + llvmPackages, + fetchFromGitHub, + cmake, + ninja, + help2man, + irods, +}: + +llvmPackages.stdenv.mkDerivation (finalAttrs: { + pname = "irods-icommands"; + inherit (irods) version; + + src = fetchFromGitHub { + owner = "irods"; + repo = "irods_client_icommands"; + tag = finalAttrs.version; + hash = "sha256-lo1eCI/CSzl7BJWdPo7KKVHfznkPN6GwsiQThUGuQdw="; + }; + + nativeBuildInputs = [ + cmake + ninja + help2man + ]; + + buildInputs = [ irods ]; + + cmakeFlags = irods.commonCmakeFlags ++ [ + (lib.cmakeFeature "ICOMMANDS_INSTALL_DIRECTORY" "${placeholder "out"}/bin") + (lib.cmakeBool "ICOMMANDS_INSTALL_SYMLINKS" false) + ]; + + meta = { + inherit (irods.meta) + homepage + license + maintainers + platforms + ; + description = irods.meta.description + " CLI clients"; + longDescription = irods.meta.longDescription + '' + + This package provides the CLI clients, called 'icommands'. + ''; + }; +}) diff --git a/pkgs/by-name/ir/irods/package.nix b/pkgs/by-name/ir/irods/package.nix new file mode 100644 index 0000000000000..98b823f54f77d --- /dev/null +++ b/pkgs/by-name/ir/irods/package.nix @@ -0,0 +1,115 @@ +{ + lib, + llvmPackages, + fetchFromGitHub, + cmake, + ninja, + bison, + flex, + libarchive, + pam, + unixODBC, + jsoncons, + curl, + systemdLibs, + openssl, + boost183, + nlohmann_json, + nanodbc, + fmt_9, + spdlog, +}: + +llvmPackages.stdenv.mkDerivation (finalAttrs: { + pname = "irods"; + version = "5.0.1"; + + src = fetchFromGitHub { + owner = "irods"; + repo = "irods"; + tag = finalAttrs.version; + hash = "sha256-/mcuqukgDoMc89FL/TfOhHWglsfdLmQbAnQYT8vTFsY="; + }; + + nativeBuildInputs = [ + cmake + ninja + bison + flex + ]; + + buildInputs = [ + libarchive + pam + unixODBC + jsoncons + curl + systemdLibs + ]; + + propagatedBuildInputs = [ + openssl + # Can potentially be unpinned after: + # + boost183 + nlohmann_json + nanodbc + # Tracking issue for `fmt_11`: + # + fmt_9 + (spdlog.override { + fmt = fmt_9; + }) + ]; + + cmakeFlags = finalAttrs.passthru.commonCmakeFlags ++ [ + # Tracking issues for moving these to `find_package`: + # * + # * + (lib.cmakeFeature "IRODS_EXTERNALS_FULLPATH_BOOST" "${boost183}") + (lib.cmakeFeature "IRODS_EXTERNALS_FULLPATH_NANODBC" "${nanodbc}") + (lib.cmakeFeature "IRODS_EXTERNALS_FULLPATH_JSONCONS" "${jsoncons}") + ]; + + postPatch = '' + patchShebangs ./test + substituteInPlace plugins/database/CMakeLists.txt --replace-fail \ + 'COMMAND cpp -E -P -D''${plugin} "''${CMAKE_CURRENT_BINARY_DIR}/src/icatSysTables.sql.pp" ' \ + 'COMMAND cpp -E -P -D''${plugin} "''${CMAKE_CURRENT_BINARY_DIR}/src/icatSysTables.sql.pp" -o ' + substituteInPlace server/auth/CMakeLists.txt --replace-fail SETUID "" + ''; + + passthru = { + commonCmakeFlags = [ + # We already use Clang in the `stdenv`. + (lib.cmakeBool "IRODS_BUILD_WITH_CLANG" false) + # Upstream builds with LLVM 16 and doesn’t handle newer warnings. + (lib.cmakeBool "IRODS_BUILD_WITH_WERROR" false) + (lib.cmakeFeature "IRODS_HOME_DIRECTORY" "${placeholder "out"}") + (lib.cmakeFeature "IRODS_LINUX_DISTRIBUTION_NAME" "NixOS") + (lib.cmakeFeature "IRODS_LINUX_DISTRIBUTION_VERSION" lib.trivial.release) + (lib.cmakeFeature "IRODS_LINUX_DISTRIBUTION_VERSION_MAJOR" lib.trivial.release) + (lib.cmakeFeature "CPACK_GENERATOR" "TGZ") + ]; + }; + + meta = { + description = "Integrated Rule-Oriented Data System (iRODS)"; + longDescription = '' + The Integrated Rule-Oriented Data System (iRODS) is open source data management + software used by research organizations and government agencies worldwide. + iRODS is released as a production-level distribution aimed at deployment in mission + critical environments. It virtualizes data storage resources, so users can take + control of their data, regardless of where and on what device the data is stored. + As data volumes grow and data services become more complex, iRODS is increasingly + important in data management. The development infrastructure supports exhaustive + testing on supported platforms; plug-in support for microservices, storage resources, + drivers, and databases; and extensive documentation, training and support services. + ''; + homepage = "https://irods.org"; + license = lib.licenses.bsd3; + maintainers = [ lib.maintainers.bzizou ]; + platforms = lib.platforms.linux; + mainProgram = "irodsServer"; + }; +}) diff --git a/pkgs/tools/filesystems/irods/common.nix b/pkgs/tools/filesystems/irods/common.nix deleted file mode 100644 index 9f77802b66ce7..0000000000000 --- a/pkgs/tools/filesystems/irods/common.nix +++ /dev/null @@ -1,114 +0,0 @@ -{ - lib, - stdenv, - bzip2, - zlib, - autoconf, - automake, - cmake, - help2man, - texinfo, - libtool, - cppzmq, - libarchive, - avro-cpp, - boost, - zeromq, - openssl, - pam, - libiodbc, - libkrb5, - gcc, - libcxx, - which, - catch2, - nanodbc, - fmt, - nlohmann_json, - curl, - spdlog_rods, - bison, - flex, -}: - -# Common attributes of irods packages - -{ - nativeBuildInputs = [ - autoconf - automake - cmake - help2man - texinfo - which - gcc - bison - flex - ]; - buildInputs = [ - bzip2 - zlib - libtool - cppzmq - libarchive - avro-cpp - zeromq - openssl - pam - libiodbc - libkrb5 - boost - libcxx - catch2 - nanodbc - fmt - nlohmann_json - spdlog_rods - curl - ]; - - cmakeFlags = [ - "-DIRODS_EXTERNALS_FULLPATH_CLANG=${stdenv.cc}" - "-DIRODS_EXTERNALS_FULLPATH_CLANG_RUNTIME=${stdenv.cc}" - "-DIRODS_EXTERNALS_FULLPATH_ARCHIVE=${libarchive.lib}" - "-DIRODS_EXTERNALS_FULLPATH_AVRO=${avro-cpp}" - "-DIRODS_EXTERNALS_FULLPATH_BOOST=${boost}" - "-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_rods}" - "-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" - "-DPAM_LIBRARY=${pam}/lib/libpam.so" - "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}" - "-DIRODS_HOME_DIRECTORY=${placeholder "out"}" - "-DCMAKE_INSTALL_SBINDIR=${placeholder "out"}/sbin" - ]; - - postPatch = '' - patchShebangs ./packaging ./scripts - ''; - - meta = with lib; { - description = "Integrated Rule-Oriented Data System (iRODS)"; - longDescription = '' - The Integrated Rule-Oriented Data System (iRODS) is open source data management - software used by research organizations and government agencies worldwide. - iRODS is released as a production-level distribution aimed at deployment in mission - critical environments. It virtualizes data storage resources, so users can take - control of their data, regardless of where and on what device the data is stored. - As data volumes grow and data services become more complex, iRODS is increasingly - important in data management. The development infrastructure supports exhaustive - testing on supported platforms; plug-in support for microservices, storage resources, - drivers, and databases; and extensive documentation, training and support services.''; - homepage = "https://irods.org"; - license = lib.licenses.bsd3; - maintainers = [ lib.maintainers.bzizou ]; - platforms = lib.platforms.linux; - }; -} diff --git a/pkgs/tools/filesystems/irods/default.nix b/pkgs/tools/filesystems/irods/default.nix deleted file mode 100644 index dd730d523280f..0000000000000 --- a/pkgs/tools/filesystems/irods/default.nix +++ /dev/null @@ -1,169 +0,0 @@ -{ - lib, - stdenv, - fetchFromGitHub, - bzip2, - zlib, - autoconf, - automake, - cmake, - help2man, - texinfo, - libtool, - cppzmq, - libarchive, - avro-cpp_llvm, - boost, - zeromq, - openssl, - pam, - libiodbc, - libkrb5, - gcc, - libcxx, - which, - catch2, - nanodbc_llvm, - fmt, - nlohmann_json, - spdlog_llvm, - curl, - bison, - flex, -}: - -let - spdlog_rods = spdlog_llvm.overrideAttrs (attrs: { - inherit stdenv; - version = "1.10.0"; - src = attrs.src.override { - rev = "v1.10.0"; - hash = "sha256-c6s27lQCXKx6S1FhZ/LiKh14GnXMhZtD1doltU4Avws="; - }; - postPatch = '' - substituteInPlace cmake/spdlog.pc.in \ - --replace-fail '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ - ''; - }); -in -let - avro-cpp = avro-cpp_llvm; - nanodbc = nanodbc_llvm; - - common = import ./common.nix { - inherit - lib - stdenv - bzip2 - zlib - autoconf - automake - cmake - help2man - texinfo - libtool - cppzmq - libarchive - zeromq - openssl - pam - libiodbc - libkrb5 - gcc - libcxx - boost - avro-cpp - which - catch2 - nanodbc - fmt - nlohmann_json - curl - spdlog_rods - bison - flex - ; - }; -in -rec { - - # irods: libs and server package - irods = stdenv.mkDerivation ( - finalAttrs: - common - // { - version = "4.3.3"; - pname = "irods"; - - src = fetchFromGitHub { - owner = "irods"; - repo = "irods"; - rev = finalAttrs.version; - hash = "sha256-SmN2FzeoA2/gjiDfGs2oifOVj0mK2WdQCgiSdIlENfk="; - fetchSubmodules = true; - }; - - # fix build with recent llvm versions - env.NIX_CFLAGS_COMPILE = "-Wno-deprecated-register -Wno-deprecated-declarations"; - - cmakeFlags = common.cmakeFlags or [ ] ++ [ - "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath,${placeholder "out"}/lib -D_GLIBCXX_USE_CXX11_ABI=0" - "-DCMAKE_MODULE_LINKER_FLAGS=-Wl,-rpath,${placeholder "out"}/lib" - "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-rpath,${placeholder "out"}/lib" - ]; - - postPatch = common.postPatch + '' - patchShebangs ./test - substituteInPlace plugins/database/CMakeLists.txt --replace-fail "COMMAND cpp" "COMMAND ${gcc.cc}/bin/cpp" - for file in unit_tests/cmake/test_config/*.cmake - do - substituteInPlace $file --replace-quiet "CATCH2}/include" "CATCH2}/include/catch2" - done - - substituteInPlace server/auth/CMakeLists.txt --replace-fail SETUID "" - ''; - - meta = common.meta // { - longDescription = common.meta.longDescription + "This package provides the servers and libraries."; - mainProgram = "irodsServer"; - }; - } - ); - - # icommands (CLI) package, depends on the irods package - irods-icommands = stdenv.mkDerivation ( - finalAttrs: - common - // { - version = "4.3.3"; - pname = "irods-icommands"; - - src = fetchFromGitHub { - owner = "irods"; - repo = "irods_client_icommands"; - rev = finalAttrs.version; - hash = "sha256-cc0V6BztJk3njobWt27VeJNmQUXyH6aBJkvYIDFEzWY="; - }; - - buildInputs = common.buildInputs ++ [ irods ]; - - 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" - ]; - - 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/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a9f9a72f40294..5cb7e441bc5f6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3224,20 +3224,6 @@ with pkgs; icepeak = haskell.lib.compose.justStaticExecutables haskellPackages.icepeak; - inherit - (callPackages ../tools/filesystems/irods rec { - stdenv = llvmPackages_13.libcxxStdenv; - libcxx = llvmPackages_13.libcxx; - boost = boost178.override { inherit stdenv; }; - fmt = fmt_9.override { inherit stdenv; }; - nanodbc_llvm = nanodbc.override { inherit stdenv; }; - avro-cpp_llvm = avro-cpp.override { inherit stdenv boost; }; - spdlog_llvm = spdlog.override { inherit stdenv fmt; }; - }) - irods - irods-icommands - ; - ihaskell = callPackage ../development/tools/haskell/ihaskell/wrapper.nix { inherit (haskellPackages) ghcWithPackages;