summary refs log tree commit diff
path: root/host/initramfs/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-03-21 15:11:07 +0000
committerAlyssa Ross <hi@alyssa.is>2023-03-21 15:43:58 +0000
commit2a338f7e1abe182d1c0ec496540349d2084e9b4b (patch)
treeb8f1bb936fc1dbab7733487b96dbbaea5174b5fb /host/initramfs/default.nix
parent048fadd0a4bf8b29227dc67f39363305b84ff29a (diff)
downloadspectrum-2a338f7e1abe182d1c0ec496540349d2084e9b4b.tar
spectrum-2a338f7e1abe182d1c0ec496540349d2084e9b4b.tar.gz
spectrum-2a338f7e1abe182d1c0ec496540349d2084e9b4b.tar.bz2
spectrum-2a338f7e1abe182d1c0ec496540349d2084e9b4b.tar.lz
spectrum-2a338f7e1abe182d1c0ec496540349d2084e9b4b.tar.xz
spectrum-2a338f7e1abe182d1c0ec496540349d2084e9b4b.tar.zst
spectrum-2a338f7e1abe182d1c0ec496540349d2084e9b4b.zip
scripts/make-gpt.sh: use copy_file_range(2)
Before this change, a clean release/live "make -j4" had a median
runtime of 85 seconds.  Now, it's 37 seconds.  That much of a
reduction in iteration time is worth the extra complexity.

Signed-off-by: Alyssa Ross <hi@alyssa.is>
Diffstat (limited to 'host/initramfs/default.nix')
-rw-r--r--host/initramfs/default.nix7
1 files changed, 5 insertions, 2 deletions
diff --git a/host/initramfs/default.nix b/host/initramfs/default.nix
index b9b22ae..22dcbed 100644
--- a/host/initramfs/default.nix
+++ b/host/initramfs/default.nix
@@ -1,11 +1,14 @@
-# SPDX-FileCopyrightText: 2021-2022 Alyssa Ross <hi@alyssa.is>
+# SPDX-FileCopyrightText: 2021-2023 Alyssa Ross <hi@alyssa.is>
 # SPDX-License-Identifier: MIT
 
 import ../../lib/eval-config.nix (
+
 { config, src
+, lseek ? import ../../tools/lseek { inherit config; }
 , rootfs ? import ../rootfs { inherit config; }
 , ...
 }:
+
 config.pkgs.callPackage (
 
 { lib, stdenvNoCC, makeModulesClosure, runCommand, writeReferencesToFile
@@ -89,7 +92,7 @@ stdenvNoCC.mkDerivation {
   MICROCODE = microcode;
   PACKAGES_CPIO = packagesCpio;
 
-  nativeBuildInputs = [ cpio ];
+  nativeBuildInputs = [ cpio lseek ];
 
   makeFlags = [ "dest=$(out)" ];