-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
snapcraft.yaml
85 lines (74 loc) · 2.42 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
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
name: vale
base: core22
version: 3.8.0
summary: Command-line tool and LSP that brings code-like linting to prose.
description: |
Vale is a command-line tool that brings code-like linting to prose. It's fast,
and highly customizable.
For convenience, this snap also bundles the vale-ls Language Server.
If you store documents on an external USB drive or similar, ensure you
manually connect the removable-media interface after installing the snap:
snap connect vale:removable-media
license: MIT
grade: stable
confinement: strict
environment:
HOME: $SNAP_REAL_HOME
PYTHONHOME: /usr:$SNAP/usr
RUBYLIB: $SNAP/usr/lib/ruby/vendor_ruby/3.0.0:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/ruby/vendor_ruby/3.0.0:$SNAP/usr/lib/ruby/vendor_ruby:$SNAP/usr/lib/ruby/3.0.0:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/ruby/3.0.0
apps:
vale:
command: bin/vale
plugs:
- home
- removable-media
- network # needed for vale sync
- dot-vale
vale-ls:
command: bin/vale-ls
environment:
HOME: $SNAP_REAL_HOME
plugs:
- home
- removable-media
- dot-vale
plugs:
dot-vale:
interface: personal-files
write:
- $HOME/.vale.ini
- $HOME/.local/share/vale
- $HOME/.config/vale
parts:
vale:
plugin: go
source: https://github.com/errata-ai/vale.git
source-tag: v$SNAPCRAFT_PROJECT_VERSION
build-snaps:
- go
vale-ls:
plugin: rust
source: https://github.com/errata-ai/vale-ls.git
source-tag: v0.3.8
asciidoctor:
plugin: nil
stage-packages:
- asciidoctor
override-build: |
set -ex
snapcraftctl build
sed -i '1s|#!/usr/bin/ruby|#!/usr/bin/env ruby|' $SNAPCRAFT_PART_INSTALL/usr/bin/asciidoctor
# don't try and flock() gemspecs since this is blocked by AppArmor - see
# https://github.com/rubygems/rubygems/pull/5278 in particular
# https://github.com/rubygems/rubygems/pull/5278/commits/27b682c81226838b1254ac5843a3f5b1cb20f076
sed -i 's|!solaris_platform|win_platform|' $SNAPCRAFT_PART_INSTALL/usr/lib/ruby/vendor_ruby/rubygems.rb
rst2html:
plugin: nil
stage-packages:
- python3-docutils
override-build: |
set -ex
snapcraftctl build
sed -i "s|'/usr/share/docutils/'|os.path.expandvars('\$SNAP/usr/share/docutils/')|" $SNAPCRAFT_PART_INSTALL/usr/lib/python3/dist-packages/docutils/__init__.py
organize:
usr/share/docutils/scripts/python3: usr/bin