generated from esy-packages/template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
esy.json
47 lines (47 loc) · 1.96 KB
/
esy.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{
"name": "esy-rustup",
"//": "The version is the rust version",
"version": "1.56.0",
"description": "Rust toolchain setup for esy",
"source": "https://github.com/rust-lang/rustup/archive/refs/tags/1.24.2.tar.gz#979e8139734d39313b0147e0db3bfd2675f49507",
"override": {
"buildsInSource": true,
"buildEnv": {
"RUSTUP_USE_CURL": "1",
"CARGO_HOME": "#{self.target_dir}",
"RUSTUP_HOME": "#{self.target_dir / '.rustup'}"
},
"exportedEnv": {
"CARGO_HOME": {
"val": "#{self.install}",
"scope": "global"
},
"RUSTUP_HOME": {
"val": "#{self.install / '.rustup'}",
"scope": "global"
}
},
"build": [
[
"sh",
"-c",
"./rustup-init.sh -y --no-modify-path --default-toolchain 1.56 --profile minimal #{os == 'windows' ? '--default-host=x86_64-pc-windows-gnu' : ''}"
]
],
"install": [
"cp #{self.target_dir}/bin/cargo-fmt#{os == 'windows' ? '.exe': ''} #{self.bin}",
"cp #{self.target_dir}/bin/cargo-miri#{os == 'windows' ? '.exe': ''} #{self.bin}",
"cp #{self.target_dir}/bin/cargo#{os == 'windows' ? '.exe': ''} #{self.bin}",
"cp #{self.target_dir}/bin/clippy-driver#{os == 'windows' ? '.exe': ''} #{self.bin}",
"cp #{self.target_dir}/bin/rls#{os == 'windows' ? '.exe': ''} #{self.bin}",
"cp #{self.target_dir}/bin/rust-gdb#{os == 'windows' ? '.exe': ''} #{self.bin}",
"cp #{self.target_dir}/bin/rust-lldb#{os == 'windows' ? '.exe': ''} #{self.bin}",
"cp #{self.target_dir}/bin/rustc#{os == 'windows' ? '.exe': ''} #{self.bin}",
"cp #{self.target_dir}/bin/rustdoc#{os == 'windows' ? '.exe': ''} #{self.bin}",
"cp #{self.target_dir}/bin/rustfmt#{os == 'windows' ? '.exe': ''} #{self.bin}",
"cp #{self.target_dir}/bin/rustup#{os == 'windows' ? '.exe': ''} #{self.bin}",
"cp -R #{self.target_dir}/.cargo #{self.install}/.cargo",
"cp -R #{self.target_dir}/.rustup #{self.install}/.rustup"
]
}
}