2017-03-20 04:58:24 +01:00
|
|
|
{ stdenv, fetchurl, makeWrapper, jre }:
|
|
|
|
|
2019-08-21 21:00:13 +02:00
|
|
|
let
|
|
|
|
zshCompletion = version: fetchurl {
|
|
|
|
url = "https://raw.githubusercontent.com/coursier/coursier/v${version}/modules/cli/src/main/resources/completions/zsh";
|
2020-02-10 12:41:54 +01:00
|
|
|
sha256 = "1mn6cdmf59nkz5012wgd3gd6hpk2w4629sk8z95230ky8487dac3";
|
2019-08-21 21:00:13 +02:00
|
|
|
};
|
|
|
|
in
|
2017-03-20 04:58:24 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "coursier";
|
2020-05-21 16:47:12 +02:00
|
|
|
version = "2.0.0-RC6-18";
|
2017-03-20 04:58:24 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-04-27 19:49:25 +02:00
|
|
|
url = "https://github.com/coursier/coursier/releases/download/v${version}/coursier";
|
2020-05-21 16:47:12 +02:00
|
|
|
sha256 = "0vym99fyn0g8l5y2zvhf73ww17wywrh503wg5aw4nilj8w1ncvn2";
|
2017-03-20 04:58:24 +01:00
|
|
|
};
|
|
|
|
|
2017-03-20 17:04:40 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2017-03-20 04:58:24 +01:00
|
|
|
|
2018-02-22 03:50:17 +01:00
|
|
|
buildCommand = ''
|
|
|
|
install -Dm555 $src $out/bin/coursier
|
2018-07-21 16:27:53 +02:00
|
|
|
patchShebangs $out/bin/coursier
|
2017-12-14 16:39:15 +01:00
|
|
|
wrapProgram $out/bin/coursier --prefix PATH ":" ${jre}/bin
|
2019-08-21 21:00:13 +02:00
|
|
|
|
|
|
|
# copy zsh completion
|
|
|
|
install -Dm755 ${zshCompletion version} $out/share/zsh/site-functions/_coursier
|
2017-03-20 04:58:24 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://get-coursier.io/";
|
2017-03-20 04:58:24 +01:00
|
|
|
description = "A Scala library to fetch dependencies from Maven / Ivy repositories";
|
2017-04-08 21:03:33 +02:00
|
|
|
license = licenses.asl20;
|
2017-03-20 17:04:40 +01:00
|
|
|
maintainers = with maintainers; [ adelbertc nequissimus ];
|
2017-03-20 04:58:24 +01:00
|
|
|
};
|
|
|
|
}
|