Files
nixpkgs/pkgs/by-name/bl/bloop/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

99 lines
2.9 KiB
Nix

{
stdenv,
fetchurl,
autoPatchelfHook,
installShellFiles,
makeWrapper,
jre,
lib,
zlib,
}:
stdenv.mkDerivation rec {
pname = "bloop";
version = "2.0.16";
platform =
if stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86_64 then
"x86_64-pc-linux"
else if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64 then
"x86_64-apple-darwin"
else if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64 then
"aarch64-apple-darwin"
else
throw "unsupported platform";
bloop-bash = fetchurl {
url = "https://github.com/scalacenter/bloop/releases/download/v${version}/bash-completions";
sha256 = "sha256-2mt+zUEJvQ/5ixxFLZ3Z0m7uDSj/YE9sg/uNMjamvdE=";
};
bloop-fish = fetchurl {
url = "https://github.com/scalacenter/bloop/releases/download/v${version}/fish-completions";
sha256 = "sha256-eFESR6iPHRDViGv+Fk3sCvPgVAhk2L1gCG4LnfXO/v4=";
};
bloop-zsh = fetchurl {
url = "https://github.com/scalacenter/bloop/releases/download/v${version}/zsh-completions";
sha256 = "sha256-WNMsPwBfd5EjeRbRtc06lCEVI2FVoLfrqL82OR0G7/c=";
};
bloop-binary = fetchurl {
url = "https://github.com/scalacenter/bloop/releases/download/v${version}/bloop-${platform}";
sha256 =
if stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86_64 then
"sha256-66TYu/2HMvd58z2hDdOfQ51feZ/yYvzVfMmjD9U7lHs="
else if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64 then
"sha256-k8mUKcQcJZuqlEfphOIhXSTU4ny5WD0zHEhUsbtpVg0="
else if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64 then
"sha256-eYKjT5k3UeSt/FUddzaYQ1xbYaC9Rf/HCEbYxkLaz50="
else
throw "unsupported platform";
};
dontUnpack = true;
nativeBuildInputs = [
installShellFiles
makeWrapper
]
++ lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook;
buildInputs = [
(lib.getLib stdenv.cc.cc)
zlib
];
propagatedBuildInputs = [ jre ];
installPhase = ''
runHook preInstall
install -D -m 0755 ${bloop-binary} $out/.bloop-wrapped
makeWrapper $out/.bloop-wrapped $out/bin/bloop
#Install completions
installShellCompletion --name bloop --bash ${bloop-bash}
installShellCompletion --name _bloop --zsh ${bloop-zsh}
installShellCompletion --name bloop.fish --fish ${bloop-fish}
runHook postInstall
'';
meta = with lib; {
homepage = "https://scalacenter.github.io/bloop/";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.asl20;
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";
mainProgram = "bloop";
platforms = [
"x86_64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
maintainers = with maintainers; [
agilesteel
kubukoz
tomahna
];
};
}