2020-03-18 02:16:02 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, crystal, shards, makeWrapper, pkgconfig, which
|
|
|
|
, openssl, readline, libyaml, zlib }:
|
2018-09-21 01:51:13 +01:00
|
|
|
|
2020-03-18 02:16:02 +00:00
|
|
|
crystal.buildCrystalPackage rec {
|
2018-11-04 23:32:52 +00:00
|
|
|
pname = "icr";
|
2020-03-18 02:16:02 +00:00
|
|
|
version = "0.8.0";
|
2018-09-21 01:51:13 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2020-03-18 02:16:02 +00:00
|
|
|
owner = "crystal-community";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1bz2bhs6csyg2rhrlknlvaiilq3vq8plxjh1hdxmbrfi3n6c7k5a";
|
2018-09-21 01:51:13 +01:00
|
|
|
};
|
|
|
|
|
2020-03-18 02:16:02 +00:00
|
|
|
shardsFile = ./shards.nix;
|
|
|
|
|
|
|
|
buildInputs = [ libyaml openssl readline zlib ];
|
2018-09-21 01:51:13 +01:00
|
|
|
|
2020-03-18 02:16:02 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper pkgconfig which ];
|
2018-09-21 01:51:13 +01:00
|
|
|
|
2020-03-18 02:16:02 +00:00
|
|
|
# tests are failing due to our sandbox
|
|
|
|
doCheck = false;
|
2018-09-21 01:51:13 +01:00
|
|
|
|
2020-03-18 02:16:02 +00:00
|
|
|
postFixup = ''
|
|
|
|
wrapProgram $out/bin/icr \
|
|
|
|
--prefix PATH : ${lib.makeBinPath [ crystal shards makeWrapper which ]}
|
|
|
|
'';
|
2018-09-21 01:51:13 +01:00
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|