diff options
Diffstat (limited to 'vm/sys/net/default.nix')
-rw-r--r-- | vm/sys/net/default.nix | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/vm/sys/net/default.nix b/vm/sys/net/default.nix index c43f347..98749d1 100644 --- a/vm/sys/net/default.nix +++ b/vm/sys/net/default.nix @@ -12,7 +12,7 @@ import ../../../lib/eval-config.nix ( config.pkgs.pkgsStatic.callPackage ( { lib, stdenvNoCC, runCommand, writeReferencesToFile, buildPackages -, jq, s6-rc, tar2ext4, util-linux, xorg +, erofs-utils, jq, s6-rc, util-linux, xorg , busybox, connmanMinimal, dbus, execline, kmod, mdevd, nftables, s6 , s6-linux-init }: @@ -54,12 +54,6 @@ let done ''; - packagesTar = runCommand "packages.tar" {} '' - cd ${packagesSysroot} - tar -cf $out --verbatim-files-from \ - -T ${writeReferencesToFile packagesSysroot} . - ''; - kernelTarget = if stdenvNoCC.hostPlatform.isx86 then # vmlinux.bin is the stripped version of vmlinux. @@ -78,7 +72,7 @@ let VIRTIO_PCI = yes; VIRTIO_BLK = yes; VIRTIO_CONSOLE = yes; - EXT4_FS = yes; + EROFS_FS = yes; EXPERT = yes; FONTS = lib.mkForce unset; FONT_8x8 = lib.mkForce unset; @@ -101,11 +95,19 @@ stdenvNoCC.mkDerivation { inherit src; sourceRoot = "source/vm/sys/net"; - nativeBuildInputs = [ jq lseek s6-rc tar2ext4 util-linux ]; + nativeBuildInputs = [ erofs-utils jq lseek s6-rc util-linux ]; - PACKAGES_TAR = packagesTar; + PACKAGES = [ packagesSysroot "/" ]; KERNEL = "${kernel}/${baseNameOf kernelTarget}"; + shellHook = '' + PACKAGES+=" $(sed p ${writeReferencesToFile packagesSysroot} | tr '\n' ' ')" + ''; + + preBuild = '' + runHook shellHook + ''; + makeFlags = [ "prefix=$(out)" ]; dontInstall = true; |