Initial commit
This commit is contained in:
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
.idea
|
||||
.envrc
|
||||
.direnv
|
||||
cmake-build-debug
|
||||
cmake-build-release
|
14
CMakeLists.txt
Normal file
14
CMakeLists.txt
Normal file
@ -0,0 +1,14 @@
|
||||
cmake_minimum_required(VERSION 3.25)
|
||||
project(BrainfuckInterpreter)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
|
||||
# find_package(Boost 1.81 COMPONENTS program_options REQUIRED)
|
||||
|
||||
include_directories(include)
|
||||
|
||||
add_executable(bfuck
|
||||
src/main.cpp
|
||||
)
|
||||
|
||||
# target_link_libraries(lasm Boost::program_options)
|
130
flake.lock
generated
Normal file
130
flake.lock
generated
Normal file
@ -0,0 +1,130 @@
|
||||
{
|
||||
"nodes": {
|
||||
"devshell": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1705332421,
|
||||
"narHash": "sha256-USpGLPme1IuqG78JNqSaRabilwkCyHmVWY0M9vYyqEA=",
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"rev": "83cb93d6d063ad290beee669f4badf9914cc16ec",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701680307,
|
||||
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1705309234,
|
||||
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1704161960,
|
||||
"narHash": "sha256-QGua89Pmq+FBAro8NriTuoO/wNaUtugt29/qqA8zeeM=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "63143ac2c9186be6d9da6035fa22620018c85932",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1705566941,
|
||||
"narHash": "sha256-CLNtVRDA8eUPk+bxsCCZtRO0Cp+SpHdn1nNOLoFypLs=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b06ff4bf8f4ad900fe0c2a61fc2946edc3a84be7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"devshell": "devshell",
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_2": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
87
flake.nix
Normal file
87
flake.nix
Normal file
@ -0,0 +1,87 @@
|
||||
{
|
||||
description = "C/C++ Environment";
|
||||
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||
inputs.devshell.url = "github:numtide/devshell";
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
flake-utils,
|
||||
devshell,
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true; # For clion
|
||||
overlays = [devshell.overlays.default];
|
||||
};
|
||||
|
||||
# NOTE: Usual 64 bit compilers that don't collide
|
||||
bintools = pkgs.wrapBintoolsWith {
|
||||
bintools = pkgs.bintools.bintools;
|
||||
libc = pkgs.glibc;
|
||||
};
|
||||
gcc13 = pkgs.hiPrio (pkgs.wrapCCWith {
|
||||
cc = pkgs.gcc13.cc;
|
||||
libc = pkgs.glibc;
|
||||
bintools = bintools;
|
||||
});
|
||||
clang16 = pkgs.wrapCCWith {
|
||||
cc = pkgs.clang_16.cc;
|
||||
libc = pkgs.glibc;
|
||||
bintools = bintools;
|
||||
};
|
||||
|
||||
# NOTE: Multilib compilers that don't collide
|
||||
bintools_multi = pkgs.wrapBintoolsWith {
|
||||
bintools = pkgs.bintools.bintools; # Get the unwrapped bintools from the wrapper
|
||||
libc = pkgs.glibc_multi;
|
||||
};
|
||||
gcc13_multi = pkgs.hiPrio (pkgs.wrapCCWith {
|
||||
cc = pkgs.gcc13.cc; # Get the unwrapped gcc from the wrapper
|
||||
libc = pkgs.glibc_multi;
|
||||
bintools = bintools_multi;
|
||||
});
|
||||
clang16_multi = pkgs.wrapCCWith {
|
||||
cc = pkgs.clang_16.cc;
|
||||
libc = pkgs.glibc_multi;
|
||||
bintools = bintools_multi;
|
||||
};
|
||||
in {
|
||||
# devShell = pkgs.devshell.mkShell ...
|
||||
devShell = pkgs.devshell.mkShell {
|
||||
name = "C/C++ Environment";
|
||||
|
||||
packages = with pkgs; [
|
||||
# Compilers
|
||||
bintools
|
||||
gcc13
|
||||
clang16
|
||||
# bintools_multi
|
||||
# gcc13_multi
|
||||
# clang15_multi
|
||||
|
||||
# Native buildinputs
|
||||
gnumake
|
||||
cmake
|
||||
# nasm
|
||||
|
||||
# Development
|
||||
# bear # To generate compilation database
|
||||
gdb
|
||||
cling # To try out my bullshit implementations
|
||||
# doxygen # Generate docs + graphs
|
||||
];
|
||||
|
||||
commands = [
|
||||
# {
|
||||
# name = "ide";
|
||||
# help = "Run clion for project";
|
||||
# command = "clion &>/dev/null ./ &";
|
||||
# }
|
||||
];
|
||||
};
|
||||
});
|
||||
}
|
5
src/main.cpp
Normal file
5
src/main.cpp
Normal file
@ -0,0 +1,5 @@
|
||||
#include <iostream>
|
||||
|
||||
int main() {
|
||||
std::cout << "Hello, World!" << std::endl;
|
||||
}
|
Reference in New Issue
Block a user