summary refs log tree commit diff
path: root/img/app/shell.nix
blob: 6952a26f8ece9dc778096c06cc887e38454373b7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021-2022 Alyssa Ross <hi@alyssa.is>

import ../../lib/eval-config.nix (
{ config, run ? ../../vm/app/catgirl.nix, ... }:

with config.pkgs;

(import ./. { inherit config; }).overrideAttrs (
{ passthru ? {}, nativeBuildInputs ? [], ... }:

{
  nativeBuildInputs = nativeBuildInputs ++ [
    # Both QEMU and virtiofsd come with a virtiofsd executable,
    # so we have to list virtiofsd first.
    virtiofsd

    cloud-hypervisor execline jq qemu_kvm reuse s6
  ];

  KERNEL = "${passthru.kernel.dev}/vmlinux";

  runDef = import run { inherit config; };
  shellHook = ''
    export RUN_IMG="$(printf "%s\n" "$runDef"/blk/run.img)"
  '';
}))