-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathsnapcraft.yaml
55 lines (52 loc) · 1.74 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: '14.21.3'
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
apps:
node:
command: bin/node
npm:
command: bin/npm
npx:
command: bin/npx
yarn:
command: bin/yarn.js
yarnpkg:
command: bin/yarn.js
parts:
gcc-6:
plugin: nil
override-pull: 'true'
override-build: |
sudo apt --yes install software-properties-common
sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt --yes install gcc-6 g++-6
override-stage: 'true'
override-prime: 'true'
node:
plugin: make
source-type: tar
source: https://nodejs.org/download/release/v14.21.3/node-v14.21.3.tar.gz
make-parameters:
- V=
prepare: |
export CC="gcc-6"
export CXX="g++-6"
export LINK="g++-6"
./configure --verbose --prefix=/ --release-urlbase=https://nodejs.org/download/release/ --tag=
install: |
mkdir -p $SNAPCRAFT_PART_INSTALL/etc
echo "prefix = /usr/local" >> $SNAPCRAFT_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.
install: |
chmod -R g-s $SNAPCRAFT_PART_INSTALL
sed -i "s/var stdio = spinner ? undefined : 'inherit';/var stdio = 'inherit';/" $SNAPCRAFT_PART_INSTALL/lib/cli.js