Conversation
Exporting the `queryRawRealisation` perl method
Otherwise the raw string `$Nix::Config::storeDir` is returned rather than its value. No idea why, maybe that’s linked to the perl update
| name = "nix-serve-${self.lastModifiedDate}"; | ||
|
|
||
| buildInputs = [ perl nix.perl-bindings perlPackages.Plack perlPackages.Starman perlPackages.DBDSQLite ]; | ||
| buildInputs = [ perl nix.defaultPackage.${super.system}.passthru.perl-bindings perlPackages.Plack perlPackages.Starman perlPackages.DBDSQLite ]; |
There was a problem hiding this comment.
it doesn't seem like super.system is correct. I suppose you meant prev.system?
|
|
||
| if ($path eq "/nix-cache-info") { | ||
| return [200, ['Content-Type' => 'text/plain'], ["StoreDir: $Nix::Config::storeDir\nWantMassQuery: 1\nPriority: 30\n"]]; | ||
| return [200, ['Content-Type' => 'text/plain'], ["StoreDir: /nix/store\nWantMassQuery: 1\nPriority: 30\n"]]; |
There was a problem hiding this comment.
Maybe you could try the following (see also):
| return [200, ['Content-Type' => 'text/plain'], ["StoreDir: /nix/store\nWantMassQuery: 1\nPriority: 30\n"]]; | |
| return [200, ['Content-Type' => 'text/plain'], ["StoreDir: ${Nix::Config::storeDir}\nWantMassQuery: 1\nPriority: 30\n"]]; |
|
I also started adding CI here: #22 |
| { | ||
| inputs.nixpkgs.url = "nixpkgs/nixos-20.09"; | ||
| inputs.nixpkgs.follows = "nix/nixpkgs"; | ||
| inputs.nix.url = "github:nixos/nix/ca/queryRealisation-perl"; |
There was a problem hiding this comment.
This was merged into master now.
|
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? |
|
I am not so happy with the performance of the used http server library yet: yhirose/cpp-httplib#1023 |
|
Ported this to hydra here SuperSandro2000/hydra@9e528b2 @thufschmitt could you finish that anyway just for completeness? |
These days I am just using harmonia: https://github.com/nix-community/harmonia/ |
Add a
/realisationsendpoint to support content-addressed derivations.This required updating Nix (currently using a custom branch even) to access a new
queryRawRealisationperl 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:
/nix-cache-infoendpoint doesn’t properly interpolate the store dir anymorenarinfofiles now have an extra newline at the end, which breaks the Nix parserI’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