Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
2.0 kB · 66 lines
Nix
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667{ lib, vscode-utils, icu, python3, # When `true`, the python default setting will be fixed to specified. # Use version from `PATH` for default setting otherwise. # Defaults to `false` as we expect it to be project specific most of the time. pythonUseFixed ? false, # For updateScript vscode-extension-update-script,}:
vscode-utils.buildVscodeMarketplaceExtension rec { mktplcRef = { name = "python"; publisher = "ms-python"; version = "2025.10.1"; hash = "sha256-3hd940mfxnvqoblIrx/S0A8KwHtYLFuonu52/HGGfak="; };
buildInputs = [ icu ];
nativeBuildInputs = [ python3.pkgs.wrapPython ];
propagatedBuildInputs = with python3.pkgs; [ debugpy jedi-language-server ];
postPatch = '' # remove bundled python deps and use libs from nixpkgs rm -r python_files/lib mkdir -p python_files/lib/python/ ln -s ${python3.pkgs.debugpy}/lib/*/site-packages/debugpy python_files/lib/python/ buildPythonPath "$propagatedBuildInputs" for i in python_files/*.py; do patchPythonScript "$i" done '' + lib.optionalString pythonUseFixed '' # Patch `packages.json` so that nix's *python* is used as default value for `python.pythonPath`. substituteInPlace "./package.json" \ --replace-fail "\"default\":\"python\"" "\"default\":\"${python3.interpreter}\"" '';
passthru.updateScript = vscode-extension-update-script { };
meta = { description = "Visual Studio Code extension with rich support for the Python language"; downloadPage = "https://marketplace.visualstudio.com/items?itemName=ms-python.python"; homepage = "https://github.com/Microsoft/vscode-python"; changelog = "https://github.com/microsoft/vscode-python/releases"; license = lib.licenses.mit; platforms = [ "aarch64-linux" "x86_64-linux" "aarch64-darwin" "x86_64-darwin" ]; maintainers = [ lib.maintainers.jraygauthier lib.maintainers.jfchevrette ]; };}