Visual Studio Code: Difference between revisions
imported>Inclyc m nix-vscode-extensions: typo fix |
imported>Blackpill0w m Added an example for getting the SHA256 of an extension |
||
Line 103: | Line 103: | ||
You will need to update the <code>sha256</code> value for each new Insiders build. The new value will appear in a validation error when you try to build. | You will need to update the <code>sha256</code> value for each new Insiders build. The new value will appear in a validation error when you try to build. | ||
Example: | |||
Put an arbitrary value in the sha256 field, try to build and you'll get an error message like this: | |||
<pre> | |||
//-- ... | |||
error: hash mismatch in fixed-output derivation '/nix/store/path': | |||
specified: sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= | |||
got: sha256-aQvTtZdPU2F1UjkFxiLs4A+60A4qc9bXKwKriNsCDPg= | |||
//-- ... | |||
</pre> | |||
Take that last line and run the following python script (you can search for an online python interpreter if it's not installed), the output will give you the correct value: | |||
<syntaxHighlight lang=python> | |||
import base64 | |||
# The 'sha256-' in the beginning should be removed | |||
text = b'aQvTtZdPU2F1UjkFxiLs4A+60A4qc9bXKwKriNsCDPg=' | |||
print(base64.decodebytes(text).hex()) | |||
</syntaxHighlight> | |||
== Wayland == | == Wayland == |