Merge pull request #41430 from Tomahna/bloop

Bloop: Init 1.0.0-M11
This commit is contained in:
Matthew Bauer 2018-06-28 20:42:41 -04:00 committed by GitHub
commit 50edf59e1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 106 additions and 0 deletions

View file

@ -3921,6 +3921,11 @@
github = "tokudan";
name = "Daniel Frank";
};
tomahna = {
email = "kevin.rauscher@tomahna.fr";
github = "Tomahna";
name = "Kevin Rauscher";
};
tomberek = {
email = "tomberek@gmail.com";
github = "tomberek";

View file

@ -242,6 +242,7 @@
./services/desktops/gnome3/tracker-miners.nix
./services/desktops/profile-sync-daemon.nix
./services/desktops/telepathy.nix
./services/development/bloop.nix
./services/development/hoogle.nix
./services/editors/emacs.nix
./services/editors/infinoted.nix

View file

@ -0,0 +1,37 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.bloop;
in {
options.services.bloop = {
install = mkOption {
type = types.bool;
default = false;
description = ''
Whether to install a user service for the Bloop server.
The service must be manually started for each user with
"systemctl --user start bloop".
'';
};
};
config = mkIf (cfg.install) {
systemd.user.services.bloop = {
description = "Bloop Scala build server";
serviceConfig = {
Type = "simple";
ExecStart = ''${pkgs.bloop}/bin/blp-server'';
Restart = "always";
};
};
environment.systemPackages = [ pkgs.bloop ];
};
}

View file

@ -0,0 +1,61 @@
{ stdenv, lib, fetchurl, coursier, jdk, jre, python, makeWrapper }:
let
baseName = "bloop";
version = "1.0.0-M11";
deps = stdenv.mkDerivation {
name = "${baseName}-deps-${version}";
buildCommand = ''
export COURSIER_CACHE=$(pwd)
${coursier}/bin/coursier fetch ch.epfl.scala:bloop-frontend_2.12:${version} \
-r "bintray:scalameta/maven" \
-r "bintray:scalacenter/releases" \
-r "https://oss.sonatype.org/content/repositories/staging" > deps
mkdir -p $out/share/java
cp $(< deps) $out/share/java/
'';
outputHashMode = "recursive";
outputHashAlgo = "sha256";
outputHash = "00p9mrwcms3skzicyj8frqs0r0a2rfvk5fbh58rk5yvcvkwl4fy1";
};
in
stdenv.mkDerivation rec {
name = "${baseName}-${version}";
nailgunCommit = "60c2d130";
buildInputs = [ jdk makeWrapper deps ];
phases = [ "installPhase" ];
client = fetchurl {
url = "https://raw.githubusercontent.com/scalacenter/nailgun/${nailgunCommit}/pynailgun/ng.py";
sha256 = "0qjw4nsyb4cxg96jj1yv5c0ivcxvmscxxqfzll5w9p1pjb30bq0n";
};
zshCompletion = fetchurl {
url = "https://raw.githubusercontent.com/scalacenter/bloop/v${version}/etc/zsh/_bloop";
sha256 = "1id6f1fgy2rk0q5aad6ffivhbxa94fallzsc04l9n0y1s2xdhqpm";
};
installPhase = ''
mkdir -p $out/bin
mkdir -p $out/share/zsh/site-functions
cp ${client} $out/bin/blp-client
cp ${zshCompletion} $out/share/zsh/site-functions/_bloop
chmod +x $out/bin/blp-client
makeWrapper ${jre}/bin/java $out/bin/blp-server \
--prefix PATH : ${lib.makeBinPath [ jdk ]} \
--add-flags "-cp $CLASSPATH bloop.Server"
makeWrapper $out/bin/blp-client $out/bin/bloop \
--prefix PATH : ${lib.makeBinPath [ python ]}
'';
meta = with stdenv.lib; {
homepage = https://scalacenter.github.io/bloop/;
license = licenses.asl20;
description = "Bloop is 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.";
maintainers = with maintainers; [ tomahna ];
};
}

View file

@ -7795,6 +7795,8 @@ with pkgs;
bloaty = callPackage ../development/tools/bloaty { };
bloop = callPackage ../development/tools/build-managers/bloop { };
bossa = callPackage ../development/tools/misc/bossa {
wxGTK = wxGTK30;
};