summary refs log tree commit diff
path: root/pkgs/development/tools/icr/default.nix
blob: 8fb79a9eabe3677ff24c26276fc15bcbcf5f3704 (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
34
{ stdenv, fetchFromGitHub, crystal, shards, which
, openssl, readline }:

stdenv.mkDerivation rec {
  pname = "icr";
  version = "0.5.0";

  src = fetchFromGitHub {
    owner  = "crystal-community";
    repo   = "icr";
    rev    = "v${version}";
    sha256 = "1vavdzgm06ssnxm6mylki6xma0mfsj63n5kivhk1v4pg4xj966w5";
  };

  postPatch = ''
    substituteInPlace Makefile \
      --replace /usr/local $out
  '';

  buildInputs = [ openssl readline ];

  nativeBuildInputs = [ crystal 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 ];
  };
}