add nix config

This commit is contained in:
Nicholas Orlowsky 2025-02-25 16:24:07 -05:00
parent f6b3c2dc50
commit ce2b373313
4 changed files with 15 additions and 3 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
use nix

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
.cache/ .cache/
build/ build/
iso/boot/kernel.elf iso/boot/kernel.elf
.direnv/

View file

@ -24,9 +24,9 @@ FILE(GLOB SOURCES kernel/kernel.c)
# Architecture Specific Files # Architecture Specific Files
if (ARCH STREQUAL "i386") if (ARCH STREQUAL "i386")
set(CMAKE_C_COMPILER i386-elf-gcc) set(CMAKE_C_COMPILER i686-elf-gcc)
set(CMAKE_ASM_COMPILER i386-elf-as) set(CMAKE_ASM_COMPILER i686-elf-as)
set(LD i386-elf-gcc) set(LD i686-elf-gcc)
FILE(GLOB ASM_SOURCES arch/i386/*.s) FILE(GLOB ASM_SOURCES arch/i386/*.s)
SET(ARCH_FLAG "-DARCH_I386") SET(ARCH_FLAG "-DARCH_I386")
endif() endif()

10
shell.nix Normal file
View file

@ -0,0 +1,10 @@
let
pkgs' = (import <nixpkgs> {}).pkgsCross.i686-embedded;
pkgs = (import <nixpkgs> {});
in
pkgs'.mkShell {
nativeBuildInputs = [
pkgs.cdrkit
pkgs.qemu
];
}