2019-06-06 07:46:57 +01:00
|
|
|
{ stdenv, fetchFromGitHub, crystal, shards, which
|
2019-05-12 14:27:55 +01:00
|
|
|
, openssl, readline, libyaml }:
|
2018-09-21 01:51:13 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-11-04 23:32:52 +00:00
|
|
|
pname = "icr";
|
2019-05-12 14:27:55 +01:00
|
|
|
version = "0.6.0";
|
2018-09-21 01:51:13 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "crystal-community";
|
2019-05-12 14:27:55 +01:00
|
|
|
repo = pname;
|
2018-09-21 01:51:13 +01:00
|
|
|
rev = "v${version}";
|
2019-05-12 14:27:55 +01:00
|
|
|
sha256 = "0kkdqrxk4f4bqbb84mgjrk9r0fz1hsz95apvjsc49gav4c8xx3mb";
|
2018-09-21 01:51:13 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace /usr/local $out
|
|
|
|
'';
|
|
|
|
|
2019-05-12 14:27:55 +01:00
|
|
|
buildInputs = [ crystal libyaml openssl readline ];
|
2018-09-21 01:51:13 +01:00
|
|
|
|
2019-06-06 07:46:57 +01:00
|
|
|
nativeBuildInputs = [ shards which ];
|
2018-09-21 01:51:13 +01:00
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
checkTarget = "test";
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Interactive console for the Crystal programming language";
|
2019-05-12 14:27:55 +01:00
|
|
|
homepage = "https://github.com/crystal-community/icr";
|
2018-09-21 01:51:13 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
|
|
|
};
|
|
|
|
}
|