vscode-extension-update: Fix usage of experimental Nix features

OPNA2608 b38cf32e 728cf36b

Changed files
+24 -3
pkgs
by-name
vs
vscode-extension-update
+24 -3
pkgs/by-name/vs/vscode-extension-update/vscode_extension_update.py
···
"""
Retrieves a raw Nix attribute value.
"""
-
return self.execute_command(["nix", "eval", "--raw", "-f", ".", attribute_path])
+
return self.execute_command([
+
"nix",
+
"--extra-experimental-features",
+
"nix-command",
+
"eval",
+
"--raw",
+
"-f",
+
".",
+
attribute_path
+
])
def get_nix_system(self) -> str:
"""
Retrieves system from Nix.
"""
-
return self._get_nix_attribute("system")
+
return self._get_nix_attribute("stdenv.hostPlatform.system")
def get_supported_nix_systems(self) -> list[str]:
-
nix_config = self.execute_command(["nix", "config", "show"])
+
nix_config = self.execute_command([
+
"nix",
+
"--extra-experimental-features",
+
"nix-command",
+
"config",
+
"show"
+
])
system = None
extra_platforms = []
for line in nix_config.splitlines():
···
def _get_nix_vscode_extension_src_hash(self, system: str) -> str:
url = self.execute_command([
"nix",
+
"--extra-experimental-features",
+
"nix-command",
"eval",
"--raw",
"-f",
···
sha256 = self.execute_command(["nix-prefetch-url", url])
return self.execute_command([
"nix",
+
"--extra-experimental-features",
+
"nix-command",
"hash",
"convert",
"--to",
···
return json.loads(
self.execute_command([
"nix",
+
"--extra-experimental-features",
+
"nix-command",
"eval",
"--json",
"-f",