-
Notifications
You must be signed in to change notification settings - Fork 543
/
Copy pathsandstorm-pkgdef.capnp
122 lines (102 loc) · 4.54 KB
/
sandstorm-pkgdef.capnp
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
@0xf743d7c210e66991;
using Spk = import "/sandstorm/package.capnp";
# This imports:
# $SANDSTORM_HOME/latest/usr/include/sandstorm/package.capnp
# Check out that file to see the full, documented package definition format.
const pkgdef :Spk.PackageDefinition = (
# The package definition. Note that the spk tool looks specifically for the
# "pkgdef" constant.
id = "a0n6hwm32zjsrzes8gnjg734dh6jwt7x83xdgytspe761pe2asw0",
# Your app ID is actually its public key. The private key was placed in
# your keyring. All updates must be signed with the same key.
manifest = (
# This manifest is included in your app package to tell Sandstorm
# about your app.
appVersion = 201702210, # Increment this for every release.
appTitle = (defaultText = "EtherCalc"),
appMarketingVersion = (defaultText = "2017.02.21.0"),
actions = [
# Define your "new document" handlers here.
( title = (defaultText = "New EtherCalc Spreadsheet"),
nounPhrase = (defaultText = "spreadsheet"),
command = .myContinueCommand
# The command to run when starting for the first time. (".myCommand"
# is just a constant defined at the bottom of the file.)
)
],
continueCommand = .myContinueCommand,
# This is the command called to start your app back up after it has been
# shut down for inactivity. Here we're using the same command as for
# starting a new instance, but you could use different commands for each
# case.
metadata = (
icons = (
appGrid = (svg = embed "app-graphics/ethercalc-128.svg"),
grain = (svg = embed "app-graphics/ethercalc-24.svg"),
market = (svg = embed "app-graphics/ethercalc-150.svg"),
),
website = "http://ethercalc.net/",
codeUrl = "https://github.com/audreyt/ethercalc",
license = (openSource = cpal),
categories = [office, productivity],
author = (
contactEmail = "audreyt@audreyt.org",
pgpSignature = embed "pgp-signature",
upstreamAuthor = "Audrey Tang",
),
pgpKeyring = embed "pgp-keyring",
description = (defaultText = embed "DESCRIPTION.mkdn"),
shortDescription = (defaultText = "Multi-user Spreadsheet"),
screenshots = [
(width = 478, height = 298, png = embed "static/img/davy/gfx/screenshot.png")
],
changeLog = (defaultText = embed "CHANGELOG.mkdn"),
),
),
sourceMap = (
# Here we defined where to look for files to copy into your package. The
# `spk dev` command actually figures out what files your app needs
# automatically by running it on a FUSE filesystem. So, the mappings
# here are only to tell it where to find files that the app wants.
searchPath = [
( sourcePath = "." ), # Search this directory first.
( sourcePath = "/", # Then search the system root directory.
hidePaths = [ "home", "proc", "sys" ]
# You probably don't want the app pulling files from these places,
# so we hide them. Note that /dev, /var, and /tmp are implicitly
# hidden because Sandstorm itself provides them.
)
]
),
fileList = "sandstorm-files.list",
# `spk dev` will write a list of all the files your app uses to this file.
# You should review it later, before shipping your app.
alwaysInclude = [],
# Fill this list with more names of files or directories that should be
# included in your package, even if not listed in sandstorm-files.list.
# Use this to force-include stuff that you know you need but which may
# not have been detected as a dependency during `spk dev`. If you list
# a directory here, its entire contents will be included recursively.
bridgeConfig = (
viewInfo = (
permissions = [(name = "modify", title = (defaultText = "modify"),
description = (defaultText = "allows modifying the spreadsheet"))],
roles = [(title = (defaultText = "editor"),
permissions = [true],
verbPhrase = (defaultText = "can edit"),
default = true),
(title = (defaultText = "viewer"),
permissions = [false],
verbPhrase = (defaultText = "can view"))]
)
)
);
const myContinueCommand :Spk.Manifest.Command = (
# Here we define the command used to start up your server.
argv = ["/sandstorm-http-bridge", "33411", "--", "./run_grain.sh"],
environ = [
# Note that this defines the *entire* environment seen by your app.
(key = "PATH", value = "/usr/local/bin:/usr/bin:/bin"),
(key = "OPENSHIFT_DATA_DIR", value = "/var"),
]
);