2021-07-13 06:15:40 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, config
|
|
|
|
, fetchurl
|
|
|
|
, unzip
|
|
|
|
, makeWrapper
|
|
|
|
, icu
|
|
|
|
, libunwind
|
|
|
|
, curl
|
|
|
|
, zlib
|
|
|
|
, libuuid
|
|
|
|
, dotnetbuildhelpers
|
|
|
|
, dotnetCorePackages
|
|
|
|
, openssl
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "azure-functions-core-tools";
|
2021-10-29 02:01:42 +00:00
|
|
|
version = "3.0.3785";
|
2021-07-13 06:15:40 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/Azure/${pname}/releases/download/${version}/Azure.Functions.Cli.linux-x64.${version}.zip";
|
2021-10-29 02:01:42 +00:00
|
|
|
sha256 = "sha256-NdTEFQaG8eFengjzQr51ezehIHFvQZqmrjpjWk4vZKo=";
|
2021-07-13 06:15:40 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
unzip
|
|
|
|
makeWrapper
|
|
|
|
dotnetbuildhelpers
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
icu
|
|
|
|
libunwind
|
|
|
|
curl
|
|
|
|
zlib
|
|
|
|
dotnetCorePackages.sdk_3_1
|
|
|
|
];
|
|
|
|
|
|
|
|
libPath = lib.makeLibraryPath [
|
|
|
|
libunwind
|
|
|
|
libuuid
|
|
|
|
stdenv.cc.cc
|
|
|
|
curl
|
|
|
|
zlib
|
|
|
|
icu
|
|
|
|
openssl
|
|
|
|
];
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
unzip $src
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
2021-10-29 05:32:07 +00:00
|
|
|
cp -prd *.dll *.so gozip func $out/bin
|
2021-07-13 06:15:40 +00:00
|
|
|
patchelf \
|
|
|
|
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
|
|
|
--set-rpath "${libPath}" "$out/bin/func"
|
|
|
|
chmod +x $out/bin/func $out/bin/gozip
|
|
|
|
find $out/bin -type f -name "*.so" -exec patchelf --set-rpath "${libPath}" {} \;
|
|
|
|
wrapProgram "$out/bin/func" --prefix LD_LIBRARY_PATH : ${libPath}
|
|
|
|
'';
|
|
|
|
dontStrip = true; # Causes rpath patching to break if not set
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/Azure/azure-functions-core-tools";
|
|
|
|
description = "Command line tools for Azure Functions";
|
2022-06-09 23:42:40 +00:00
|
|
|
sourceProvenance = with sourceTypes; [
|
|
|
|
binaryBytecode
|
|
|
|
binaryNativeCode
|
|
|
|
];
|
2021-07-13 06:15:40 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ jshcmpbll ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|