1

Update flake

This commit is contained in:
2022-12-07 16:36:31 +01:00
parent fbb85631ed
commit 8818ab9b94
2 changed files with 32 additions and 51 deletions

6
flake.lock generated
View File

@ -67,11 +67,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1670267727, "lastModified": 1668681245,
"narHash": "sha256-hUFAn5gjNHIBpLQT0CmqpuQjQwgWUm+D6aziGAYsDmw=", "narHash": "sha256-IH8t+b9hCfNwEvdC55UEymn8jL457Fo/hx3N/kNTZso=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a5f661b80e4c163510a5013b585a040a5c7ef55e", "rev": "bd4bfd814e96488febb38b4b4d0549c56b840c7f",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -1,5 +1,5 @@
{ {
description = "BSEos flake for development shell"; description = "ChUrlOS flake for development shell";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils"; inputs.flake-utils.url = "github:numtide/flake-utils";
@ -16,8 +16,7 @@
# bintools with multilib # bintools with multilib
bintools_multi = pkgs.wrapBintoolsWith { bintools_multi = pkgs.wrapBintoolsWith {
bintools = bintools = pkgs.bintools.bintools; # Get the unwrapped bintools from the wrapper
pkgs.bintools.bintools; # Get the unwrapped bintools from the wrapper
libc = pkgs.glibc_multi; libc = pkgs.glibc_multi;
}; };
@ -34,38 +33,45 @@
libc = pkgs.glibc_multi; libc = pkgs.glibc_multi;
bintools = bintools_multi; bintools = bintools_multi;
}; };
# Used to generate beep files
hhuOS_python = pkgs.python310.withPackages (p: with p; [
requests
]);
in { in {
# devShell = pkgs.devshell.mkShell ... # devShell = pkgs.devshell.mkShell ...
devShell = pkgs.devshell.mkShell { devShell = pkgs.devshell.mkShell {
name = "BSEos"; name = "ChUrlOS";
packages = with pkgs; [ packages = with pkgs; [
gcc12_multi gcc12_multi
bintools_multi bintools_multi
clang14_multi clang14_multi
# clang-tools_14 # clangd + clang-format + clang-tidy hhuOS_python
# Native buildinputs
nasm nasm
cmake
gnumake gnumake
gnutar # should be in stdenv
findutils
dosfstools
mtools # Generate floppy0.img etc.
grub2
xorriso
util-linux
# Buildinputs
qemu # Start os in virtual machine
# Development
jetbrains.clion
bear # To generate compilation database bear # To generate compilation database
gdb gdb
qemu # Start os in virtual machine cling # To try out my bullshit implementations
doxygen # Generate docs + graphs # doxygen # Generate docs + graphs
# glibc_multi # Needed for lsp to find some headers
# clang_14 # To view template generation, also alternative error messages, conflicts with gcc
jetbrains.clion
# TODO: Figure out what is needed to make cling work
# llvmPackages_14.llvm
# cling # To try out my bullshit implementations
# root
]; ];
# Not for devshell
# hardeningDisable = [ "fortify" ]; # FORTIFY_SOURCE needs -O2 but we compile with -O0
commands = [ commands = [
{ {
name = "ide"; name = "ide";
@ -73,34 +79,9 @@
command = "clion &>/dev/null ./ &"; command = "clion &>/dev/null ./ &";
} }
{ {
name = "build"; name = "cpuinfo";
help = "Build the OS"; help = "Show qemu i386 architecture information";
command = "make --jobs 6"; command = "qemu-system-i386 -cpu help";
}
{
name = "build-clang";
help = "Build the OS using clang";
command = "GCCFLAGS='' CC=clang CXX=clang++ make --jobs 6";
}
{
name = "run";
help = "Start OS in qemu";
command = "make qemu --jobs 6";
}
{
name = "clean";
help = "Cleanup build files";
command = "make clean";
}
{
name = "generate-compile-commands";
help = "Generate the compilation database for clangd";
command = "make clean && GCCFLAGS='' bear -- make --jobs 6";
}
{
name = "debug";
help = "Start OS for gdb connection and run gdb";
command = "(make clean) && (make qemu-gdb --jobs 6 &) && (make gdb)";
} }
]; ];
}; };