Skip to content

Commit

Permalink
Actually add the package
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinbayes committed Nov 17, 2024
1 parent f256a60 commit a042504
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ target/
/tmp/
/agentsmith-agent/secret-llm-config.json
/agentsmith-runtime/config.json
/*.snap
50 changes: 50 additions & 0 deletions snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: agentsmith-worker # you probably want to 'snapcraft register <name>'
base: core24 # the base snap is the execution environment for this snap
version: '0.1' # just for humans, typically '1.2+git' or '1.3.2'
summary: Worker for local agentsmith environment.
description: |
The worker is capable of communicating with a server to understand what agent runtime to manage locally
and what work to complete locally using automation.
grade: devel # must be 'stable' to release into candidate/stable channels
confinement: devmode # use 'strict' once you have the right plugs and slots

parts:
agentsmith-worker:
plugin: rust
source: .
build-packages:
# Essential build dependencies
- build-essential
- pkg-config
- libssl-dev
- openssl
- perl # Sometimes needed for OpenSSL build scripts

# Add runtime dependencies
stage-packages:
- libssl3

build-environment:
- PKG_CONFIG_PATH: "/usr/lib/x86_64-linux-gnu/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
- OPENSSL_DIR: "/usr"
- OPENSSL_LIB_DIR: "/usr/lib/x86_64-linux-gnu"
- OPENSSL_INCLUDE_DIR: "/usr/include"
- OPENSSL_STATIC: "false"

override-build: |
export PKG_CONFIG_PATH="/usr/lib/x86_64-linux-gnu/pkgconfig:$PKG_CONFIG_PATH"
cargo build --release --workspace
mkdir -p $CRAFT_PART_INSTALL/bin
cp ./target/release/agentsmith-worker $CRAFT_PART_INSTALL/bin/
apps:
agentsmith-worker:
command: bin/agentsmith-worker
plugs:
- network
- network-bind

0 comments on commit a042504

Please sign in to comment.