snapcraft.yaml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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 deamon or root user, and not when executing `code-server` as a
  22. normal user.
  23. licence: MIT
  24. grade: devel # must be 'stable' to release into candidate/stable channels
  25. confinement: strict # use 'strict' once you have the right plugs and slots
  26. architectures:
  27. - build-on: amd64
  28. - build-on: arm64
  29. - build-on: armhf
  30. apps:
  31. daemon:
  32. daemon: simple
  33. command: lib/node_modules/code-server/node_modules/.bin/code-server
  34. command-chain:
  35. - env/env-wrapper
  36. plugs:
  37. - network
  38. - network-bind
  39. code-server:
  40. command: lib/node_modules/code-server/node_modules/.bin/code-server
  41. command-chain:
  42. - env/env-wrapper
  43. plugs:
  44. - network
  45. - network-bind
  46. plugs:
  47. vscs-content:
  48. interface: content
  49. target: $SNAP_DATA/plugged
  50. parts:
  51. code-server:
  52. after: [nodejs]
  53. plugin: nil
  54. build-packages:
  55. - build-essential
  56. - pkg-config
  57. - python3
  58. override-build: |
  59. yarn add code-server && mkdir -p $SNAPCRAFT_PART_INSTALL/lib/node_modules \
  60. && cp --archive --link --no-dereference $SNAPCRAFT_PART_BUILD \
  61. $SNAPCRAFT_PART_INSTALL/lib/node_modules/code-server \
  62. override-prime: |
  63. snapcraftctl set-version "$(yarn info code-server version | tail -n2 | head -n1)"
  64. snapcraftctl prime
  65. dependencies:
  66. plugin: nil
  67. stage-packages:
  68. - git
  69. env-wrapper:
  70. plugin: dump
  71. source: src/
  72. nodejs:
  73. plugin: dump
  74. source:
  75. - on amd64: https://nodejs.org/dist/v14.17.6/node-v14.17.6-linux-x64.tar.gz
  76. - on arm64: https://nodejs.org/dist/v14.17.6/node-v14.17.6-linux-arm64.tar.gz
  77. - on armhf: https://nodejs.org/dist/v14.17.6/node-v14.17.6-linux-armv7l.tar.gz
  78. override-stage: |
  79. npm install -g yarn
  80. snapcraftctl stage
  81. organize:
  82. '*.md' : nodejs/
  83. LICENSE : nodejs/
  84. prime:
  85. - -include
  86. - -share