Unverified Commit 23a78bd0 authored by Pol Dellaiera's avatar Pol Dellaiera Committed by GitHub
Browse files

irods: 4.3.1 -> 4.3.3 (#348576)

parents 5d89e8af 3c849ef3
Loading
Loading
Loading
Loading
+65 −7
Original line number Diff line number Diff line
{ 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, spdlog, curl }:
{
  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 ];
  buildInputs = [ bzip2 zlib libtool cppzmq libarchive avro-cpp zeromq openssl pam libiodbc libkrb5 boost
                  libcxx catch2 nanodbc fmt nlohmann_json spdlog curl ];
  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}"
@@ -21,7 +79,7 @@
    "-DIRODS_EXTERNALS_FULLPATH_NANODBC=${nanodbc}"
    "-DIRODS_EXTERNALS_FULLPATH_FMT=${fmt}"
    "-DIRODS_EXTERNALS_FULLPATH_JSON=${nlohmann_json}"
    "-DIRODS_EXTERNALS_FULLPATH_SPDLOG=${spdlog}"
    "-DIRODS_EXTERNALS_FULLPATH_SPDLOG=${spdlog_rods}"
    "-DIRODS_LINUX_DISTRIBUTION_NAME=nix"
    "-DIRODS_LINUX_DISTRIBUTION_VERSION_MAJOR=1.0"
    "-DCPACK_GENERATOR=TGZ"
+159 −75
Original line number Diff line number Diff line
{ 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, curl }:
{
  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
      spdlog curl;
    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.1";
  irods = stdenv.mkDerivation (
    finalAttrs:
    common
    // {
      version = "4.3.3";
      pname = "irods";

      src = fetchFromGitHub {
        owner = "irods";
        repo = "irods";
        rev = finalAttrs.version;
      sha256 = "sha256-gWgNY8+zD2lRCV5ydOTF0qAgZ1dlQSQKxtdw+U235vg=";
        hash = "sha256-SmN2FzeoA2/gjiDfGs2oifOVj0mK2WdQCgiSdIlENfk=";
        fetchSubmodules = true;
      };

@@ -33,12 +107,14 @@ rec {
      env.NIX_CFLAGS_COMPILE = "-Wno-deprecated-register -Wno-deprecated-declarations";

      cmakeFlags = common.cmakeFlags or [ ] ++ [
      "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath,${placeholder "out"}/lib"
        "-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 + ''
      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
@@ -51,25 +127,31 @@ rec {

      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.1";
  irods-icommands = stdenv.mkDerivation (
    finalAttrs:
    common
    // {
      version = "4.3.3";
      pname = "irods-icommands";

      src = fetchFromGitHub {
        owner = "irods";
        repo = "irods_client_icommands";
        rev = finalAttrs.version;
      sha256 = "sha256-BjBg13KrCGRLOtGnp23qXOLudLctvu2gJ7wxHFjM5Ug=";
        hash = "sha256-cc0V6BztJk3njobWt27VeJNmQUXyH6aBJkvYIDFEzWY=";
      };

      buildInputs = common.buildInputs ++ [ irods ];

    postPatch = common.postPatch + ''
      postPatch =
        common.postPatch
        + ''
          patchShebangs ./bin
        '';

@@ -83,7 +165,9 @@ rec {

      meta = common.meta // {
        description = common.meta.description + " CLI clients";
      longDescription = common.meta.longDescription + "This package provides the CLI clients, called 'icommands'.";
        longDescription =
          common.meta.longDescription + "This package provides the CLI clients, called 'icommands'.";
      };
  });
    }
  );
}
+1 −0
Original line number Diff line number Diff line
@@ -8602,6 +8602,7 @@ with pkgs;
    fmt = fmt_8.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;