IssueRaiser

Nix and IPFS

(I wanted to split this thread from https://github.com/NixOS/nix/issues/296#issuecomment-200603550 .) Let's discuss relations with [IPFS](https://ipfs.io) here. As I see it, mainly a decentralized way to distribute nix-stored data would be appreciated. ##### What we might start with The easiest usable step might be to allow distribution of fixed-output derivations over IPFS. That are paths that already _are_ content-addressed, typically by (truncated) sha256 over either a flat file or a tar-like dump of a directory tree; more details are [in the docs](http://nixos.org/nix/manual/#fixed-output-drvs). These paths are mainly used for compressed tarballs of sources. This step itself should avoid lots of problems with unstable upstream downloads, assuming we could convince enough nixers to serve their files over IPFS. ##### Converting hashes One of the difficulties is that we use different kinds of hashing than in IPFS, and I don't think it would be good to require converting those many thousands of hashes in our expressions. (Note that it's infeasible to convert among those hashes unless you have the whole content.) IPFS people might best suggest how to work around this. I imagine we want to "serve" a mapping from the hashes we use to the IPFS's hashes, perhaps realized through IPNS. (I don't know details of IPFS's design, I'm afraid.) There's an advantage that one can easily verify the nix-style hash in the end after obtaining the paths in any way. ##### Non-fixed content If

Posted by vcunat on Mar 24, 2016, 10:10 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.5,000 issues0 comments

github (Software)

Nix and IPFS

vcunatMar 24, 2016, 10:10 AM

(I wanted to split this thread from https://github.com/NixOS/nix/issues/296#issuecomment-200603550 .) Let's discuss relations with [IPFS](https://ipfs.io) here. As I see it, mainly a decentralized way to distribute nix-stored data would be appreciated. ##### What we might start with The easiest usable step might be to allow distribution of fixed-output derivations over IPFS. That are paths that already _are_ content-addressed, typically by (truncated) sha256 over either a flat file or a tar-like dump of a directory tree; more details are [in the docs](http://nixos.org/nix/manual/#fixed-output-drvs). These paths are mainly used for compressed tarballs of sources. This step itself should avoid lots of problems with unstable upstream downloads, assuming we could convince enough nixers to serve their files over IPFS. ##### Converting hashes One of the difficulties is that we use different kinds of hashing than in IPFS, and I don't think it would be good to require converting those many thousands of hashes in our expressions. (Note that it's infeasible to convert among those hashes unless you have the whole content.) IPFS people might best suggest how to work around this. I imagine we want to "serve" a mapping from the hashes we use to the IPFS's hashes, perhaps realized through IPNS. (I don't know details of IPFS's design, I'm afraid.) There's an advantage that one can easily verify the nix-style hash in the end after obtaining the paths in any way. ##### Non-fixed content If

Comments (0)

No comments yet. Start the discussion.

Comment on this issue