azure-functions-core-tools: 4.0.4785 -> 4.0.4915
This commit is contained in:
parent
d165798996
commit
3301ba748d
1 changed files with 97 additions and 85 deletions
|
@ -1,35 +1,44 @@
|
||||||
{ stdenv
|
{
|
||||||
, lib
|
stdenv,
|
||||||
, config
|
lib,
|
||||||
, fetchurl
|
config,
|
||||||
, unzip
|
fetchurl,
|
||||||
, makeWrapper
|
unzip,
|
||||||
, icu
|
makeWrapper,
|
||||||
, libunwind
|
icu,
|
||||||
, curl
|
libunwind,
|
||||||
, zlib
|
curl,
|
||||||
, libuuid
|
zlib,
|
||||||
, dotnetbuildhelpers
|
libuuid,
|
||||||
, dotnetCorePackages
|
dotnetbuildhelpers,
|
||||||
, openssl
|
dotnetCorePackages,
|
||||||
}:
|
openssl,
|
||||||
|
}: let
|
||||||
|
platforms = {
|
||||||
|
"aarch64-darwin" = {
|
||||||
|
platformStr = "osx-arm64";
|
||||||
|
hash = "sha512-MDuyFxtjlojXyrOdgJxVY3IDMLnrDvA4rO7ujOlE5KH082GXfonNOFZSpa64M8jMPJhJ4sopHKgZVvKKygzjPg==";
|
||||||
|
};
|
||||||
|
"x86_64-darwin" = {
|
||||||
|
platformStr = "osx-x64";
|
||||||
|
hash = "sha512-fD48QFYIzq3/EvZR3o3VFCxIz3VZGSDJUo/ZwfZnFu7xt/xkQSBL+2zXOh9XZaBg42Xq3x9eFZQ00V8AbqJdKA==";
|
||||||
|
};
|
||||||
|
"x86_64-linux" = {
|
||||||
|
platformStr = "linux-x64";
|
||||||
|
hash = "sha512-PhgS2ivRn8Yhlr7+gbQd+rGSMDLGsxURh8lOE30Xk7zEubukjekxDsaPqM1tOS95k7TWM9xXyVVfmsJplrl+nw==";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
platformInfo = builtins.getAttr stdenv.targetPlatform.system platforms;
|
||||||
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "azure-functions-core-tools";
|
pname = "azure-functions-core-tools";
|
||||||
version = "4.0.4785";
|
version = "4.0.4915";
|
||||||
|
|
||||||
src =
|
src = fetchurl {
|
||||||
if stdenv.isLinux then
|
url = "https://github.com/Azure/${pname}/releases/download/${version}/Azure.Functions.Cli.${platformInfo.platformStr}.${version}.zip";
|
||||||
fetchurl {
|
inherit (platformInfo) hash;
|
||||||
url = "https://github.com/Azure/${pname}/releases/download/${version}/Azure.Functions.Cli.linux-x64.${version}.zip";
|
};
|
||||||
sha256 = "sha256-SWvbPEslwhYNd2fTQJWy1+823o1vJR/roPstgelSfnQ=";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
fetchurl {
|
|
||||||
url = "https://github.com/Azure/${pname}/releases/download/${version}/Azure.Functions.Cli.osx-x64.${version}.zip";
|
|
||||||
sha256 = "sha256-m06XeUHVDCxo7sfK4eF1oM6IuaVET9jr/xSO9qzpxSU=";
|
|
||||||
}
|
|
||||||
;
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
unzip
|
unzip
|
||||||
|
@ -39,7 +48,7 @@ stdenv.mkDerivation rec {
|
||||||
libunwind
|
libunwind
|
||||||
curl
|
curl
|
||||||
zlib
|
zlib
|
||||||
dotnetCorePackages.sdk_3_1
|
dotnetCorePackages.sdk_6_0
|
||||||
];
|
];
|
||||||
|
|
||||||
libPath = lib.makeLibraryPath [
|
libPath = lib.makeLibraryPath [
|
||||||
|
@ -56,17 +65,20 @@ stdenv.mkDerivation rec {
|
||||||
unzip $src
|
unzip $src
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase =
|
||||||
|
''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
cp -prd . $out/bin/azure-functions-core-tools
|
cp -prd . $out/bin/azure-functions-core-tools
|
||||||
chmod +x $out/bin/azure-functions-core-tools/{func,gozip}
|
chmod +x $out/bin/azure-functions-core-tools/{func,gozip}
|
||||||
'' + lib.optionalString stdenv.isLinux ''
|
''
|
||||||
|
+ lib.optionalString stdenv.isLinux ''
|
||||||
patchelf \
|
patchelf \
|
||||||
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||||
--set-rpath "${libPath}" "$out/bin/azure-functions-core-tools/func"
|
--set-rpath "${libPath}" "$out/bin/azure-functions-core-tools/func"
|
||||||
find $out/bin/azure-functions-core-tools -type f -name "*.so" -exec patchelf --set-rpath "${libPath}" {} \;
|
find $out/bin/azure-functions-core-tools -type f -name "*.so" -exec patchelf --set-rpath "${libPath}" {} \;
|
||||||
wrapProgram "$out/bin/azure-functions-core-tools/func" --prefix LD_LIBRARY_PATH : ${libPath}
|
wrapProgram "$out/bin/azure-functions-core-tools/func" --prefix LD_LIBRARY_PATH : ${libPath}
|
||||||
'' + ''
|
''
|
||||||
|
+ ''
|
||||||
ln -s $out/bin/{azure-functions-core-tools,}/func
|
ln -s $out/bin/{azure-functions-core-tools,}/func
|
||||||
ln -s $out/bin/{azure-functions-core-tools,}/gozip
|
ln -s $out/bin/{azure-functions-core-tools,}/gozip
|
||||||
'';
|
'';
|
||||||
|
@ -81,6 +93,6 @@ stdenv.mkDerivation rec {
|
||||||
];
|
];
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
maintainers = with maintainers; [];
|
maintainers = with maintainers; [];
|
||||||
platforms = platforms.unix;
|
platforms = ["x86_64-linux" "aarch64-darwin" "x86_64-darwin"];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue