# vim: sts=2 sw=2 et app-id: org.freedesktop.Bustle runtime: org.gnome.Platform runtime-version: "3.28" sdk: org.gnome.Sdk # Use writable-sdk to install Haskell Platform to usr rather than app: # it's only needed to build Bustle, not to run it. All Haskell libraries # and the runtime system are statically linked into the bustle binary. # The only shared library it needs which is not part of the GNOME SDK # is libpcap, which is installed to app. writable-sdk: true command: bustle finish-args: - --socket=x11 - --socket=wayland - --socket=system-bus - --socket=session-bus - --share=ipc # Allow access to dconf. This is nice to have if, for example, you want to be # able to launch the GTK+ Inspector, which is enabled by setting a dconf key. # These four incantations are widely cargo-culted. - --filesystem=xdg-run/dconf - --filesystem=~/.config/dconf:ro - --talk-name=ca.desrt.dconf - --env=DCONF_USER_CONFIG_DIR=.config/dconf # No support for GtkFileChooserNative in gtk2hs, so the options are: # 1. Use hidden GtkFileChooserButtons and fake clicks on them # 2. Just expose the host FS - --filesystem=host build-options: strip: false no-debuginfo: true cleanup: - "*.a" - "*.h" - /share/man/man?/pcap* - /bin/pcap-config modules: # Why not start your day with a 259MB tarball? - name: haskell-platform only-arches: - x86_64 sources: - type: archive url: https://downloads.haskell.org/~platform/8.4.3/haskell-platform-8.4.3-unknown-posix--full-x86_64.tar.gz sha256: 1cea60e382ef54ed328beda344be8ec8430ceef34c52a2a115209d1ddfc2887a # there are no leading compoments in this file; so the default of 1 makes tar silently extract no files! strip-components: 0 - type: file path: activate-hs.patch buildsystem: simple build-commands: # Can't just run install-haskell-platform.sh because it calls # activate-hs which, in its pristine form, explicitly checks # for UID 0. We know better -- we have permission to write # everywhere -- so patch out this check. - tar -C / -xf hp-usr-local.tar.gz - patch /usr/local/haskell/ghc-8.4.3-x86_64/bin/activate-hs activate-hs.patch - /usr/local/haskell/ghc-8.4.3-x86_64/bin/activate-hs --verbose --prefix /usr - name: haskell-platform only-arches: - i386 sources: - type: archive url: https://downloads.haskell.org/~platform/8.4.3/haskell-platform-8.4.3-unknown-posix--full-i386.tar.gz sha256: 1c8d336ebc2bd2bcd1da1887388e85a250f76fff3387d6b4973cac4444b6b308 # there are no leading compoments in this file; so the default of 1 makes tar silently extract no files! strip-components: 0 - type: file path: activate-hs.patch buildsystem: simple build-commands: # Can't just run install-haskell-platform.sh because it calls # activate-hs which, in its pristine form, explicitly checks # for UID 0. We know better -- we have permission to write # everywhere -- so patch out this check. - tar -C / -xf hp-usr-local.tar.gz - patch /usr/local/haskell/ghc-8.4.3-i386/bin/activate-hs activate-hs.patch - /usr/local/haskell/ghc-8.4.3-i386/bin/activate-hs --verbose --prefix /usr # pcap dependencies begin here - name: libpcap sources: - type: archive url: https://www.tcpdump.org/release/libpcap-1.9.0.tar.gz sha256: 2edb88808e5913fdaa8e9c1fcaf272e19b2485338742b5074b9fe44d68f37019 # gtk2hs dependencies begin here - name: haskell-hashtables sources: - type: archive url: https://hackage.haskell.org/package/hashtables-1.2.3.1/hashtables-1.2.3.1.tar.gz sha256: 8fd1c7c77c267eae6af01f1d9ca427754fb092cfffc8041cd50764a9144b3cbe - type: file path: Makefile no-autogen: true - name: haskell-utf8-string sources: - type: archive url: https://hackage.haskell.org/package/utf8-string-1.0.1.1/utf8-string-1.0.1.1.tar.gz sha256: fb0b9e3acbe0605bcd1c63e51f290a7bbbe6628dfa3294ff453e4235fbaef140 - type: file url: https://hackage.haskell.org/package/utf8-string-1.0.1.1/revision/3.cabal dest-filename: utf8-string.cabal sha256: 68cc6cf665e7212334a51b63d6936daeaca023b2cfe8637d130acfe95f91700b - type: file path: Makefile no-autogen: true - name: haskell-gtk2hs sources: # Installing from Git saves us listing each subpackage separately. - type: git url: https://github.com/gtk2hs/gtk2hs # No tags? Great! HEAD as of 2018-07-17 commit: d3d62fbd9460f23559a9ca44637480b9cc773e43 - type: file path: Makefile # Makefile interprets build-% as cabal install % make-args: - build-tools - build-glib - build-gio - build-cairo - build-pango - build-gtk # this is the gtk3 version no-autogen: true # for the man page! - name: help2man sources: - type: archive url: https://ftpmirror.gnu.org/help2man/help2man-1.47.4.tar.xz sha256: d4ecf697d13f14dd1a78c5995f06459bff706fd1ce593d1c02d81667c0207753 build-options: prefix: /usr # https://github.com/flatpak/flatpak-xdg-utils/pull/10 - name: flatpak-xdg-utils sources: - type: git url: https://github.com/flatpak/flatpak-xdg-utils.git commit: a9afa997da8217bd03ece72fd04221d1597acdb3 cleanup: - /bin/xdg-email - /bin/xdg-open # fired up! ready to go! - name: bustle sources: - type: dir path: .. skip: - .cabal-sandbox - cabal.sandbox.config - type: file path: Makefile dest-filename: Makefile-flatpak buildsystem: simple build-commands: - make install PREFIX=/app DESTDIR=/ - make -f Makefile-flatpak EXTRA='--prefix=/app --flags=-hgettext'