11 stdenv.mkDerivation rec {
16 if stdenv.isLinux && stdenv.isx86_64 then "x86_64-pc-linux"
17 else if stdenv.isDarwin && stdenv.isx86_64 then "x86_64-apple-darwin"
18 else throw "unsupported platform";
20 bloop-bash = fetchurl {
21 url = "https://github.com/scalacenter/bloop/releases/download/v${version}/bash-completions";
22 sha256 = "sha256-2mt+zUEJvQ/5ixxFLZ3Z0m7uDSj/YE9sg/uNMjamvdE=";
25 bloop-fish = fetchurl {
26 url = "https://github.com/scalacenter/bloop/releases/download/v${version}/fish-completions";
27 sha256 = "sha256-eFESR6iPHRDViGv+Fk3sCvPgVAhk2L1gCG4LnfXO/v4=";
30 bloop-zsh = fetchurl {
31 url = "https://github.com/scalacenter/bloop/releases/download/v${version}/zsh-completions";
32 sha256 = "sha256-WNMsPwBfd5EjeRbRtc06lCEVI2FVoLfrqL82OR0G7/c=";
35 bloop-binary = fetchurl rec {
36 url = "https://github.com/scalacenter/bloop/releases/download/v${version}/bloop-${platform}";
38 if stdenv.isLinux && stdenv.isx86_64 then "sha256-lP7j7pPG7wC36sG+d80F2E6ZHPZcOZN/M/j6CniaNGY="
39 else if stdenv.isDarwin && stdenv.isx86_64 then "sha256-awSBYSN4do4w9dAx6JwoexiptfC01vW1/o53Tp13xj0="
40 else throw "unsupported platform";
44 nativeBuildInputs = [ installShellFiles makeWrapper ]
45 ++ lib.optional stdenv.isLinux autoPatchelfHook;
46 buildInputs = [ stdenv.cc.cc.lib zlib ];
47 propagatedBuildInputs = [ jre ];
52 install -D -m 0755 ${bloop-binary} $out/.bloop-wrapped
54 makeWrapper $out/.bloop-wrapped $out/bin/bloop
57 installShellCompletion --name bloop --bash ${bloop-bash}
58 installShellCompletion --name _bloop --zsh ${bloop-zsh}
59 installShellCompletion --name bloop.fish --fish ${bloop-fish}
65 homepage = "https://scalacenter.github.io/bloop/";
66 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
67 license = licenses.asl20;
68 description = "A Scala build server and command-line tool to make the compile and test developer workflows fast and productive in a build-tool-agnostic way";
69 mainProgram = "bloop";
70 platforms = [ "x86_64-linux" "x86_64-darwin" ];
71 maintainers = with maintainers; [ kubukoz tomahna ];