2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2021-01-25 14:25:22 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, crystal
|
|
|
|
, shards
|
|
|
|
, makeWrapper
|
|
|
|
, pkg-config
|
|
|
|
, 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";
|
2021-01-25 14:25:22 +00:00
|
|
|
version = "unstable-2020-10-06";
|
2018-09-21 01:51:13 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2020-03-18 02:16:02 +00:00
|
|
|
owner = "crystal-community";
|
2021-01-25 14:25:22 +00:00
|
|
|
repo = "icr";
|
|
|
|
rev = "8c57cd7c1fdf8088cb05c1587bd6c40d244a8a80";
|
|
|
|
sha256 = "sha256-b0w6oG2npNgdi2ZowMlJy0iUxQWqb9+DiruQl7Ztb0E=";
|
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
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper pkg-config 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
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
meta = with lib; {
|
2018-09-21 01:51:13 +01:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|