nixpkgs/pkgs/development/tools/icr/default.nix

46 lines
989 B
Nix
Raw Normal View History

{ lib
, fetchFromGitHub
, crystal
, shards
, makeWrapper
, pkg-config
, which
, openssl
, readline
, libyaml
, zlib
}:
2018-09-21 02:51:13 +02:00
2020-03-18 03:16:02 +01:00
crystal.buildCrystalPackage rec {
pname = "icr";
2021-03-30 09:25:26 +02:00
version = "unstable-2021-03-14";
2018-09-21 02:51:13 +02:00
src = fetchFromGitHub {
2020-03-18 03:16:02 +01:00
owner = "crystal-community";
repo = "icr";
2021-03-30 09:25:26 +02:00
rev = "b6b335f40aff4c2c07d21250949935e8259f7d1b";
sha256 = "sha256-Qoy37lCdHFnMAuuqyB9uT15/RLllksFyApYAGy+RmDs=";
2018-09-21 02:51:13 +02:00
};
2020-03-18 03:16:02 +01:00
shardsFile = ./shards.nix;
buildInputs = [ libyaml openssl readline zlib ];
2018-09-21 02:51:13 +02:00
nativeBuildInputs = [ makeWrapper pkg-config which ];
2018-09-21 02:51:13 +02:00
2020-03-18 03:16:02 +01:00
# tests are failing due to our sandbox
doCheck = false;
2018-09-21 02:51:13 +02:00
2020-03-18 03:16:02 +01:00
postFixup = ''
wrapProgram $out/bin/icr \
--prefix PATH : ${lib.makeBinPath [ crystal shards makeWrapper which ]}
'';
2018-09-21 02:51:13 +02:00
meta = with lib; {
2018-09-21 02:51:13 +02:00
description = "Interactive console for the Crystal programming language";
homepage = "https://github.com/crystal-community/icr";
2018-09-21 02:51:13 +02:00
license = licenses.mit;
maintainers = with maintainers; [ peterhoeg ];
};
}