nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 cmake,
6}:
7
8stdenv.mkDerivation rec {
9 pname = "tvm";
10 version = "0.19.0";
11
12 src = fetchFromGitHub {
13 owner = "apache";
14 repo = "incubator-tvm";
15 rev = "v${version}";
16 fetchSubmodules = true;
17 hash = "sha256-/5IpOraFTgg6sQ1TLHoepq/C8VHKg5BXKrNMBSyYajA=";
18 };
19
20 nativeBuildInputs = [ cmake ];
21 # TVM CMake build uses some sources in the project's ./src/target/opt/
22 # directory which errneously gets mangled by the eager `fixCmakeFiles`
23 # function in Nix's CMake setup-hook.sh to ./src/target/var/empty/,
24 # which then breaks the build. Toggling this flag instructs Nix to
25 # not mangle the legitimate use of the opt/ folder.
26 dontFixCmake = true;
27
28 meta = with lib; {
29 homepage = "https://tvm.apache.org/";
30 description = "End to End Deep Learning Compiler Stack for CPUs, GPUs and accelerators";
31 license = licenses.asl20;
32 platforms = platforms.all;
33 maintainers = with maintainers; [ adelbertc ];
34 };
35}