lol

Merge pull request #193902 from okpedersen/azure-functions-core-tools-darwin

azure-functions-core-tools: Add darwin support, upgrade to v4

authored by

Stanisław Pitucha and committed by
GitHub
34564656 425d4abf

+23 -11
+23 -11
pkgs/development/tools/azure-functions-core-tools/default.nix
··· 16 16 17 17 stdenv.mkDerivation rec { 18 18 pname = "azure-functions-core-tools"; 19 - version = "3.0.3785"; 19 + version = "4.0.4785"; 20 20 21 - src = fetchurl { 22 - url = "https://github.com/Azure/${pname}/releases/download/${version}/Azure.Functions.Cli.linux-x64.${version}.zip"; 23 - sha256 = "sha256-NdTEFQaG8eFengjzQr51ezehIHFvQZqmrjpjWk4vZKo="; 24 - }; 21 + src = 22 + if stdenv.isLinux then 23 + fetchurl { 24 + url = "https://github.com/Azure/${pname}/releases/download/${version}/Azure.Functions.Cli.linux-x64.${version}.zip"; 25 + sha256 = "sha256-SWvbPEslwhYNd2fTQJWy1+823o1vJR/roPstgelSfnQ="; 26 + } 27 + else 28 + fetchurl { 29 + url = "https://github.com/Azure/${pname}/releases/download/${version}/Azure.Functions.Cli.osx-x64.${version}.zip"; 30 + sha256 = "sha256-m06XeUHVDCxo7sfK4eF1oM6IuaVET9jr/xSO9qzpxSU="; 31 + } 32 + ; 25 33 26 34 nativeBuildInputs = [ 27 35 unzip ··· 50 58 51 59 installPhase = '' 52 60 mkdir -p $out/bin 53 - cp -prd *.dll *.so gozip func $out/bin 61 + cp -prd . $out/bin/azure-functions-core-tools 62 + chmod +x $out/bin/azure-functions-core-tools/{func,gozip} 63 + '' + lib.optionalString stdenv.isLinux '' 54 64 patchelf \ 55 65 --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 56 - --set-rpath "${libPath}" "$out/bin/func" 57 - chmod +x $out/bin/func $out/bin/gozip 58 - find $out/bin -type f -name "*.so" -exec patchelf --set-rpath "${libPath}" {} \; 59 - wrapProgram "$out/bin/func" --prefix LD_LIBRARY_PATH : ${libPath} 66 + --set-rpath "${libPath}" "$out/bin/azure-functions-core-tools/func" 67 + find $out/bin/azure-functions-core-tools -type f -name "*.so" -exec patchelf --set-rpath "${libPath}" {} \; 68 + wrapProgram "$out/bin/azure-functions-core-tools/func" --prefix LD_LIBRARY_PATH : ${libPath} 69 + '' + '' 70 + ln -s $out/bin/{azure-functions-core-tools,}/func 71 + ln -s $out/bin/{azure-functions-core-tools,}/gozip 60 72 ''; 61 73 dontStrip = true; # Causes rpath patching to break if not set 62 74 ··· 69 81 ]; 70 82 license = licenses.mit; 71 83 maintainers = with maintainers; [ jshcmpbll ]; 72 - platforms = platforms.linux; 84 + platforms = platforms.unix; 73 85 }; 74 86 }