Skip to content

Commit 4d14e32

Browse files
committed
fix: update deps and add windows script
1 parent d09ecd3 commit 4d14e32

File tree

5 files changed

+121
-8
lines changed

5 files changed

+121
-8
lines changed

flake.lock

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
nixpkgs-matrix = {
44
type = "indirect";
55
id = "nixpkgs-matrix";
6-
inputs.nixpkgs.url =
7-
"github:NixOS/nixpkgs?rev=ea5234e7073d5f44728c499192544a84244bf35a";
86
};
97
flake-utils.url = "github:numtide/flake-utils";
108
};
@@ -31,7 +29,7 @@
3129
shellHook = ''
3230
echo "Entering $(npm pkg get name)"
3331
set -o allexport
34-
. ./.env
32+
. <(pk secrets env js-exec)
3533
set +o allexport
3634
set -v
3735
${lib.optionalString ci ''

package-lock.json

+53
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/brew-install.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ brew link --overwrite rustup-init
2121
# However rustup provides specific versions
2222
# Here we provide both toolchains
2323
rustup-init \
24-
--default-toolchain 1.68.2 \
24+
--default-toolchain 1.83.0 \
2525
--target x86_64-apple-darwin aarch64-apple-darwin \
2626
-y

scripts/choco-install.ps1

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
function Save-ChocoPackage {
2+
param (
3+
$PackageName
4+
)
5+
Rename-Item -Path "$env:ChocolateyInstall\lib\$PackageName\$PackageName.nupkg" -NewName "$PackageName.nupkg.zip" -ErrorAction:SilentlyContinue
6+
Expand-Archive -LiteralPath "$env:ChocolateyInstall\lib\$PackageName\$PackageName.nupkg.zip" -DestinationPath "$env:ChocolateyInstall\lib\$PackageName" -Force
7+
Remove-Item "$env:ChocolateyInstall\lib\$PackageName\_rels" -Recurse
8+
Remove-Item "$env:ChocolateyInstall\lib\$PackageName\package" -Recurse
9+
Remove-Item "$env:ChocolateyInstall\lib\$PackageName\[Content_Types].xml"
10+
New-Item -Path "${PSScriptRoot}\..\tmp\chocolatey\$PackageName" -ItemType "directory" -ErrorAction:SilentlyContinue
11+
choco pack "$env:ChocolateyInstall\lib\$PackageName\$PackageName.nuspec" --outdir "${PSScriptRoot}\..\tmp\chocolatey\$PackageName" --no-progress
12+
}
13+
14+
# Check for existence of required environment variables
15+
if ( $null -eq $env:ChocolateyInstall ) {
16+
[Console]::Error.WriteLine('Missing $env:ChocolateyInstall environment variable')
17+
exit 1
18+
}
19+
20+
# Add the cached packages with source priority 1 (Chocolatey community is 0)
21+
New-Item -Path "${PSScriptRoot}\..\tmp\chocolatey" -ItemType "directory" -ErrorAction:SilentlyContinue
22+
choco source add --name="cache" --source="${PSScriptRoot}\..\tmp\chocolatey" --priority=1 --no-progress
23+
24+
# Install nodejs v20.5.1 (will use cache if exists)
25+
$nodejs = "nodejs"
26+
choco install "$nodejs" --version="20.5.1" --require-checksums -y --no-progress
27+
# Internalise nodejs to cache if doesn't exist
28+
if ( -not (Test-Path -Path "${PSScriptRoot}\..\tmp\chocolatey\$nodejs\$nodejs.20.5.1.nupkg" -PathType Leaf) ) {
29+
Save-ChocoPackage -PackageName $nodejs
30+
}
31+
32+
# Install rust v1.68.0 (will use cache if exists)
33+
$rust = "rust-ms"
34+
choco install "$rust" --version="1.83.0" --require-checksums -y --no-progress
35+
# Internalise rust to cache if doesn't exist
36+
if ( -not (Test-Path -Path "${PSScriptRoot}\..\tmp\chocolatey\$rust\$rust.1.83.0.nupkg" -PathType Leaf) ) {
37+
Save-ChocoPackage -PackageName $rust
38+
}
39+
40+
# Install llvm v16.0.3 (will use cache if exists)
41+
$llvm = "llvm"
42+
choco install "$llvm" --version="16.0.3" --require-checksums -y --no-progress
43+
# Internalise rust to cache if doesn't exist
44+
if ( -not (Test-Path -Path "${PSScriptRoot}\..\tmp\chocolatey\$llvm\$llvm.16.0.3.nupkg" -PathType Leaf) ) {
45+
Save-ChocoPackage -PackageName $llvm
46+
}
47+
48+
# Install nasm v2.16.01.20221231 (will use cache if exists)
49+
$nasm = "nasm"
50+
choco install "$nasm" --version="2.16.01.20221231" --require-checksums -y --no-progress
51+
# Internalise rust to cache if doesn't exist
52+
if ( -not (Test-Path -Path "${PSScriptRoot}\..\tmp\chocolatey\$nasm\$nasm.2.16.01.20221231.nupkg" -PathType Leaf) ) {
53+
Save-ChocoPackage -PackageName $nasm
54+
}
55+
56+
# Install Windows SDK v10.0.22621.2 (will use cache if exists)
57+
$windowsSdk = "windows-sdk-11-version-22h2-all"
58+
choco install $windowsSdk --version="10.0.22621.2" --require-checksums -y --no-progress
59+
# Internalise rust to cache if doesn't exist
60+
if ( -not (Test-Path -Path "${PSScriptRoot}\..\tmp\chocolatey\$windowsSdk\$windowsSdk.10.0.22621.2.nupkg" -PathType Leaf) ) {
61+
Save-ChocoPackage -PackageName $windowsSdk
62+
}

0 commit comments

Comments
 (0)