NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.36k stars 14.31k forks source link

Package request: Passbolt #227484

Open stnert opened 1 year ago

stnert commented 1 year ago

Project description: Passbolt is an open source password manager for teams. It allows you to securely share and store credentials. For instance, the wifi password of your office, the administrator password of a router or your organization's social media account passwords, all of them can be secured using passbolt.

Metadata

homepage URL: https://www.passbolt.com/pricing/pro source URL: https://github.com/passbolt/passbolt_api license: AGPL-3.0 license platforms: Linux, Cloud Providers

AkechiShiro commented 9 months ago

Hi @stnert I've started packaging Passbolt however I will probably need some time in order to make it well polished, right now the package is more an unusable draft rather than something that can be used.

I'm still figuring things out.

pbek commented 7 months ago

I also added https://github.com/NixOS/nixpkgs/pull/304480 for go-passbolt-cli, if someone wants to test.

adam248 commented 2 months ago

@AkechiShiro any update on this? i see you do have a draft here:

https://github.com/AkechiShiro/nixpkgs/blob/079aaa342e5a089cf9a5b17f7427881f394ec762/pkgs/by-name/pa/passbolt/package.nix

I haven't packaged a service for nixpkgs with options before so I am not sure how to do that. I am just making the link to your work available for others to try out and review as I would hate to see your work go to waste. I hope you don't mind. Thanks

AkechiShiro commented 2 months ago

@adam248 Hello,

I didn't PR it because the package doesn't build, I haven't figured out how to fix the build, afterwards adding options would be writing a nix module, I haven't done any yet too.

adam248 commented 2 months ago

I have reached out to the passbolt community to see if any dev is willing to come over here and discuss.

https://community.passbolt.com/t/unique-problem-packaging-trouble-for-nixos/10856

DasenB commented 2 weeks ago

@AkechiShiro Could you explain a bit what problems occur during building? I tried to build your package using nix-build -E 'with import <nixpkgs> {}; callPackage ./passbolt.nix {}' and it worked. It produced some warnings along the way but the the build finished and created a result directory with a bunch of binaries and php files.

WARNING: composer files validation failed

The validation of the composer.json and composer.lock failed.
Make sure that the file composer.lock is consistent with composer.json.

This often indicates an issue with the upstream project, which can typically be resolved by reporting the issue to the relevant project maintainers.

To address the issue efficiently, follow one of these steps:
  1. File an issue in the project's issue tracker with detailed information (run 'composer update --lock --no-install' to fix the issue), and apply any available remote patches as a temporary solution with (with fetchpatch).
  2. If an immediate fix is needed or if reporting upstream isn't suitable, develop a temporary local patch.

This check is not blocking, but it is recommended to fix the issue.

The comment in your package.nix indicates that this is the problem. I do not know much about php and composer but maybe we can just ignore that as a project specific oddity?

AkechiShiro commented 2 weeks ago

You are correct, this was however failing before I believe, I've just tried using 4.9.1 and the package does build

DasenB commented 2 weeks ago

I did a bit more testing. For me both 4.5.2 and 4.9.1 build after only changing the version number. Not even the hashes had to be changed. How is that even possible?!

AkechiShiro commented 2 weeks ago

Hm not sure but on my side I had to change the hashes @DasenB

Maybe build using an empty hash and you should see it will fail with a new hash.

EDIT : Moved details/errors and logs to the PR

EDIT 2 : @adam248 I've made some progress but I doubt I can do more without help from passbolt devs on the last comment I've left in the PR.