nixpkgs-suyu/pkgs/development/tools/coursier/default.nix

36 lines
1.1 KiB
Nix
Raw Normal View History

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";
sha256 = "0gfr1q66crh6si4682xbxnj41igws83qj710npgm2bvq90xa8m49";
};
in
2017-03-20 04:58:24 +01:00
stdenv.mkDerivation rec {
pname = "coursier";
2019-08-21 21:00:13 +02:00
version = "2.0.0-RC3-3";
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";
2019-08-21 21:00:13 +02:00
sha256 = "1qrybajwk46h6d1yp6n4zxdvrfl19lqhjsqxbm48vk3wbvj31vyl";
2017-03-20 04:58:24 +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
patchShebangs $out/bin/coursier
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; {
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;
maintainers = with maintainers; [ adelbertc nequissimus ];
2017-03-20 04:58:24 +01:00
};
}