summary refs log tree commit diff
path: root/img/app/shell.nix
diff options
context:
space:
mode:
Diffstat (limited to 'img/app/shell.nix')
-rw-r--r--img/app/shell.nix24
1 files changed, 24 insertions, 0 deletions
diff --git a/img/app/shell.nix b/img/app/shell.nix
new file mode 100644
index 0000000..83dcd76
--- /dev/null
+++ b/img/app/shell.nix
@@ -0,0 +1,24 @@
+# SPDX-License-Identifier: MIT
+# SPDX-FileCopyrightText: 2021-2022 Alyssa Ross <hi@alyssa.is>
+
+{ config ? import ../../nix/eval-config.nix {}
+, run ? ../../vm/app/catgirl.nix
+}:
+
+with config.pkgs;
+
+(import ./. { inherit config; }).overrideAttrs (
+{ passthru ? {}, nativeBuildInputs ? [], ... }:
+
+{
+  nativeBuildInputs = nativeBuildInputs ++ [
+    cloud-hypervisor jq qemu_kvm reuse
+  ];
+
+  KERNEL = "${passthru.kernel.dev}/vmlinux";
+
+  runDef = import run { inherit config; };
+  shellHook = ''
+    export RUN_IMG="$(printf "%s\n" "$runDef"/blk/run.img)"
+  '';
+})