summary refs log tree commit diff
path: root/host/rootfs/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-03-12 19:47:43 +0000
committerAlyssa Ross <hi@alyssa.is>2023-03-12 19:47:43 +0000
commit4b67ce2d6571addfb6784bd461675da8deca954b (patch)
tree7fa1d6325335d8fe040cb6081a0afa1d004e3b84 /host/rootfs/default.nix
parente2ca1a7994adffea835b3e4f90ba1caf4f64f816 (diff)
downloadspectrum-4b67ce2d6571addfb6784bd461675da8deca954b.tar
spectrum-4b67ce2d6571addfb6784bd461675da8deca954b.tar.gz
spectrum-4b67ce2d6571addfb6784bd461675da8deca954b.tar.bz2
spectrum-4b67ce2d6571addfb6784bd461675da8deca954b.tar.lz
spectrum-4b67ce2d6571addfb6784bd461675da8deca954b.tar.xz
spectrum-4b67ce2d6571addfb6784bd461675da8deca954b.tar.zst
spectrum-4b67ce2d6571addfb6784bd461675da8deca954b.zip
Build make targets directly into destinations
Our image Makefiles are either used for interactive development in a
nix-shell, or as part of a Nix build of Spectrum.  In neither of these
cases is the two step "make; make install" process useful like it is
for packages, because one image from Spectrum somewhere on the
development system isn't something it ever makes sense to do.

By removing the separation between building and installing, and
creating the final output directly in its destination, we can save
some copies of very large files, which should save seconds in each
build, even for the smaller components.

Signed-off-by: Alyssa Ross <hi@alyssa.is>
Diffstat (limited to 'host/rootfs/default.nix')
-rw-r--r--host/rootfs/default.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/host/rootfs/default.nix b/host/rootfs/default.nix
index 3ca2830..23e4b38 100644
--- a/host/rootfs/default.nix
+++ b/host/rootfs/default.nix
@@ -130,9 +130,9 @@ stdenvNoCC.mkDerivation {
   MODULES_ORDER = "${kernel}/lib/modules/${kernel.modDirVersion}/modules.order";
   PACKAGES_TAR = packagesTar;
 
-  installPhase = ''
-    cp build/rootfs.ext4 $out
-  '';
+  makeFlags = [ "dest=$(out)" ];
+
+  dontInstall = true;
 
   enableParallelBuilding = true;