From 1e3bae6c4158579d94f75d14d4a007cae162116a Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Wed, 18 Mar 2020 10:16:02 +0800 Subject: icr: 0.6.0 -> 0.8.0 --- pkgs/development/tools/icr/default.nix | 34 ++++++++++++++++++---------------- pkgs/development/tools/icr/shards.nix | 8 ++++++++ 2 files changed, 26 insertions(+), 16 deletions(-) create mode 100644 pkgs/development/tools/icr/shards.nix (limited to 'pkgs/development/tools/icr') diff --git a/pkgs/development/tools/icr/default.nix b/pkgs/development/tools/icr/default.nix index 3a39d0ddf6bd..50a349d8ff71 100644 --- a/pkgs/development/tools/icr/default.nix +++ b/pkgs/development/tools/icr/default.nix @@ -1,28 +1,30 @@ -{ stdenv, fetchFromGitHub, crystal, shards, which -, openssl, readline, libyaml }: +{ stdenv, lib, fetchFromGitHub, crystal, shards, makeWrapper, pkgconfig, which +, openssl, readline, libyaml, zlib }: -stdenv.mkDerivation rec { +crystal.buildCrystalPackage rec { pname = "icr"; - version = "0.6.0"; + version = "0.8.0"; src = fetchFromGitHub { - owner = "crystal-community"; - repo = pname; - rev = "v${version}"; - sha256 = "0kkdqrxk4f4bqbb84mgjrk9r0fz1hsz95apvjsc49gav4c8xx3mb"; + owner = "crystal-community"; + repo = pname; + rev = "v${version}"; + sha256 = "1bz2bhs6csyg2rhrlknlvaiilq3vq8plxjh1hdxmbrfi3n6c7k5a"; }; - postPatch = '' - substituteInPlace Makefile \ - --replace /usr/local $out - ''; + shardsFile = ./shards.nix; + + buildInputs = [ libyaml openssl readline zlib ]; - buildInputs = [ crystal libyaml openssl readline ]; + nativeBuildInputs = [ makeWrapper pkgconfig which ]; - nativeBuildInputs = [ shards which ]; + # tests are failing due to our sandbox + doCheck = false; - doCheck = true; - checkTarget = "test"; + postFixup = '' + wrapProgram $out/bin/icr \ + --prefix PATH : ${lib.makeBinPath [ crystal shards makeWrapper which ]} + ''; meta = with stdenv.lib; { description = "Interactive console for the Crystal programming language"; diff --git a/pkgs/development/tools/icr/shards.nix b/pkgs/development/tools/icr/shards.nix new file mode 100644 index 000000000000..1dddd5a42c39 --- /dev/null +++ b/pkgs/development/tools/icr/shards.nix @@ -0,0 +1,8 @@ +{ + readline = { + owner = "crystal-lang"; + repo = "crystal-readline"; + rev = "0fb7d186da8e1b157998d98d1c96e99699b791eb"; + sha256 = "1rk27vw3ssldgnfgprwvz2gag02v4g6d6yg56b3sk9w3fn8jyyi8"; + }; +} -- cgit 1.4.1