snapcraft.yaml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. name: code-server
  2. base: core20
  3. adopt-info: code-server
  4. summary: Run VS Code on any machine anywhere and access it in the browser.
  5. description: |
  6. - Code on any device with a consistent development environment
  7. - Use cloud servers to speed up tests, compilations, downloads, and more
  8. - Preserve battery life when you're on the go; all intensive tasks run on your server
  9. **NOTE!** This is an early release of `code-server`. The whole package might change.
  10. Use at your own risk.
  11. **DISCLAIMER** The developer of this package is not affiliated or closely associated
  12. with Coder Tech. Inc., the developers behind `code-server`. However we try to keep it
  13. as close to original as possible, with the limitations a (strictly confined) snap will
  14. give.
  15. **Plugs**
  16. - vscs-content: Connect other snap pacakges to this package, e.g
  17. ```
  18. sudo snap connect code-server:vscs-content home-assistant-snap:configurations
  19. ```
  20. Make configurations of Home Assistant available in `code-server`, but this is only
  21. available for the daemon or root user, and not when executing `code-server` as a
  22. normal user.
  23. **Documentation?**
  24. https://coder.com/docs/code-server/v3.12.0
  25. **Something doesn't work?**
  26. https://github.com/home-assistant-snap/code-server/issues
  27. Feel free to help out and PR :)
  28. license: MIT
  29. grade: devel # must be 'stable' to release into candidate/stable channels
  30. confinement: strict # use 'strict' once you have the right plugs and slots
  31. architectures:
  32. - build-on: amd64
  33. - build-on: arm64
  34. - build-on: armhf
  35. apps:
  36. daemon:
  37. daemon: simple
  38. command: lib/node_modules/code-server/node_modules/.bin/code-server
  39. command-chain:
  40. - env/env-wrapper
  41. plugs:
  42. - home
  43. - network
  44. - network-bind
  45. code-server:
  46. command: lib/node_modules/code-server/node_modules/.bin/code-server
  47. command-chain:
  48. - env/env-wrapper
  49. plugs:
  50. - home
  51. - network
  52. - network-bind
  53. plugs:
  54. vscs-content:
  55. interface: content
  56. target: $SNAP_COMMON/plugged
  57. parts:
  58. code-server:
  59. after: [nodejs]
  60. plugin: nil
  61. build-packages:
  62. - build-essential
  63. - pkg-config
  64. - python3
  65. override-build: |
  66. yarn add code-server && mkdir -p $SNAPCRAFT_PART_INSTALL/lib/node_modules \
  67. && cp --archive --link --no-dereference $SNAPCRAFT_PART_BUILD \
  68. $SNAPCRAFT_PART_INSTALL/lib/node_modules/code-server \
  69. override-prime: |
  70. snapcraftctl set-version "$(yarn info code-server version | tail -n2 | head -n1)"
  71. snapcraftctl prime
  72. dependencies:
  73. plugin: nil
  74. stage-packages:
  75. - git
  76. - openssh-client
  77. env-wrapper:
  78. plugin: dump
  79. source: src/
  80. nodejs:
  81. plugin: dump
  82. source:
  83. - on amd64: https://nodejs.org/dist/v14.17.6/node-v14.17.6-linux-x64.tar.gz
  84. - on arm64: https://nodejs.org/dist/v14.17.6/node-v14.17.6-linux-arm64.tar.gz
  85. - on armhf: https://nodejs.org/dist/v14.17.6/node-v14.17.6-linux-armv7l.tar.gz
  86. override-stage: |
  87. npm install -g yarn
  88. snapcraftctl stage
  89. organize:
  90. '*.md' : nodejs/
  91. LICENSE : nodejs/
  92. prime:
  93. - -include
  94. - -share