snapcraft.yaml 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. apps:
  27. daemon:
  28. daemon: simple
  29. command: lib/node_modules/code-server/node_modules/.bin/code-server
  30. command-chain:
  31. - env/env-wrapper
  32. plugs:
  33. - network
  34. - network-bind
  35. code-server:
  36. command: lib/node_modules/code-server/node_modules/.bin/code-server
  37. command-chain:
  38. - env/env-wrapper
  39. plugs:
  40. - network
  41. - network-bind
  42. plugs:
  43. vscs-content:
  44. interface: content
  45. target: $SNAP_DATA/plugged
  46. parts:
  47. code-server:
  48. after: [nodejs]
  49. plugin: nil
  50. build-packages:
  51. - build-essential
  52. - pkg-config
  53. - python3
  54. override-build: |
  55. yarn add code-server && mkdir -p $SNAPCRAFT_PART_INSTALL/lib/node_modules \
  56. && cp --archive --link --no-dereference $SNAPCRAFT_PART_BUILD \
  57. $SNAPCRAFT_PART_INSTALL/lib/node_modules/code-server \
  58. override-prime: |
  59. snapcraftctl set-version "$(yarn info code-server version | tail -n2 | head -n1)"
  60. snapcraftctl prime
  61. dependencies:
  62. plugin: nil
  63. stage-packages:
  64. - git
  65. env-wrapper:
  66. plugin: dump
  67. source: src/
  68. nodejs:
  69. plugin: dump
  70. source:
  71. - on amd64: https://nodejs.org/dist/v14.17.6/node-v14.17.6-linux-x64.tar.gz
  72. - on arm64: https://nodejs.org/dist/v14.17.6/node-v14.17.6-linux-arm64.tar.gz
  73. - on armhf: https://nodejs.org/dist/v14.17.6/node-v14.17.6-linux-armv7l.tar.gz
  74. override-stage: |
  75. npm install -g yarn
  76. snapcraftctl stage
  77. organize:
  78. '*.md' : nodejs/
  79. LICENSE : nodejs/
  80. prime:
  81. - -include
  82. - -share