-
Notifications
You must be signed in to change notification settings - Fork 31
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
first party nix (flake) support #241
base: master
Are you sure you want to change the base?
Conversation
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.
Thanks a lot for the work you've done here!
I have some question related to the changes, but I also have a need to understand a bit for Nix. How does one build RQuickShare using those files?
You're speaking about CI, what's the expected out file format to share or something?
(excuse me but I have absolutely 0 knowledge about Nix... and I need to understand what's in this repository :))
Sure thing! :) As I said it was primarily as a challenge for myself so no bad feelings if you discard this pr :P
Okay, if you want a deeper dive i'm probably not the BEST person to ask, but as a very short introduction.:Nix is a programming language for declarative, reproducible package management. Rust (with its cargo.lock) and pnpm (with its .lock) already have a rather robust approach, but nix will guarantee reproducibility for everything (that might, depending on who you ask, come at the cost of ease of use tho). But there are currently two similar, yet different approaches: the official, default.nix, and the newer, albeit experimental (tho rather field tested and stable no idea why it's still called experimental), flake.nix, way. As you see i'm a friend of the latter as it brings more guarantees and allows for unified standalone 'flake' repos.
Well, for nix users you don't have to do anything, that's partially the point of source based package managers, but the builder (in this case the Hope that helps :D |
Swapping the CI for a nix one (which just installs nix and runs the instructions in the flake via nix build) should be fairly straightforward. If you are interested I could help you with that :) |
Thanks for the explanation! This does seems like it would be useful indeed :) I'm going to merge this once you update the PR to include the link to the PR for Tauri 2 support. |
cool :) the pr was just merged, lemme update this flake to not need my nixpkgs fork anymore, should be ready in ~5min |
Not entirely related, but could the work in this PR be upstreamed to nixpkgs to build from source instead of the current method that wraps the appimage? |
Yeah, thats possible, and I can also do that as well; but tbh I dont know the best strategy to do so as I dont want to simply copy all the logic, I already asked over at discourse But feel free to open the corresponding package request issue over at nixpkgs (and include the discourse link and this pr) so it gets more attention and someone more knowledgeable can tell me the best strategy |
Just curious, what's the implication of upstream Nix for RQuickShare and this PR? Should both coexist or it is not worth it? I'd be happy to merge this if this still has some value (faster update maybe?). |
tbh if you dont plan on using nix yourself and dont want to rely on me for maintaining the nix part of this repo i dont see much benefit besides it beeing easier to use different versions of rquickshare, including -yes- faster (possibly unstable) updates as one can run each and every commit (after the flake was introduced), provided the build instructions dont change (or one of us maintains the nix files to update the build as well). this would in theory be possible with nixpkgs as well, but require some manual overrides inside a file. on the other hand nixpkgs caches all of their builds, so simply running rquickshare the first time is probably faster (if you dont care about the version) when using the nixpkgs package edit: i fear one would need to update the pnpmDeps hash as well as the cargo hash everytime new dependencies are added to pnpm or cargo, which probably happens from time to time and is rather unfortunate |
if you want to merge tho, let me quickly make some changes i used while making it compatible with nixpkgs edit: done ✅ |
Based on what you just said, I think I'd prefer not to move forward with this PR since it will be available upstream. And as you pointed out, I'm not going to use Nix myself and maintaining that would be quite a work to not forget it each time I update deps/add deps, ... :) I'll keep this PR open until it is added upstream so that we don't forget to include it in the README once available. |
I see some NixOS people here, so sorry for hijacking this a bit... but is the current application working for you guys? For me, my computer (NixOS) does show up on my android device, after toggling from "Always visible" to "Hide from everyone", and back to visible. But if I then click on it, my android device loads for a while and then fails with "Failed". I never received anything on the computer. I haven't even gotten it to show up the other way around (Computer -> Android) This is the whole output I'm getting, even after it appeared on my android device, and I pressed the computer:
(me setting the log level seems to also have been a failure ':D) I know this should probably be a separate issue, and I am happy to open one, but I'm really not sure if this is a NixOS problem, or a problem with the package itself. |
solves #54
i already tried that way back, but now that i understand nix' inner workings much better i though i'll give my previously failed missions another shot. and it worked, whoop whoop.
as nixpkgs already has rquickshare available, feel free to close this pr.
i just wanted to do this as a challenge. But it has two major differences to the variant in nixpkgs:
but if you dont want to see any nix in your repo, sure thing, just close this PR, no worries :) maybe ill try to add it to nixpkgs then