Skip to content

Commit

Permalink
Merge pull request #741 from NickvisionApps/snap
Browse files Browse the repository at this point in the history
build `blueprint-compiler` from source
  • Loading branch information
nlogozzo authored Nov 17, 2023
2 parents 22d0ef3 + c8f9a57 commit 88a0ec4
Showing 1 changed file with 23 additions and 8 deletions.
31 changes: 23 additions & 8 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,35 @@
name: denaro # you probably want to 'snapcraft register <name>'
base: core22 # the base snap is the execution environment for this snap
name: denaro
base: core22
adopt-info: denaro
source-code: https://github.com/nlogozzo/NickvisionMoney
issues: https://github.com/nlogozzo/NickvisionMoney/issues
grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots
grade: stable
confinement: strict
architectures:
- build-on: amd64
- build-on: arm64
- build-on: armhf

parts:
# When the snap of `blueprint-compiler` comes up, we can remove this part upto L21
blueprint-compiler:
source: https://gitlab.gnome.org/jwestman/blueprint-compiler.git
source-tag: 'v0.10.0'
plugin: meson
meson-parameters:
- --prefix=/usr
override-prime: ''
denaro:
# See 'snapcraft plugins'
plugin: nil
source: .
build-packages:
after: # remove this and next line too when the snap of `blueprint-compiler` comes up
- blueprint-compiler
plugin: nil
source: .
#build-environment:
# - PYTHONPATH: $CRAFT_STAGE/usr/lib/python3/dist-packages:$PYTHONPATH
# - GI_TYPELIB_PATH: /snap/gnome-42-2204-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET/girepository-1.0:/snap/gnome-42-2204-sdk/current/usr/lib/girepository-1.0
#build-snaps: # when available
#- blueprint-compiler
build-packages:
- wget
override-pull: |
craftctl default
Expand All @@ -27,6 +40,8 @@ parts:
override-build: |
export DOTNET_ROOT=$HOME/.dotnet
export PATH=$PATH:$HOME/.dotnet:$HOME/.dotnet/tools:$HOME/.cargo/bin
export PYTHONPATH=$CRAFT_STAGE/usr/lib/python3/dist-packages:$PYTHONPATH
export GI_TYPELIB_PATH=/snap/gnome-42-2204-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET/girepository-1.0:/snap/gnome-42-2204-sdk/current/usr/lib/girepository-1.0
cd $CRAFT_PART_SRC
dotnet tool restore
dotnet cake --target=Publish --prefix=/snap/denaro/current/usr --ui=gnome --self-contained
Expand Down

0 comments on commit 88a0ec4

Please sign in to comment.