let samtools =
let url = "https://github.com/samtools/samtools/releases/download/1.3/samtools-1.3.tar.bz2" in
let toplevel_tools = ["samtools"] in
let htslib = ["bgzip"; "tabix" ] in
let tools = toplevel_tools @ htslib in
let install_program ~path =
let open KEDSL.Program in
sh "make"
&& shf "cp %s %s" (String.concat toplevel_tools ~sep:" ") path
&& sh "cd htslib*/"
&& sh "make"
&& shf "cp %s %s" (String.concat htslib ~sep:" ") path
&& sh "echo Done"
in
let witness = witness_list tools in
Installable_tool.make Machine.Tool.Default.samtools ~url ~install_program
~init_program:add_to_dollar_path ~witness