about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorMarek Fajkus <marek.faj@gmail.com>2022-05-04 16:20:24 +0200
committerGitHub <noreply@github.com>2022-05-04 16:20:24 +0200
commit7acb1f2af2969db725b5977c0151be1fcc898fc3 (patch)
treeabf50b69644badc47b1ad1960385e787c37f27c0 /pkgs/development
parente055969580114dba856f5969e2b030184b066e74 (diff)
parent53d9b6397c151d71ade76609a10e557c88987e2a (diff)
Merge pull request #171122 from Tomahna/bloop
bloop: 1.4.13 -> 1.5.0
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/tools/build-managers/bloop/default.nix62
1 files changed, 16 insertions, 46 deletions
diff --git a/pkgs/development/tools/build-managers/bloop/default.nix b/pkgs/development/tools/build-managers/bloop/default.nix
index 0649b0c86c6db..aa0e9adc2fc8b 100644
--- a/pkgs/development/tools/build-managers/bloop/default.nix
+++ b/pkgs/development/tools/build-managers/bloop/default.nix
@@ -1,6 +1,5 @@
 { stdenv
 , fetchurl
-, coursier
 , autoPatchelfHook
 , installShellFiles
 , makeWrapper
@@ -11,58 +10,34 @@
 
 stdenv.mkDerivation rec {
   pname = "bloop";
-  version = "1.4.13";
+  version = "1.5.0";
 
-  bloop-coursier-channel = fetchurl {
-    url = "https://github.com/scalacenter/bloop/releases/download/v${version}/bloop-coursier.json";
-    sha256 = "VbvBAz7mXhgQtbrlB6uCSmZXLcdYaROJRSREbazAReo=";
-  };
+  platform =
+    if stdenv.isLinux && stdenv.isx86_64 then "x86_64-pc-linux"
+    else if stdenv.isDarwin && stdenv.isx86_64 then "x86_64-apple-darwin"
+    else throw "unsupported platform";
 
   bloop-bash = fetchurl {
     url = "https://github.com/scalacenter/bloop/releases/download/v${version}/bash-completions";
-    sha256 = "2mt+zUEJvQ/5ixxFLZ3Z0m7uDSj/YE9sg/uNMjamvdE=";
+    sha256 = "sha256-2mt+zUEJvQ/5ixxFLZ3Z0m7uDSj/YE9sg/uNMjamvdE=";
   };
 
   bloop-fish = fetchurl {
     url = "https://github.com/scalacenter/bloop/releases/download/v${version}/fish-completions";
-    sha256 = "eFESR6iPHRDViGv+Fk3sCvPgVAhk2L1gCG4LnfXO/v4=";
+    sha256 = "sha256-eFESR6iPHRDViGv+Fk3sCvPgVAhk2L1gCG4LnfXO/v4=";
   };
 
   bloop-zsh = fetchurl {
     url = "https://github.com/scalacenter/bloop/releases/download/v${version}/zsh-completions";
-    sha256 = "WNMsPwBfd5EjeRbRtc06lCEVI2FVoLfrqL82OR0G7/c=";
+    sha256 = "sha256-WNMsPwBfd5EjeRbRtc06lCEVI2FVoLfrqL82OR0G7/c=";
   };
 
-  bloop-coursier = stdenv.mkDerivation rec {
-    name = "${pname}-coursier-${version}";
-
-    platform = if stdenv.isLinux && stdenv.isx86_64 then "x86_64-pc-linux"
-    else if stdenv.isDarwin && stdenv.isx86_64 then "x86_64-apple-darwin"
-    else throw "unsupported platform";
-
-    dontUnpack = true;
-    installPhase = ''
-      runHook preInstall
-
-      export COURSIER_CACHE=$(pwd)
-      export COURSIER_JVM_CACHE=$(pwd)
-
-      mkdir channel
-      ln -s ${bloop-coursier-channel} channel/bloop.json
-      ${coursier}/bin/cs install --install-dir . --install-platform ${platform} --default-channels=false --channel channel --only-prebuilt=true bloop
-
-      # Only keeping the binary, we'll wrap it ourselves
-      # This guarantees the output of this fixed-output derivation doesn't have references to itself
-      install -D -m 0755 .bloop.aux $out
-
-      runHook postInstall
-    '';
-
-    outputHashMode = "recursive";
-    outputHashAlgo = "sha256";
-    outputHash = if stdenv.isLinux && stdenv.isx86_64 then "sha256-AiF/ih15Jd0WuDP/0vU0vdaSo3FGjWXos+hNVBayFz4="
-    else if stdenv.isDarwin && stdenv.isx86_64 then "sha256-LD23YpcNhWfioGDMqb1plqLy87ZHzT0zvIyc4O4WP5g="
-    else throw "unsupported platform";
+  bloop-binary = fetchurl rec {
+    url = "https://github.com/scalacenter/bloop/releases/download/v${version}/bloop-${platform}";
+    sha256 =
+      if stdenv.isLinux && stdenv.isx86_64 then "sha256-jif9z05W17vjFgb146qWC3o44HmbnX05gWPlbXttYsE="
+      else if stdenv.isDarwin && stdenv.isx86_64 then "sha256-YOnXgKXsGrTu9P4I0NZW6ollZVQUXnbW8WtZTJmy+w0="
+      else throw "unsupported platform";
   };
 
   dontUnpack = true;
@@ -74,14 +49,9 @@ stdenv.mkDerivation rec {
   installPhase = ''
     runHook preInstall
 
-    export COURSIER_CACHE=$(pwd)
-    export COURSIER_JVM_CACHE=$(pwd)
-
-    install -D -m 0755 ${bloop-coursier} $out/.bloop-wrapped
+    install -D -m 0755 ${bloop-binary} $out/.bloop-wrapped
 
-    makeWrapper $out/.bloop-wrapped $out/bin/bloop \
-      --set CS_NATIVE_LAUNCHER true \
-      --set IS_CS_INSTALLED_LAUNCHER true
+    makeWrapper $out/.bloop-wrapped $out/bin/bloop
 
     #Install completions
     installShellCompletion --name bloop --bash ${bloop-bash}