chore: simplify config file (#319)

This commit is contained in:
ykiko
2025-11-28 02:07:06 +08:00
committed by GitHub
parent 8f74adf2b9
commit 2214d53ea5
9 changed files with 3 additions and 135 deletions

View File

@@ -108,4 +108,4 @@ jobs:
fi
./build/bin/unit_tests${EXE_EXT} --test-dir="./tests/data"
uv run pytest -s --log-cli-level=INFO tests/integration --executable=./build/bin/clice${EXE_EXT}
uv run --project tests pytest -s --log-cli-level=INFO tests/integration --executable=./build/bin/clice${EXE_EXT}

View File

@@ -1 +0,0 @@
3.13

61
flake.lock generated
View File

@@ -1,61 +0,0 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1738961098,
"narHash": "sha256-yWNBf6VDW38tl179FEuJ0qukthVfB02kv+mRsfUsWC0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "a3eaf5e8eca7cab680b964138fb79073704aca75",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"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
}

View File

@@ -1,72 +0,0 @@
{
description = "Flake for Clice";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
tomlplusplus = pkgs.tomlplusplus.overrideAttrs (
oldAttrs: {
mesonFlags = oldAttrs.mesonFlags or [] ++ [
"-Dbuild_examples=false"
"-Dbuild_tests=false"
"-Dcompile_library=false"
];
postInstall = oldAttrs.postInstall or "" + ''
cat > "$out/share/pkgconfig/toml++.pc" <<EOF
Name: toml++
Description: Alias for tomlplusplus
Version: ${oldAttrs.version}
Requires: tomlplusplus
EOF
'';
}
);
in
{
devShell = pkgs.mkShell {
buildInputs = [
pkgs.gcc
pkgs.pkg-config
pkgs.xmake
pkgs.cmake
pkgs.ninja
pkgs.python3
pkgs.gtest
pkgs.libuv
pkgs.llvmPackages_20.libstdcxxClang
# pkgs.llvmPackages_20.libllvm
pkgs.llvmPackages_20.bintools
pkgs.llvmPackages_20.compiler-rt
pkgs.llvmPackages_20.libunwind
pkgs.zlib
tomlplusplus
];
shellHook =
let
gcc = pkgs.gcc-unwrapped;
gccInclude = "${gcc}/include";
gccCxxInclude = "${gccInclude}/c++/${gcc.lib.version}";
in
''
export NIX_CFLAGS_COMPILE+=" -isystem ${gccInclude}"
export NIX_CFLAGS_COMPILE+=" -isystem ${gccCxxInclude}"
export NIX_CFLAGS_COMPILE+=" -isystem ${gccCxxInclude}/$(gcc -dumpmachine)"
'';
};
}
);
}

View File

View File

@@ -176,6 +176,8 @@ target("integration_tests", function()
local uv = assert(find_tool("uv"), "uv not found!")
local argv = {
"run",
"--project",
"tests",
"pytest",
"--log-cli-level=INFO",
"-s",