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

hoppscotch-community-edition: init at 2024.3.3, add nixos module #317162

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

GetPsyched
Copy link
Member

@GetPsyched GetPsyched commented Jun 4, 2024

Description of changes

Closes #261872

Pushing a boilerplate version of the package and its module here. I have been trying to package the self hosted version of Hoppscotch for a while now but never quite got anywhere. I've made a boilerplate here to gather comments from other maintainers to figure out the miscellaneous issues I've had packaging this.

Packaging

From source

There are 2 major issues with this approach:

  1. No documentation on how to build/package from source.

  2. Upstream uses PNPM which lacks support in nixpkgs. (this should be fixed once pnpm.fetchDeps: init #290715 is merged)

    EDIT: While that's been merged, it still lacks support for monorepos which also unfortunately blocks this PR. Track the issue here: pnpm.configHook / npmHooks.npm{Install,Build}Hook: Support pnpm-workspace.yaml projects #316908

Using Docker

Well, it's Docker. I don't think we should package it this way. Nevertheless, it's an option. Most of my attempts have been to build using Docker but due to the lack of suitable documentation on dockerTools and an inherent skill issue, I haven't been able to package it using Docker.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@GetPsyched
Copy link
Member Author

GetPsyched commented Jun 4, 2024

I will be working on this on and off, while also having some conversations with the upstream devs regarding build instructions. During this time, anyone is welcome to use this boilerplate to try packaging themselves and/or posting their updates here (or in a Discourse thread)

@GetPsyched
Copy link
Member Author

GetPsyched commented Sep 7, 2024

Getting back on packaging this, but have hit some roadblocks. I've commented out most of my main build attempts for anyone to refer, but I'll get back to this once I've heard back from the upstream developers.

EDIT: Upstream developers have confirmed that Hoppscotch is very coupled with Docker making non-Docker builds harder. I could use try using dockerTools to approach this build but I'd rather not. I'll try to hack on this again when I have the time or when the devs give me info on non-Docker builds, whichever happens first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment