aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
blob: 6a2215a1e7b1379d20465bd80aa0af90df425584 (plain)
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
28
29
30
31
32
33
34
35
36
37
38
39
{
  description = "Dev shell for Strix OS kernel development";

  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";

  outputs = { self, nixpkgs }:
    let
      system = "x86_64-linux";
      pkgs = import nixpkgs { inherit system; };
    in {
      devShells.${system}.default = pkgs.mkShell {
        packages = with pkgs; [
          # Rust toolchain (nightly specified by rust-toolchain file)
          rustup

          # QEMU for running kernel and integration tests
          qemu

          # cpio: required by build.rs to pack the initramfs archive
          cpio

          # busybox statically linked: placed in initramfs/ for the embedded rescue shell
          busybox

          # Debugging and inspection tools
          gdb
          binutils   # objdump, nm, readelf

          # Disk image tools for testing ext2/ext4 (Phase 4+)
          e2fsprogs  # mkfs.ext2, mkfs.ext4, debugfs
        ];

        # Ensure cargo uses the nightly toolchain from rust-toolchain
        shellHook = ''
          rustup show
        '';
      };
    };
}