btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / by-name / tv / tvm / package.nix
blob45579ad8f16adbfe2aa68a9c7168b88252b75ce4
1 { lib, stdenv, fetchFromGitHub, cmake }:
3 stdenv.mkDerivation rec {
4   pname = "tvm";
5   version = "0.17.0";
7   src = fetchFromGitHub {
8     owner = "apache";
9     repo = "incubator-tvm";
10     rev = "v${version}";
11     fetchSubmodules = true;
12     hash = "sha256-5Jr+xubQoASNgy/UR/K5pvzMs4szP9LidFOLs3h+KSY=";
13   };
15   nativeBuildInputs = [ cmake ];
16   # TVM CMake build uses some sources in the project's ./src/target/opt/
17   # directory which errneously gets mangled by the eager `fixCmakeFiles`
18   # function in Nix's CMake setup-hook.sh to ./src/target/var/empty/,
19   # which then breaks the build. Toggling this flag instructs Nix to
20   # not mangle the legitimate use of the opt/ folder.
21   dontFixCmake = true;
23   meta = with lib; {
24     homepage = "https://tvm.apache.org/";
25     description = "End to End Deep Learning Compiler Stack for CPUs, GPUs and accelerators";
26     license = licenses.asl20;
27     platforms = platforms.all;
28     maintainers = with maintainers; [ adelbertc ];
29   };