Skip to content

Support for decentralization #41

Closed

Description

@iljah

Currently nix expressions can only refer to paths on the file system. It would be interesting if nix would also support fetching expressions from arbitrary (web) sources. With digital signatures it would be as secure as it currently is. Could the format be as simple as
aria2 = callPackage http://www.nixos.org/.../aria2 { };
in all-packages.nix instead of
aria2 = callPackage ../tools/networking/aria2 { };
?

0install is an example of how useful this is at least (http://0install.net/comparison.html).

Activity

  1. shlevy commented on Aug 26, 2012

    @shlevy
    Member

    @iljah Something similar to this is already possible. If a derivation (which, if it's a fixed-output derivation like fetchurl, can pull things from anywhere on the web) produces a nix expression, that expression can be imported from. There are some issues which make this feature undesirable in nixpkgs (for the moment, at least), but you can use it in your own expressions already.

  2. domenkozar commented on Jun 3, 2016

    @domenkozar
    Member

    Now that we have builtins.fetchTarball and builtins.fetchurl this is implemented.

  3. added a commit that references this issue on Aug 28, 2020
  4. added a commit that references this issue on Mar 5, 2025
  5. added a commit that references this issue on Jul 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions