From 362cdf2cc60c9a7a32c02ed785a8ba9aa2882a68 Mon Sep 17 00:00:00 2001 From: Shamrock Lee <44064051+ShamrockLee@users.noreply.github.com> Date: Wed, 6 Oct 2021 04:37:24 +0800 Subject: [PATCH 1/3] davix: 0.7.6 -> 0.8.0 --- pkgs/tools/networking/davix/default.nix | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/pkgs/tools/networking/davix/default.nix b/pkgs/tools/networking/davix/default.nix index d9f368455594..687e7aed7274 100644 --- a/pkgs/tools/networking/davix/default.nix +++ b/pkgs/tools/networking/davix/default.nix @@ -1,19 +1,24 @@ { lib, stdenv, fetchurl, cmake, pkg-config, openssl, libxml2, boost, python3, libuuid }: stdenv.mkDerivation rec { - version = "0.7.6"; + version = "0.8.0"; pname = "davix"; nativeBuildInputs = [ cmake pkg-config python3 ]; buildInputs = [ openssl libxml2 boost libuuid ]; # 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_7_6 + # https://github.com/cern-fts/davix/releases/tag/R_0_8_0 src = fetchurl { url = "https://github.com/cern-fts/${pname}/releases/download/R_${lib.replaceStrings ["."] ["_"] version}/${pname}-${version}.tar.gz"; - sha256 = "0wq66spnr616cns72f9dvr2xfvkdvfqqmc6d7dx29fpp57zzvrx2"; + sha256 = "LxCNoECKg/tbnwxoFQ02C6cz5LOg/imNRbDTLSircSQ="; }; + preConfigure = '' + find . -mindepth 1 -maxdepth 1 -type f -name "patch*.sh" -print0 | while IFS= read -r -d ''' file; do + patchShebangs "$file" + done + ''; meta = with lib; { description = "Toolkit for Http-based file management"; @@ -22,10 +27,10 @@ stdenv.mkDerivation rec { operations with Http based protocols (WebDav, Amazon S3, ...). Davix provides an API and a set of command line tools"; - license = licenses.lgpl2Plus; - homepage = "http://dmc.web.cern.ch/projects/davix/home"; - maintainers = [ maintainers.adev ]; - platforms = platforms.all; + license = licenses.lgpl2Plus; + homepage = "http://dmc.web.cern.ch/projects/davix/home"; + changelog = "https://github.com/cern-fts/davix/blob/devel/RELEASE-NOTES.md"; + maintainers = with maintainers; [ adev ]; + platforms = platforms.all; }; } - From 9e972605a04b36faebab34a821ec90aab13990e0 Mon Sep 17 00:00:00 2001 From: Shamrock Lee <44064051+ShamrockLee@users.noreply.github.com> Date: Wed, 6 Oct 2021 05:43:06 +0800 Subject: [PATCH 2/3] davix: add switches for optional features --- pkgs/tools/networking/davix/default.nix | 47 +++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/networking/davix/default.nix b/pkgs/tools/networking/davix/default.nix index 687e7aed7274..1cdb5677eecd 100644 --- a/pkgs/tools/networking/davix/default.nix +++ b/pkgs/tools/networking/davix/default.nix @@ -1,10 +1,44 @@ -{ lib, stdenv, fetchurl, cmake, pkg-config, openssl, libxml2, boost, python3, libuuid }: +{ lib +, stdenv +, fetchurl +, cmake +, pkg-config +, openssl +, libxml2 +, boost +, python3 +, libuuid +, curl +, gsoap +, enableTools ? true + # Build the bundled libcurl + # and, if defaultToLibCurl, + # use instead of an external one +, useEmbeddedLibcurl ? true + # Use libcurl instead of libneon + # Note that the libneon used is bundled in the project + # See https://github.com/cern-fts/davix/issues/23 +, defaultToLibcurl ? false +, enableIpv6 ? true +, enableTcpNodelay ? true + # Build davix_copy.so +, enableThirdPartyCopy ? false +}: +let + boolToUpper = b: lib.toUpper (lib.boolToString b); +in stdenv.mkDerivation rec { version = "0.8.0"; pname = "davix"; nativeBuildInputs = [ cmake pkg-config python3 ]; - buildInputs = [ openssl libxml2 boost libuuid ]; + buildInputs = [ + openssl + libxml2 + boost + libuuid + ] ++ lib.optional (defaultToLibcurl && !useEmbeddedLibcurl) curl + ++ lib.optional (enableThirdPartyCopy) gsoap; # using the url below since the github release page states # "please ignore the GitHub-generated tarballs, as they are incomplete" @@ -20,6 +54,15 @@ stdenv.mkDerivation rec { done ''; + cmakeFlags = [ + "-DENABLE_TOOLS=${boolToUpper enableTools}" + "-DEMBEDDED_LIBCURL=${boolToUpper useEmbeddedLibcurl}" + "-DLIBCURL_BACKEND_BY_DEFAULT=${boolToUpper defaultToLibcurl}" + "-DENABLE_IPV6=${boolToUpper enableIpv6}" + "-DENABLE_TCP_NODELAY=${boolToUpper enableTcpNodelay}" + "-DENABLE_THIRD_PARTY_COPY=${boolToUpper enableThirdPartyCopy}" + ]; + meta = with lib; { description = "Toolkit for Http-based file management"; From 1fce5d4252a584fdf9f854dbf023d2b992397f46 Mon Sep 17 00:00:00 2001 From: Shamrock Lee <44064051+ShamrockLee@users.noreply.github.com> Date: Wed, 6 Oct 2021 06:03:37 +0800 Subject: [PATCH 3/3] davix-copy: init as davix with enableThirdPartyCopy=true --- pkgs/top-level/all-packages.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8255d86d4b63..a7fb0c2ae0b8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3720,6 +3720,8 @@ with pkgs; davix = callPackage ../tools/networking/davix { }; + davix-copy = appendToName "copy" (davix.override { enableThirdPartyCopy = true; }); + cantata = libsForQt5.callPackage ../applications/audio/cantata { }; cantoolz = python3Packages.callPackage ../tools/networking/cantoolz { };