tazjin/nixery

nix-1p documentation page is impure

mikepurvis opened this issue · 3 comments

Noted in #155 (comment), but this fetch is currently impure, which make it a hassle to build Nixery as a flake:

nixery/default.nix

Lines 28 to 33 in 644521d

# If Nixery is built outside of depot, it needs to dynamically fetch
# the current nix-1p.
nix-1p-git = builtins.fetchGit {
url = "https://code.tvl.fyi/depot.git:/nix/nix-1p.git";
ref = "canon";
};

Would we consider locking the nix-1p version to a tag or commit and including the hash for it there?

Alternatively, could we move nix-1p = depot.nix.nix-1p or nix-1p-git; up to the arguments for the top-level function, so that a caller could pass in a specific instance? Basically it would end up being like:

{ depot ? { nix.readTree.drvTargets = x: x; }
, pkgs ? import <nixpkgs> { }
, preLaunch ? ""
, extraPackages ? [ ]
, maxLayers ? 20
, commitHash ? null
, nix-1p ? depot.nix.nix-1p or builtins.fetchGit {
    url = "https://code.tvl.fyi/depot.git:/nix/nix-1p.git";
    ref = "canon";
  }
, ...
}@args:

I think what I'd actually like to do is drop the current page that Nixery serves completely (this mdbook stuff with nix-1p etc.), and just drop a simple HTML file in there with a landing page that users can override.

Cool cool— yeah, I don't have any particular attachment to a solution other than it being something that can be built in pure mode.

We're replacing the mdbook stuff and nix-1p inclusion with a simple static page here: https://cl.tvl.fyi/c/depot/+/6930

(Note: If you have any comments on that commit you can log in to our Gerrit using Github OAuth, but we've had a few reports from people logging in with Github that they get a strange error message on the first login and it works on the second one - we're just not able to prioritise looking into that right now. You don't need to do anything though, this will percolate through eventually)