edolstra / nix-serve

A standalone Nix binary cache server
GNU Lesser General Public License v2.1
174 stars 37 forks source link

ca-derivations support #21

Open thufschmitt opened 3 years ago

thufschmitt commented 3 years ago

Add a /realisations endpoint to support content-addressed derivations.

This required updating Nix (currently using a custom branch even) to access a new queryRawRealisation perl function that’s needed for that.

As part of this, I also had to upgrade nixpkgs to match the one used by the Nix flake, which caused an update of perl which in turn broke things:

I’ll try to build everything with the old nixpkgs, seeing whether that fixes the issues for the time being

Fix #20

/cc @Mic92 @zseri @SuperSandro2000

Mic92 commented 3 years ago

I also started adding CI here: https://github.com/edolstra/nix-serve/pull/22

thufschmitt commented 3 years ago

Just saw the rewrite at https://github.com/Mic92/nix-serve , which seems to be a much nicer alternative. @Mic92 do you need any help with it?

Mic92 commented 3 years ago

I am not so happy with the performance of the used http server library yet: https://github.com/yhirose/cpp-httplib/issues/1023 It's probably faster than the current perl implementation... I am currently rewriting this using libh2o, which gives me also http2 - none of the c++ libraries I found support chunking, which is needed for large nars.

SuperSandro2000 commented 11 months ago

Ported this to hydra here https://github.com/SuperSandro2000/hydra/commit/9e528b2faee8a2bcdb25290ff4fcbc0423c9fbd2

@thufschmitt could you finish that anyway just for completeness?

Mic92 commented 11 months ago

I am not so happy with the performance of the used http server library yet: yhirose/cpp-httplib#1023 It's probably faster than the current perl implementation... I am currently rewriting this using libh2o, which gives me also http2 - none of the c++ libraries I found support chunking, which is needed for large nars.

These days I am just using harmonia: https://github.com/nix-community/harmonia/