mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-10 06:55:10 +00:00
4f0dadbf38
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
98 lines
2.9 KiB
Nix
98 lines
2.9 KiB
Nix
{
|
|
stdenv,
|
|
fetchurl,
|
|
autoPatchelfHook,
|
|
installShellFiles,
|
|
makeWrapper,
|
|
jre,
|
|
lib,
|
|
zlib,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "bloop";
|
|
version = "2.0.5";
|
|
|
|
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 rec {
|
|
url = "https://github.com/scalacenter/bloop/releases/download/v${version}/bloop-${platform}";
|
|
sha256 =
|
|
if stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86_64 then
|
|
"sha256-COsGPMCsl3hTcw9JOZ6/LnQAhsNCXMvC0sDLqhHrY1o="
|
|
else if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64 then
|
|
"sha256-oXfdHIvmEtjh+Ohpu8R2VbrR+YbEQKI6l2cYiG/kQnk="
|
|
else if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64 then
|
|
"sha256-+C8uY1TsqCy0Ml7GBovjGN4rAzkTqRSv5M0EI0l2tds="
|
|
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
|
|
];
|
|
};
|
|
}
|