11 stdenv.mkDerivation rec {
16 if stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86_64 then "x86_64-pc-linux"
17 else if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64 then "x86_64-apple-darwin"
18 else if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64 then "aarch64-apple-darwin"
19 else throw "unsupported platform";
21 bloop-bash = fetchurl {
22 url = "https://github.com/scalacenter/bloop/releases/download/v${version}/bash-completions";
23 sha256 = "sha256-2mt+zUEJvQ/5ixxFLZ3Z0m7uDSj/YE9sg/uNMjamvdE=";
26 bloop-fish = fetchurl {
27 url = "https://github.com/scalacenter/bloop/releases/download/v${version}/fish-completions";
28 sha256 = "sha256-eFESR6iPHRDViGv+Fk3sCvPgVAhk2L1gCG4LnfXO/v4=";
31 bloop-zsh = fetchurl {
32 url = "https://github.com/scalacenter/bloop/releases/download/v${version}/zsh-completions";
33 sha256 = "sha256-WNMsPwBfd5EjeRbRtc06lCEVI2FVoLfrqL82OR0G7/c=";
36 bloop-binary = fetchurl rec {
37 url = "https://github.com/scalacenter/bloop/releases/download/v${version}/bloop-${platform}";
39 if stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86_64 then "sha256-COsGPMCsl3hTcw9JOZ6/LnQAhsNCXMvC0sDLqhHrY1o="
40 else if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64 then "sha256-oXfdHIvmEtjh+Ohpu8R2VbrR+YbEQKI6l2cYiG/kQnk="
41 else if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64 then "sha256-+C8uY1TsqCy0Ml7GBovjGN4rAzkTqRSv5M0EI0l2tds="
42 else throw "unsupported platform";
46 nativeBuildInputs = [ installShellFiles makeWrapper ]
47 ++ lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook;
48 buildInputs = [ (lib.getLib stdenv.cc.cc) zlib ];
49 propagatedBuildInputs = [ jre ];
54 install -D -m 0755 ${bloop-binary} $out/.bloop-wrapped
56 makeWrapper $out/.bloop-wrapped $out/bin/bloop
59 installShellCompletion --name bloop --bash ${bloop-bash}
60 installShellCompletion --name _bloop --zsh ${bloop-zsh}
61 installShellCompletion --name bloop.fish --fish ${bloop-fish}
67 homepage = "https://scalacenter.github.io/bloop/";
68 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
69 license = licenses.asl20;
70 description = "Scala build server and command-line tool to make the compile and test developer workflows fast and productive in a build-tool-agnostic way";
71 mainProgram = "bloop";
72 platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ];
73 maintainers = with maintainers; [ agilesteel kubukoz tomahna ];