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