onnxruntime-rs/default.nix

27 lines
687 B
Nix
Raw Normal View History

2020-05-30 16:37:55 +04:00
{ nixpkgs ? import ./nix/nixpkgs.nix
}:
with nixpkgs;
let filterSource = with lib; builtins.filterSource (path: type:
type != "unknown" &&
baseNameOf path != "target" &&
baseNameOf path != "result" &&
baseNameOf path != ".git" &&
2020-05-31 16:58:59 +04:00
baseNameOf path != ".gitignore" &&
baseNameOf path != ".github" &&
!(hasSuffix ".nix" path) &&
2020-05-30 16:37:55 +04:00
(baseNameOf path == "build" -> type != "directory") &&
(baseNameOf path == "nix" -> type != "directory")
);
in
naersk.buildPackage {
root = filterSource ./.;
LIBCLANG_PATH = "${llvmPackages.libclang}/lib";
buildInputs = [ onnxruntime.dev pkg-config clang ];
2020-05-30 16:37:55 +04:00
doDoc = true;
doCheck = true;
}