3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/icr/default.nix
Renaud 3cdb2c3d0c
icr: 0.5.0 -> 0.6.0 (#61156)
* icr: 0.5.0 -> 0.6.0

* icr: ensure crystal is in PATH
2019-05-12 15:27:55 +02:00

38 lines
946 B
Nix

{ stdenv, fetchFromGitHub, crystal, shards, which, makeWrapper
, openssl, readline, libyaml }:
stdenv.mkDerivation rec {
pname = "icr";
version = "0.6.0";
src = fetchFromGitHub {
owner = "crystal-community";
repo = pname;
rev = "v${version}";
sha256 = "0kkdqrxk4f4bqbb84mgjrk9r0fz1hsz95apvjsc49gav4c8xx3mb";
};
postPatch = ''
substituteInPlace Makefile \
--replace /usr/local $out
'';
buildInputs = [ crystal libyaml openssl readline ];
nativeBuildInputs = [ makeWrapper shards which ];
doCheck = true;
checkTarget = "test";
postInstall = ''
wrapProgram $out/bin/icr --prefix PATH : "${stdenv.lib.makeBinPath [ crystal ]}"
'';
meta = with stdenv.lib; {
description = "Interactive console for the Crystal programming language";
homepage = "https://github.com/crystal-community/icr";
license = licenses.mit;
maintainers = with maintainers; [ peterhoeg ];
};
}