Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support snap package on Linux #672

Closed
om26er opened this issue Apr 17, 2018 · 9 comments · Fixed by #1103
Closed

Support snap package on Linux #672

om26er opened this issue Apr 17, 2018 · 9 comments · Fixed by #1103
Assignees

Comments

@om26er
Copy link
Contributor

om26er commented Apr 17, 2018

A ‘snap’ is a universal Linux package https://www.ubuntu.com/desktop/snappy, they are especially useful on servers (on desktops too), where they allow to install apps quickly with a single command and in an isolated way.

There is a supporting service build.snapcraft.io, which allows for automatic builds of the source whenever anything changes on a github repo.

I have done initial packaging and it seems to work fine. Below example shows how simple (and readable) the build config will be, if you decide to publish httpie as snap.

name: httpie
version: '0.9.9'
summary: HTTPie - a CLI, cURL-like tool for humans.
description: |
  HTTPie (pronounced aitch-tee-tee-pie) is a command line HTTP client.
  Its goal is to make CLI interaction with web services as human-friendly as possible.
  It provides a simple http command that allows for sending arbitrary HTTP requests
  using a simple and natural syntax, and displays colorized output.

   HTTPie can be used for testing, debugging, and generally interacting with HTTP servers.

grade: devel
confinement: strict

parts:
  httpie:
    plugin: python
    source: https://github.com/jakubroztocil/httpie.git

apps:
  http:
    command: http
    plugs:
      - home
      - network
@sigmavirus24
Copy link

#561

@om26er
Copy link
Contributor Author

om26er commented Apr 23, 2019

I have updated the packaging to be a little more slick. In case its needed, I am willing to help with the maintenance of the snap package at least for the first few months.

name: httpie
base: core18
version: git
summary: HTTPie - a CLI, cURL-like tool for humans.
description: |
  HTTPie (pronounced aitch-tee-tee-pie) is a command line HTTP client.
  Its goal is to make CLI interaction with web services as human-friendly as possible.
  It provides a simple http command that allows for sending arbitrary HTTP requests
  using a simple and natural syntax, and displays colorized output.

   HTTPie can be used for testing, debugging, and generally interacting with HTTP servers.

grade: stable
confinement: strict

parts:
  httpie:
    plugin: python
    source: .
    override-prime: |
      snapcraftctl prime
      echo "Compiling pyc files..."
      $SNAPCRAFT_PART_INSTALL/usr/bin/python3 -m compileall -q $SNAPCRAFT_PRIME

apps:
  http:
    command: http
    plugs:
      - home
      - network

@tiagomsmagalhaes
Copy link

@om26er why does the snap have a different name, httpee?

@om26er
Copy link
Contributor Author

om26er commented Jan 7, 2020

@om26er why does the snap have a different name, httpee?

thats because the name http and httpie was already taken, so for testing purposes I uploaded using the alternate name. Note: I am not associated with httpie project so thats unofficial.

@tiagomsmagalhaes
Copy link

tiagomsmagalhaes commented Jan 7, 2020

is httpie still taken on snapcraft?

http snap resolves to another wrapper whose repo is here https://github.com/chipaca/httpie-snap but seems abandoned

@om26er
Copy link
Contributor Author

om26er commented Jan 7, 2020

If this project wants, we could claim that back no problem. I could even help with that. So we could claim both httpie and http. So a user install snap would run snap install httpie and the commandline would be http.

Could the maintainers please comment ^

@BoboTiG
Copy link
Contributor

BoboTiG commented Jun 30, 2021

Hello,

We reclaimed httpie for a good start. When the package will be online we will see how to handle other packages.

Thank you all for your patience :)

@BoboTiG
Copy link
Contributor

BoboTiG commented Sep 10, 2021

A small news for all Linux folks: sudo snap install httpie is now working ;)
It will make http & https commands available out-of-the-box.

@jkbrzt
Copy link
Member

jkbrzt commented Sep 10, 2021

Oh snap!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants