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
snipe-it: init at 4.8.0 + module #80037
Conversation
Can you make sure to file some bug reports upstream for the patching you've done? They might have some better tips, or be able to make some improvements to make our task here easier. |
|
||
let | ||
composerDeps = fetchComposer { | ||
inherit name src srcs; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not like inheriting just a subset of args. Just today I had issues with buildGoModule
not responding to postPatch
for the deps
derivation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a composerAttrs
argument that can be used to pass arbitrary attributes to the fetchComposer
derivation.
27e1495
to
78a6a86
Compare
@jtojnar @Ma27 I've responded to your comments above. Unfortunately, as I've now learned that composer isn't deterministic, unless Snipe IT were to ship a release tarball with the vendor directory, I'm not sure how to go about packaging this.
@grahamc I'll do this once this PR is landed and I know if there are any more changes that would be helpful. |
78a6a86
to
7a34fe6
Compare
Nevermind, by adding the lines shown below, I've been able to get composer to be deterministic: |
7a34fe6
to
bee75d8
Compare
So admittedly I just submitted my review after a short look at the changes. Unless someone already did some testing and a closer review this should wait until I managed to take a closer review. Also adding @aanderse to the reviewer's list as he's quite seasoned with php-related stuff here in my experience. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there anyone who feels nix has mature enough infrastructure to ship this application in a robust way? @etu @jtojnar @Ma27
I know we ship other php
applications, but that doesn't actually mean we're doing those applications well. @davidtwco I think you did a great job here and personally I'm hoping to leverage some of what you've done here, but I wonder if this application might be better off in NUR until nix develops some maturity here?
Please keep in mind mine is just one opinion of many, and in no way should be seen as authoritative.
I do not this Nix modules are suitable for this. Without #22067, the module is pretty much useless for anything but the most trivial use case. That is also a reason I am not maintaining selfoss module even though I am upstream developer. |
I think there's a lot of value in having services like this (and the other PHP applications) in nixpkgs. Services like these often aren't trivial as-is to run on NixOS, so any service that can be packaged like this in nixpkgs is one less service that is stopping someone from moving to NixOS and potentially contributing themselves. The primary reason why PHP applications are hard to run on NixOS is that they expect to be able to write to the directory containing the application - I don't think #22067 would be able to fix that - only patches and working with upstream can.
I don't think there's anything about web services like this that are inherently unsuitable for being a NixOS module.
I'd push back on this module being "useless for anything but the most trivial use case". The only limitation that this module imposes over a regular install of Snipe-IT on a traditional distribution is that the application source itself is read-only. I expect that the vast majority of users do not patch or modify Snipe-IT and thus are not at a disadvantage from this - and you can still override the package and add more patches. Every configuration option exposed by Snipe-IT in As far as I can gather, the primary goal of #22067 is to enable modules like this to be written in a web-server agnostic way. While that would be great, and I'd hope that this module could be implemented atop that when/if a solution to #22067 is implemented - I think it's far from true that the module is useless without #22067. |
Signed-off-by: David Wood <david.wood@codeplay.com>
Signed-off-by: David Wood <david.wood@codeplay.com>
Signed-off-by: David Wood <david.wood@codeplay.com>
bee75d8
to
de458a0
Compare
Hello, I'm a bot and I thank you in the name of the community for your contributions. Nixpkgs is a busy repository, and unfortunately sometimes PRs get left behind for too long. Nevertheless, we'd like to help committers reach the PRs that are still important. This PR has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human. If this is still important to you and you'd like to remove the stale label, we ask that you leave a comment. Your comment can be as simple as "still important to me". But there's a bit more you can do: If you received an approval by an unprivileged maintainer and you are just waiting for a merge, you can @ mention someone with merge permissions and ask them to help. You might be able to find someone relevant by using Git blame on the relevant files, or via GitHub's web interface. You can see if someone's a member of the nixpkgs-committers team, by hovering with the mouse over their username on the web interface, or by searching them directly on the list. If your PR wasn't reviewed at all, it might help to find someone who's perhaps a user of the package or module you are changing, or alternatively, ask once more for a review by the maintainer of the package/module this is about. If you don't know any, you can use Git blame on the relevant files, or GitHub's web interface to find someone who touched the relevant files in the past. If your PR has had reviews and nevertheless got stale, make sure you've responded to all of the reviewer's requests / questions. Usually when PR authors show responsibility and dedication, reviewers (privileged or not) show dedication as well. If you've pushed a change, it's possible the reviewer wasn't notified about your push via email, so you can always officially request them for a review, or just @ mention them and say you've addressed their comments. Lastly, you can always ask for help at our Discourse Forum, or more specifically, at this thread or at #nixos' IRC channel. |
I can vouch for the composer support. I've shoehorned it into a flake-managed Laravel project and built a working package and module with it. It's the only solution I've found to do this successfully. To see it in action: Composer build support is sorely missing in the nix ecosystem, I was surprised to find this old PR working fantastically. I can't vouch for the Snipe-it package or module specifically, but the composer support gets my seal of approval for what that's worth. |
I marked this as stale due to inactivity. → More info |
Motivation for this change
Adds a package for Snipe IT.
cc @aanderse (after discussion on Discord)
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)