-
Notifications
You must be signed in to change notification settings - Fork 39
/
snapcraft.yaml
55 lines (52 loc) · 1.88 KB
/
snapcraft.yaml
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
48
49
50
51
52
53
54
55
name: node
version: '24.0.0-nightly20241115b02cd411'
summary: Node.js
description: |
A JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js' package ecosystem, npm, is the largest ecosystem of open source libraries in the world. https://nodejs.org/
grade: stable
confinement: classic
base: core22
apps:
node:
command: bin/node
npm:
command: bin/npm
npx:
command: bin/npx
yarn:
command: bin/yarn.js
yarnpkg:
command: bin/yarn.js
parts:
node:
plugin: make
source-type: tar
source: https://nodejs.org/download/nightly/v24.0.0-nightly20241115b02cd411c2/node-v24.0.0-nightly20241115b02cd411c2.tar.gz
build-packages:
# Ensure these and the build environment below match the minimum GCC and G++ versions for this Node release.
# https://github.com/nodejs/node/blob/main/BUILDING.md#building-nodejs-on-supported-platforms
- gcc-10
- g++-10
- python3-distutils
build-environment:
- CC: gcc-10
- CXX: g++-10
- LINK: g++-10
- V: ""
make-parameters:
- V=
override-build: |
./configure --verbose --prefix=/ --release-urlbase=https://nodejs.org/download/nightly/ --tag=nightly20241115b02cd411c2
craftctl default
mkdir -p $CRAFT_PART_INSTALL/etc
echo "prefix = /usr/local" >> $CRAFT_PART_INSTALL/etc/npmrc
yarn:
source-type: tar
source: https://yarnpkg.com/latest.tar.gz
plugin: dump
# Yarn has a problem with lifecycle scripts when used inside snap, they don't complete properly, with exit code !=0.
# Replacing the spinner with proper stdio appears to fix it.
override-build: |
craftctl default
chmod -R g-s $CRAFT_PART_INSTALL
sed -i "s/var stdio = spinner ? undefined : 'inherit';/var stdio = 'inherit';/" $CRAFT_PART_INSTALL/lib/cli.js