32 ms·
I am a nix noob, but we are now using flake[0], I don't know if that helps! [0]: https://app.radicle.xyz/nodes/seed.radicle.xyz/rad:z3gqcJUoA1n9HaHKufZs5FCSGaz
by cloudhead 3y ago
I am a nix noob, but we are now using flake[0], I don't know if that helps!
[0]: https://app.radicle.xyz/nodes/seed.radicle.xyz/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5/tree/flake.nix https://app.radicle.xyz/nodes/seed.radicle.xyz/rad:z3gqcJUoA...
- __MatrixMan__ 3y agoIt would be neat to define the radicle repo as an input to the flake for a project which used radicle, that way you could add it to the devshell and you'd have pinned the version of radicle to your project such that running "nix flake update" updates that project's version of radicle along with updating its other dependencies (this, among other things, is what having a flake.nix at your repo root makes possible). A workflow of this sort doesn't need nixpkgs at all, but it does require that the nix flake input handler knows how to fetch from radicle repos. I'll try it a bit later today, but I'm guessing that this will require a change to nix before it works.
- k8svet 3y agoInteresting. "fetchFromRadicle" would be insanely cool.
- deleted 3y ago[deleted]
- __MatrixMan__ 3y agoIt seems like you can define radicle repos as flake inputs like so: https://gist.github.com/MatrixManAtYrService/b527300542b6fddc60cbd4fd96efd17c https://gist.github.com/MatrixManAtYrService/b527300542b6fdd... Although maybe this approach is cheating because it's relying on https and not some kind of hash-linked P2P magic (which would definitely require modifying nix to make work). I guess there's something similar to the IPFS gateway going on: somebody is hosting a bridge into radicle space. It would be interesting to get this working without dependency on that bridge. Anyhow, modify your project's flake accordingly and your version of `rad` will track with that radicle repo. No curl-to-bash required.
- jbboehr 3y agoIIUC, you should be able to use it with git-remote-rad[0] via builtins.fetchGit. Flakes would probably need upstream support, though. Seems to work for git-remote-hg, anyway: nix-repl> (builtins.fetchGit { url = "hg::https://www.public-software-group.org/mercurial/lfapi/ https://www.public-software-group.org/mercurial/lfapi/"; rev = "34366bf575c8c77c8d3b76d32940c1658cb948a4"; }).outPath "/nix/store/8dwyms22iwy4fq0b1593i34m88jk574j-source" [0]: https://app.radicle.xyz/nodes/seed.radicle.xyz/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5/tree/git-remote-rad.1.adoc https://app.radicle.xyz/nodes/seed.radicle.xyz/rad:z3gqcJUoA...
- chriswarbo 3y agoYeah, Nix's fetchGit just calls out to git; which is great for seamlessly handling weird SSH setups and the like. Nix itself has a plugin mechanism, but its rarely used (since it can harm reproducibility; and TBH that seems to be the only reason to use it, for those very rare situations that it's desirable)
- k8svet 3y agoOf course you are! All the coolest projects are! Thanks, now there's no excuse to not try later!