summary refs log tree commit diff
path: root/img
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 /img
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 'img')
-rw-r--r--img/app/default.nix12
1 files changed, 9 insertions, 3 deletions
diff --git a/img/app/default.nix b/img/app/default.nix
index 70e6e33..538dfe2 100644
--- a/img/app/default.nix
+++ b/img/app/default.nix
@@ -1,8 +1,14 @@
 # SPDX-License-Identifier: MIT
-# SPDX-FileCopyrightText: 2021-2022 Alyssa Ross <hi@alyssa.is>
+# SPDX-FileCopyrightText: 2021-2023 Alyssa Ross <hi@alyssa.is>
 
 import ../../lib/eval-config.nix (
-{ config, src, terminfo ? config.pkgs.foot.terminfo, ... }:
+
+{ config, src
+, lseek ? import ../../tools/lseek { inherit config; }
+, terminfo ? config.pkgs.foot.terminfo
+, ...
+}:
+
 config.pkgs.pkgsStatic.callPackage (
 
 { lib, stdenvNoCC, runCommand, writeReferencesToFile, buildPackages
@@ -65,7 +71,7 @@ stdenvNoCC.mkDerivation {
   inherit src;
   sourceRoot = "source/img/app";
 
-  nativeBuildInputs = [ jq s6-rc tar2ext4 util-linux ];
+  nativeBuildInputs = [ jq lseek s6-rc tar2ext4 util-linux ];
 
   PACKAGES_TAR = packagesTar;
   VMLINUX = "${kernel.dev}/vmlinux";