Initial commit

This commit is contained in:
Konstantin Nazarov 2024-12-06 19:44:09 +00:00
commit e0e31ec7ca
Signed by: knazarov
GPG key ID: 4CFE0A42FA409C22
4 changed files with 114 additions and 0 deletions

20
.gitignore vendored Normal file
View file

@ -0,0 +1,20 @@
*.o
*.a
*.gcda
*.gcno
*.gcov
lcov.info
test/*.test
vm
lisp
asm
sd
compile_commands.json
.cache
CMakeFiles
cmake_install.cmake
CMakeCache.txt
CTestTestfile.cmake
Testing
result
build

26
flake.lock Normal file
View file

@ -0,0 +1,26 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1733513735,
"narHash": "sha256-cSC8KVc0q7HfukrEN3fqMmVowJdgOF33cAVBjNtW+tU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "992e5d075b51886298efa1c2100d35c62cb0ca97",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

36
flake.nix Normal file
View file

@ -0,0 +1,36 @@
{
description = "Nix flake for rve";
# Flake inputs
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs"; # also valid: "nixpkgs";
};
# Flake outputs
outputs = { self, nixpkgs }:
let
# Systems supported
allSystems = [
"x86_64-linux" # 64-bit Intel/AMD Linux
"aarch64-linux" # 64-bit ARM Linux
"x86_64-darwin" # 64-bit Intel macOS
"aarch64-darwin" # 64-bit ARM macOS
];
# Helper to provide system-specific attributes
forAllSystems = f: nixpkgs.lib.genAttrs allSystems (system: f {
pkgs = import nixpkgs { inherit system; };
});
in
{
packages = forAllSystems( {pkgs }:
{
lisp = (pkgs.callPackage ./rve.nix {});
default = (pkgs.callPackage ./rve.nix {});
}
);
overlays.default = final: prev: {
lisp = (prev.callPackage ./rve.nix {});
};
};
}

32
rve.nix Normal file
View file

@ -0,0 +1,32 @@
{ pkgs, stdenv }:
pkgs.gcc13Stdenv.mkDerivation rec {
pname = "rve";
version = "0.1.0";
dontPatch = true;
preBuild = ''
patchShebangs bin/*.sh
'';
installFlags = "PREFIX=${placeholder "out"} VERSION=${version}";
nativeBuildInputs = with pkgs; [ pkg-config cmake ninja ];
buildInputs = with pkgs; [ gdb linuxPackages.perf jq lcov ];
hardeningDisable = [ "all" ];
cmakeFlags = [
"-DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE"
"-DCMAKE_BUILD_TYPE=Debug"
];
shellHook = ''
export CMAKE_BUILD_TYPE=Debug
ln -s build/compile_commands.json compile_commands.json
'';
doCheck = true;
src = ./.;
}