onnxruntime-rs/default.nix
2020-05-31 13:58:59 +01:00

27 lines
687 B
Nix

{ 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" &&
baseNameOf path != ".gitignore" &&
baseNameOf path != ".github" &&
!(hasSuffix ".nix" path) &&
(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 ];
doDoc = true;
doCheck = true;
}