feat: Added stuff
Some checks failed
build / checks-build (push) Has been cancelled
build / checks-matrix (push) Has been cancelled
build / codecov (push) Has been cancelled
docs / docs (push) Has been cancelled

This commit is contained in:
uttarayan21
2025-08-18 22:10:29 +05:30
parent 7fc958b299
commit 783320131a
12 changed files with 73 additions and 464 deletions

View File

@@ -88,25 +88,41 @@
".hpp"
".cpp"
".cc"
".mnn"
".onnx"
];
in
lib.cleanSourceWith {
filter = sourceFilters;
src = ./.;
};
commonArgs =
commonArgs = let
ort_static = pkgs.onnxruntime.overrideAttrs (old: {
cmakeFlags =
old.cmakeFlags
++ [
"-Donnxruntime_BUILD_SHARED_LIB=OFF"
"-Donnxruntime_BUILD_STATIC_LIB=ON"
];
});
in
{
inherit src;
pname = name;
stdenv = p: p.clangStdenv;
doCheck = false;
LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib";
ORT_LIB_LOCATION = "${ort_static}";
ORT_ENV_SYSTEM_LIB_LOCATION = "${ort_static}/lib";
# ORT_ENV_PREFER_DYNAMIC_LINK = true;
nativeBuildInputs = with pkgs; [
cmake
pkg-config
];
buildInputs = with pkgs;
[onnxruntime]
[
# onnxruntime
]
++ (lib.optionals pkgs.stdenv.isDarwin [
libiconv
apple-sdk_13
@@ -160,9 +176,11 @@
inherit cargoArtifacts;
}
// {
nativeBuildInputs = with pkgs; [
installShellFiles
];
nativeBuildInputs = with pkgs;
commonArgs.nativeBuildInputs
++ [
installShellFiles
];
postInstall = ''
installShellCompletion --cmd ${name} \
--bash <($out/bin/${name} completions bash) \
@@ -189,6 +207,7 @@
cmake
mnn
cargo-make
hyperfine
]
++ (lib.optionals pkgs.stdenv.isDarwin [
apple-sdk_13