17 def is_windows: Boolean = platform_name.endsWith("-windows") |
17 def is_windows: Boolean = platform_name.endsWith("-windows") |
18 } |
18 } |
19 |
19 |
20 val platforms: List[Download_Platform] = |
20 val platforms: List[Download_Platform] = |
21 List( |
21 List( |
|
22 Download_Platform("arm64-darwin", "osx-aarch64"), |
22 Download_Platform("arm64-linux", "linux-aarch64"), |
23 Download_Platform("arm64-linux", "linux-aarch64"), |
23 Download_Platform("x86_64-darwin", "osx-x86_64"), |
24 Download_Platform("x86_64-darwin", "osx-x86_64"), |
24 Download_Platform("x86_64-linux", "linux-x86_64"), |
25 Download_Platform("x86_64-linux", "linux-x86_64"), |
25 Download_Platform("x86_64-windows", "windows-x86_64")) |
26 Download_Platform("x86_64-windows", "windows-x86_64")) |
26 |
27 |
27 |
28 |
28 /* build stack */ |
29 /* build stack */ |
29 |
30 |
30 val default_url = "https://github.com/commercialhaskell/stack/releases/download" |
31 val default_url = "https://github.com/commercialhaskell/stack/releases/download" |
31 val default_version = "2.9.3" |
32 val default_version = "2.13.1" |
32 |
33 |
33 def build_stack( |
34 def build_stack( |
34 base_url: String = default_url, |
35 base_url: String = default_url, |
35 version: String = default_version, |
36 version: String = default_version, |
36 target_dir: Path = Path.current, |
37 target_dir: Path = Path.current, |
67 |
68 |
68 |
69 |
69 /* settings */ |
70 /* settings */ |
70 |
71 |
71 component_dir.write_settings(""" |
72 component_dir.write_settings(""" |
72 ISABELLE_STACK="$COMPONENT/${ISABELLE_WINDOWS_PLATFORM64:-$ISABELLE_PLATFORM64}/stack" |
73 ISABELLE_STACK="$COMPONENT/${ISABELLE_WINDOWS_PLATFORM64:-${ISABELLE_APPLE_PLATFORM64:-$ISABELLE_PLATFORM64}}/stack" |
73 """) |
74 """) |
74 |
75 |
75 |
76 |
76 /* README */ |
77 /* README */ |
77 |
78 |
78 File.write(component_dir.README, |
79 File.write(component_dir.README, |
79 """This is stack """ + version + """ -- the Haskell Tool Stack. |
80 """This is stack """ + version + """ -- the Haskell Tool Stack. |
80 |
81 |
81 See also https://www.haskellstack.org and executables from |
82 See also https://www.haskellstack.org and executables from |
82 """ + base_url + """ |
83 """ + base_url + """ |
83 |
|
84 The oldest supported version of macOS is 10.14 Mojave. |
|
85 |
84 |
86 The downloaded files were renamed and made executable. |
85 The downloaded files were renamed and made executable. |
87 |
86 |
88 |
87 |
89 Makarius |
88 Makarius |