-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathconfig.yml
84 lines (76 loc) · 3 KB
/
config.yml
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
version: 2
jobs:
build:
docker:
- image: adnelson/nixfromnpm-base
steps:
- checkout
- run:
name: Build
command: nix-build release.nix -A nixfromnpm --max-jobs 2
- run:
name: Run help command
command: result/bin/nixfromnpm --help >/dev/null
- run:
name: Build package with no dependencies, confirm rebuilding has no effect
command: |
PATH=$(readlink result)/bin:$PATH
cd $(mktemp -d)
nixfromnpm -o output -p lodash
nix-build output -A nodePackages.lodash --max-jobs 2
nixfromnpm -o output -p lodash
if [[ $(ls output/nodePackages/lodash | wc -l) -ne 1 ]]; then
echo "A new version of lodash shouldn't have been created" >&2
exit 1
fi
- run:
name: Build package with dependencies
command: |
PATH=$(readlink result)/bin:$PATH
cd $(mktemp -d)
nixfromnpm -o output -p optimist
nix-build output -A nodePackages.optimist --max-jobs 2
- run:
name: Build package with dev dependencies
command: |
PATH=$(readlink result)/bin:$PATH
cd $(mktemp -d)
nixfromnpm -o output -p coffee-script --dev-depth 1
nix-build output -A nodePackages.coffee-script --max-jobs 2
- run:
name: Build a scoped package with scoped circular dependencies
command: |
PATH=$(readlink result)/bin:$PATH
cd $(mktemp -d)
nixfromnpm -o output -p @webassemblyjs/wast-printer --dev-depth 1
nix-build output -A nodePackages.namespaces.webassemblyjs.wast-parser --max-jobs 2
- run:
name: Build package with a namespace
command: |
PATH=$(readlink result)/bin:$PATH
cd $(mktemp -d)
nixfromnpm -o output -p '@types/node'
nix-build output -A nodePackages.namespaces.types.node --max-jobs 2
- run:
name: Build package with a gyp binding
command: |
PATH=$(readlink result)/bin:$PATH
git submodule update --init tests/node-addon-tutorial
PACKAGE_DIR=$PWD/tests/node-addon-tutorial/VectorExample
cd $(mktemp -d)
nixfromnpm -o output -f "$PACKAGE_DIR"
nix-build $PACKAGE_DIR --max-jobs 2
- run:
name: Build package with an optional dependency (that will fail on linux)
command: |
PATH=$(readlink result)/bin:$PATH
cd $(mktemp -d)
nixfromnpm -o output -p '[email protected]'
nix-build output -A nodePackages.sane_2-5-0 --max-jobs 2
- run:
name: Build package which uses an undocumented format for specifying dependencies
command: |
PATH=$(readlink result)/bin:$PATH
cd $(mktemp -d)
nixfromnpm -o output -p deep-diff
nix-build output -A nodePackages.deep-diff --max-jobs 2