diff --git a/pkgs/by-name/da/davix/package.nix b/pkgs/by-name/da/davix/package.nix index 5bdecbd6dff3..628c1d5b4cb6 100644 --- a/pkgs/by-name/da/davix/package.nix +++ b/pkgs/by-name/da/davix/package.nix @@ -1,12 +1,12 @@ { lib, stdenv, - fetchurl, + fetchpatch, + fetchFromGitHub, cmake, pkg-config, openssl, libxml2, - boost, python3, libuuid, curl, @@ -27,7 +27,7 @@ let boolToUpper = b: lib.toUpper (lib.boolToString b); in stdenv.mkDerivation rec { - version = "0.8.7"; + version = "0.8.10"; pname = "davix" + lib.optionalString enableThirdPartyCopy "-copy"; nativeBuildInputs = [ cmake @@ -35,7 +35,6 @@ stdenv.mkDerivation rec { python3 ]; buildInputs = [ - boost curl libxml2 openssl @@ -44,14 +43,11 @@ stdenv.mkDerivation rec { ++ lib.optional (!stdenv.hostPlatform.isDarwin) libuuid ++ lib.optional enableThirdPartyCopy gsoap; - # using the url below since the github release page states - # "please ignore the GitHub-generated tarballs, as they are incomplete" - # https://github.com/cern-fts/davix/releases/tag/R_0_8_0 - src = fetchurl { - url = "https://github.com/cern-fts/davix/releases/download/R_${ - lib.replaceStrings [ "." ] [ "_" ] version - }/davix-${version}.tar.gz"; - sha256 = "sha256-eMJOFO3X5OVgOS1nFH7IZYwqoNNkBBW99rxROvz2leY="; + src = fetchFromGitHub { + owner = "cern-fts"; + repo = "davix"; + rev = "refs/tags/R_${lib.replaceStrings [ "." ] [ "_" ] version}"; + hash = "sha256-n4NeHBgQwGwgHAFQzPc3oEP9k3F/sqrTmkI/zHW+Miw="; }; preConfigure = '' @@ -61,6 +57,7 @@ stdenv.mkDerivation rec { ''; cmakeFlags = [ + "-DDAVIX_TESTS=OFF" "-DENABLE_TOOLS=${boolToUpper enableTools}" "-DEMBEDDED_LIBCURL=OFF" "-DLIBCURL_BACKEND_BY_DEFAULT=${boolToUpper defaultToLibcurl}" @@ -69,6 +66,14 @@ stdenv.mkDerivation rec { "-DENABLE_THIRD_PARTY_COPY=${boolToUpper enableThirdPartyCopy}" ]; + patches = [ + # Update CMake minimum requirement and supported versions, backport from unreleased davix 0.8.11 + (fetchpatch { + url = "https://github.com/cern-fts/davix/commit/687d424c9f87888c94d96f3ea010de11ef70cd23.patch"; + hash = "sha256-FNXOQrY0gsMK+D4jwbJmYyEqD3lFui0giXUd+Rr0jLk="; + }) + ]; + meta = with lib; { description = "Toolkit for Http-based file management"; diff --git a/pkgs/by-name/gf/gfal2/package.nix b/pkgs/by-name/gf/gfal2/package.nix index 63ea071efaee..62e9714929b6 100644 --- a/pkgs/by-name/gf/gfal2/package.nix +++ b/pkgs/by-name/gf/gfal2/package.nix @@ -109,6 +109,36 @@ stdenv.mkDerivation (finalAttrs: { ] ); + preConfigure = + let + cmakeFiles = [ + "CMakeLists.txt" + "src/CMakeLists.txt" + "src/core/CMakeLists.txt" + "src/core/transfer/CMakeLists.txt" + "src/plugins/CMakeLists.txt" + "src/plugins/dcap/CMakeLists.txt" + "src/plugins/file/CMakeLists.txt" + "src/plugins/gridftp/CMakeLists.txt" + "src/plugins/http/CMakeLists.txt" + "src/plugins/lfc/CMakeLists.txt" + "src/plugins/mock/CMakeLists.txt" + "src/plugins/rfio/CMakeLists.txt" + "src/plugins/sftp/CMakeLists.txt" + "src/plugins/srm/CMakeLists.txt" + "src/plugins/xrootd/CMakeLists.txt" + "src/utils/CMakeLists.txt" + "src/version/CMakeLists.txt" + ]; + in + '' + for f in ${lib.escapeShellArgs cmakeFiles}; do + substituteInPlace "$f" \ + --replace-fail 'cmake_minimum_required (VERSION 2.6)' \ + 'cmake_minimum_required (VERSION 3.10)' + done + ''; + cmakeFlags = (map ( pluginName: