From 63f966e3c18d9c37559a3b984ca1adfd14dddbe4 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Wed, 11 Nov 2020 12:19:07 +0100 Subject: [PATCH] extrae: Add patch to follow upstream --- bsc/extrae/default.nix | 16 ++++++---------- bsc/extrae/use-command.patch | 24 ++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 10 deletions(-) create mode 100644 bsc/extrae/use-command.patch diff --git a/bsc/extrae/default.nix b/bsc/extrae/default.nix index 6ce9fa8..1d55930 100644 --- a/bsc/extrae/default.nix +++ b/bsc/extrae/default.nix @@ -23,20 +23,16 @@ stdenv.mkDerivation rec { name = "extrae"; version = "3.8.3"; -# src = fetchurl { -# url = "https://ftp.tools.bsc.es/extrae/${name}-${version}-src.tar.bz2"; -# sha256 = "0y036qc7y30pfj1mnb9nzv2vmxy6xxiy4pgfci6l3jc0lccdsgf8"; -# }; - src = fetchFromGitHub { - owner = "rodarima"; - #owner = "bsc-performance-tools"; + owner = "bsc-performance-tools"; repo = "extrae"; - rev = "a8ec6882c03d130f88b09f2114887101ca9f6b09"; - #rev = "${version}"; - sha256 = "02gwl17r63kica6lxycyn10a0r2ciycf6g3cdq5cna5zl351qf31"; + rev = "${version}"; + sha256 = "08ghd14zb3bgqb1smb824d621pqqww4q01n3pyws0vp3xi0kavf4"; }; + # FIXME: Waiting for German to merge this patch + patches = [ ./use-command.patch ]; + enableParallelBuilding = true; nativeBuildInputs = [ installShellFiles ]; diff --git a/bsc/extrae/use-command.patch b/bsc/extrae/use-command.patch new file mode 100644 index 0000000..8255da7 --- /dev/null +++ b/bsc/extrae/use-command.patch @@ -0,0 +1,24 @@ +diff --git a/substitute b/substitute +index d5615606..82ca91a5 100755 +--- a/substitute ++++ b/substitute +@@ -16,7 +16,7 @@ UNAME=`uname` + if [ "${UNAME}" = "Darwin" -o "${UNAME}" = "AIX" ] ; then + TMPFILE=substitute-$$ + ${SED} "s|${KEY}|${VALUE}|g" < ${FILE} >${TMPFILE} +- /bin/mv -f ${TMPFILE} ${FILE} ++ command mv -f ${TMPFILE} ${FILE} + else + ${SED} "s|${KEY}|${VALUE}|g" -i ${FILE} + fi +diff --git a/substitute-all b/substitute-all +index 48c6b76a..eda7a0f2 100755 +--- a/substitute-all ++++ b/substitute-all +@@ -23,5 +23,5 @@ fi + + echo "Applying modification in ${PATHTOCHANGE} - Key = ${KEY} for value = ${VALUE}" + +-/usr/bin/find ${PATHTOCHANGE} -type f -exec ${SCRIPT_LOCATION} "${SED}" "${KEY}" "${VALUE}" {} \; ++command find ${PATHTOCHANGE} -type f -exec ${SCRIPT_LOCATION} "${SED}" "${KEY}" "${VALUE}" {} \; +