about summary refs log tree commit diff
path: root/pkgs/development/tools/icr/default.nix
blob: 3a39d0ddf6bd7a20af65d9cbbc2ccaba1a73d393 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ stdenv, fetchFromGitHub, crystal, shards, which
, 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 = [ shards which ];

  doCheck = true;
  checkTarget = "test";

  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 ];
  };
}