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
radicle-upstream: init at 0.1.5 #105674
radicle-upstream: init at 0.1.5 #105674
Conversation
Can we get rid of this trough patching? |
pkgs/applications/version-management/git-and-tools/radicle-upstream/default.nix
Outdated
Show resolved
Hide resolved
pkgs/applications/version-management/git-and-tools/radicle-upstream/default.nix
Show resolved
Hide resolved
pkgs/applications/version-management/git-and-tools/radicle-upstream/default.nix
Outdated
Show resolved
Hide resolved
You mean patching |
Hej, to clarify: The local state radicle maintains has a certain layout and shape, so whenever you do any git operation on it, it needs some translation which Let me know if there are other questions about its internals. |
From a cursory look, it seems that other packages are building electron apps with something like this: nativeBuildInputs = [ makeWrapper ];
postInstall = ''
makeWrapper '${electron}/bin/electron' "$out/bin/application-name" \
--add-flags "$out/share/path-to-application"
''; Here's a full example: element-desktop Could you try building from source using a similar approach? Building from source would be beneficial because it would make this package available for platforms other than |
I gave a stab at packaging Radicle from source but it's currently not possible because it uses unstable rust features. I have my branch here: https://github.com/adisbladis/nixpkgs/tree/radicle-src. We should nudge upstream to stop using unstable features and make it possible to compile Radicle with a stable rust compiler. |
There's no way to use rust nightly for a package? |
Hey sorry, I spaced out on this a little. I've been working on a from source package, I just pushed what I have so far. There are two issues remaining:
oh, and I also bumped the package to the just released |
0506d5b
to
2f35a22
Compare
The unstable features used are very unstable (as in may cause UB on some versions of the compiler), I would be wary of attempting to compile a package using anything other than the exact nightly compiler specified in the |
If you share the failing test cases with the exact output I can help shed some light on it. |
@midchildan @adisbladis it seems that an appimage build with patched binaries is the way forward here. If you agree I'll revert to that? Also as a side note I don't understand the |
It's ok with me. I appreciate your effort. Could you add also add a comment explaining why source builds are currently not possible with a link to this PR?
Perhaps the test is attempting a network request? Would it be possible to eventually remove unstable rust features? If so, I think it's best if we create a new issue upstream so that we could switch to doing source builds when it's ready. |
@xwvvvvwx I absolutely agree, let's not let perfect be the enemy of good. We can always fix a source build at a later stage. |
2f35a22
to
778fc5d
Compare
pushed a tweaked version of the patched appimage based package. In this version of the package, I just drop the I could also patch the |
I think having this preinstalled for now is great. |
I too think that we should keep it as is. Binary patching should be avoided as much as possible because it would require quite a lot more work to upgrade packages on a regular basis. This could solved more cleanly by submitting a PR upstream to suppress the message if |
pkgs/applications/version-management/git-and-tools/radicle-upstream/default.nix
Outdated
Show resolved
Hide resolved
pkgs/applications/version-management/git-and-tools/radicle-upstream/default.nix
Outdated
Show resolved
Hide resolved
rebased on master and addressed review comments. |
778fc5d
to
435d701
Compare
435d701
to
9062c1e
Compare
Nice! So exited to test this! |
Motivation for this change
Adds a package for the
radicle-upstream
p2p code collaboration client (homepage).Some notes:
This is an electron app bundled as an appimage. I just downloaded the appimage directly from the releases site. My understanding is that the infra for from source builds of electron apps doesn't really exist in nixpkgs atm, so this is an acceptable practice. Happy to put together a from source build if there are some nice examples I can copy.
The package here is a little dirty because
radicle-upstream
drops a git helpergit-remote-rad
into the users home directory. This is a dynamically linked binary, so I needed to open up the appimage andpatchelf
it before bulding the final wrapped appimage. In the future it might make sense to add a seperate package for thegit-remote-rad
helper and allow interaction with the radicle network without the UI. I kept them together for now as it allows the simplest installation experience (a single package), and the git helper can't publish to the network without the UI running at the moment anyway, so it's currently not very useful by itself.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)