about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--nix/nix-1p/default.nix5
-rw-r--r--tools/nixery/default.nix5
-rw-r--r--tools/nixery/docs/default.nix10
3 files changed, 9 insertions, 11 deletions
diff --git a/nix/nix-1p/default.nix b/nix/nix-1p/default.nix
index cd1af92d83..6cc71b9548 100644
--- a/nix/nix-1p/default.nix
+++ b/nix/nix-1p/default.nix
@@ -4,8 +4,9 @@
 # This file configures TVL CI to mirror the subtree to GitHub.
 { depot ? { }, pkgs ? import <nixpkgs> { }, ... }:
 
-(pkgs.runCommandLocal "nix-1p.md" { } ''
-  cp ${./README.md} $out
+(pkgs.runCommandLocal "nix-1p" { } ''
+  mkdir $out
+  cp ${./README.md} $out/README.md
 '').overrideAttrs (_: {
   meta.ci.extraSteps.github = depot.tools.releases.filteredGitPush {
     filter = ":/nix/nix-1p";
diff --git a/tools/nixery/default.nix b/tools/nixery/default.nix
index 1b1715cf9f..529794e596 100644
--- a/tools/nixery/default.nix
+++ b/tools/nixery/default.nix
@@ -25,6 +25,9 @@ let
   # through revision numbers.
   nixery-commit-hash = "depot";
 
+  # If Nixery is built outside of depot, it needs to dynamically fetch
+  # the current nix-1p.
+  nix-1p-git = builtins.fetchGit "https://code.tvl.fyi/depot.git:/nix/nix-1p.git";
 in
 depot.nix.readTree.drvTargets rec {
   # Implementation of the Nix image building logic
@@ -36,6 +39,8 @@ depot.nix.readTree.drvTargets rec {
   #
   # If the nixpkgs commit is known, append it to the main docs page.
   nixery-book = callPackage ./docs {
+    nix-1p = depot.nix.nix-1p or nix-1p-git;
+
     postamble = lib.optionalString (pkgs ? nixpkgsCommits.unstable) ''
       ### Which revision of `nixpkgs` is used for the builds?
 
diff --git a/tools/nixery/docs/default.nix b/tools/nixery/docs/default.nix
index 74409fcfa9..f26b24f2c1 100644
--- a/tools/nixery/docs/default.nix
+++ b/tools/nixery/docs/default.nix
@@ -7,16 +7,8 @@
 # Some of the documentation is pulled in and included from other
 # sources.
 
-{ fetchFromGitHub, mdbook, runCommand, rustPlatform, postamble ? "" }:
+{ fetchFromGitHub, mdbook, runCommand, rustPlatform, nix-1p, postamble ? "" }:
 
-let
-  nix-1p = fetchFromGitHub {
-    owner = "tazjin";
-    repo = "nix-1p";
-    rev = "9f0baf5e270128d9101ba4446cf6844889e399a2";
-    sha256 = "1pf9i90gn98vz67h296w5lnwhssk62dc6pij983dff42dbci7lhj";
-  };
-in
 runCommand "nixery-book"
 {
   POSTAMBLE = postamble;