Fixes for snap

This commit is contained in:
Miguel Jacq 2025-02-09 17:23:51 +11:00
parent 5f5cc12cb6
commit d55780648d
No known key found for this signature in database
GPG Key ID: 59B3F0C24135C6A9

View File

@ -46,26 +46,8 @@ apps:
LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/usr/local/lib
parts:
onionshare-cli:
source: ./cli
plugin: python
build-packages:
- build-essential
- libssl-dev
- libffi-dev
- python3-dev
- python3-pip
- python3-poetry
- rustc
- cargo
override-pull: |
craftctl default
override-build: |
poetry lock
poetry install
onionshare:
source: ./desktop
source: .
plugin: python
build-packages:
- build-essential
@ -142,12 +124,20 @@ parts:
- libmysqlclient21
- libxcb-cursor0
- libxkbfile1
- libqt6opengl6t64
- libodbc2
override-pull: |
craftctl default
override-build: |
poetry lock
poetry install
after: [onionshare-cli]
chmod 755 /root/parts/onionshare/install/bin/python3
python3 -m venv $CRAFT_PART_INSTALL
. $CRAFT_PART_INSTALL/bin/activate
pip install poetry==2.0.1
cd cli && poetry install
cd ../desktop && poetry install
deactivate
sed -i 's|'$CRAFT_PART_INSTALL'/bin/python3|/usr/bin/env python3|g' $CRAFT_PART_INSTALL/bin/onionshare
sed -i 's|'$CRAFT_PART_INSTALL'/bin/python3|/usr/bin/env python3|g' $CRAFT_PART_INSTALL/bin/onionshare-cli
tor:
source: https://dist.torproject.org/tor-0.4.8.14.tar.gz
@ -208,7 +198,6 @@ parts:
#
cleanup:
after: # Make this part run last; list all your other parts here
- onionshare-cli
- onionshare
- tor
- libevent