Merge pull request #167689 from kubukoz/scala-cli-013

scala-cli: 0.1.2 -> 0.1.3
This commit is contained in:
Marek Fajkus 2022-04-08 09:13:18 +02:00 committed by GitHub
commit 273843c4ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,22 +1,23 @@
{ stdenv, coreutils, lib, installShellFiles, zlib, autoPatchelfHook, fetchurl }:
let
version = "0.1.2";
version = "0.1.3";
assets = {
x86_64-darwin = {
asset = "scala-cli-x86_64-apple-darwin.gz";
sha256 = "10453af2kz10k9vmcgdwpk10z36cnblnj6l09wkqngxwx9vxbf9q";
sha256 = "UlDF2Eaaet62zZV0z6XOZvg/YeB//AXPDni8h3Wc6rw=";
};
x86_64-linux = {
asset = "scala-cli-x86_64-pc-linux.gz";
sha256 = "0720c4s717hcssp4b3x295rhgac4ifjr95zn45bm1n70jr3xqzyj";
sha256 = "086fi7ma4j9xy6gs0k7i06ql8ranjkjlrir2860q74kinfisk79a";
};
};
in
stdenv.mkDerivation {
pname = "scala-cli";
inherit version;
nativeBuildInputs = [ autoPatchelfHook installShellFiles ];
nativeBuildInputs = [ installShellFiles ]
++ lib.optional stdenv.isLinux autoPatchelfHook;
buildInputs = [ coreutils zlib stdenv.cc.cc ];
src =
let
@ -42,9 +43,9 @@ stdenv.mkDerivation {
# We need to call autopatchelf before generating completions
dontAutoPatchelf = true;
postFixup = ''
postFixup = lib.optionalString stdenv.isLinux ''
autoPatchelf $out
'' + ''
# hack to ensure the completion function looks right
# as $0 is used to generate the compdef directive
PATH="$out/bin:$PATH"