lol

Merge pull request #191145 from linsui/ms-python

vscode-extensions.ms-python.python: 2022.11.11881005 -> 2022.15.12711056

authored by

superherointj and committed by
GitHub
46fc0f49 2cf6bd63

+40 -3
+40 -3
pkgs/applications/editors/vscode/extensions/python/default.nix
··· 6 6 # Use version from `PATH` for default setting otherwise. 7 7 # Defaults to `false` as we expect it to be project specific most of the time. 8 8 , pythonUseFixed ? false 9 + # For updateScript 10 + , writeScript 11 + , bash 12 + , curl 13 + , coreutils 14 + , gnused 15 + , nix 9 16 }: 10 17 11 - vscode-utils.buildVscodeMarketplaceExtension { 18 + vscode-utils.buildVscodeMarketplaceExtension rec { 12 19 mktplcRef = { 13 20 name = "python"; 14 21 publisher = "ms-python"; 15 - version = "2022.11.11881005"; 16 - sha256 = "sha256-8NH/aWIAwSpVRi3cvBCpvO8MVzIoRaXxADmWp6DuUb8="; 22 + version = "2022.15.12711056"; 23 + sha256 = "sha256-bksUMN+ZdkmElVD8BC4ihklQyWlKkcpep2VOwUzISnQ="; 17 24 }; 18 25 19 26 buildInputs = [ icu ]; ··· 41 48 --replace "\"default\": \"python\"" "\"default\": \"${python3.interpreter}\"" 42 49 ''; 43 50 51 + passthru.updateScript = writeScript "update" '' 52 + #! ${bash}/bin/bash 53 + 54 + set -eu -o pipefail 55 + 56 + export PATH=${lib.makeBinPath [ 57 + curl 58 + coreutils 59 + gnused 60 + nix 61 + ]} 62 + 63 + api=$(curl -s 'https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery' \ 64 + -H 'accept: application/json;api-version=3.0-preview.1' \ 65 + -H 'content-type: application/json' \ 66 + --data-raw '{"filters":[{"criteria":[{"filterType":7,"value":"${mktplcRef.publisher}.${mktplcRef.name}"}]}],"flags":512}') 67 + version=$(echo $api | sed -n -E 's|^.*"version":"([0-9.]+)".*$|\1|p') 68 + 69 + if [[ $version != ${mktplcRef.version} ]]; then 70 + tmp=$(mktemp) 71 + curl -sLo $tmp $(echo ${(import ../mktplcExtRefToFetchArgs.nix mktplcRef).url} | sed "s|${mktplcRef.version}|$version|") 72 + hash=$(nix hash file --type sha256 --base32 --sri $tmp) 73 + sed -i -e "s|${mktplcRef.sha256}|$hash|" -e "s|${mktplcRef.version}|$version|" pkgs/applications/editors/vscode/extensions/python/default.nix 74 + fi 75 + ''; 76 + 44 77 meta = with lib; { 78 + description = "A Visual Studio Code extension with rich support for the Python language"; 79 + downloadPage = "https://marketplace.visualstudio.com/items?itemName=ms-python.python"; 80 + homepage = "https://github.com/Microsoft/vscode-python"; 81 + changelog = "https://github.com/microsoft/vscode-python/releases"; 45 82 license = licenses.mit; 46 83 platforms = [ "x86_64-linux" "aarch64-darwin" "x86_64-darwin" ]; 47 84 maintainers = with maintainers; [ jraygauthier jfchevrette ];