about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/icr
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/tools/icr')
-rw-r--r--nixpkgs/pkgs/development/tools/icr/default.nix45
-rw-r--r--nixpkgs/pkgs/development/tools/icr/shards.nix8
2 files changed, 53 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/tools/icr/default.nix b/nixpkgs/pkgs/development/tools/icr/default.nix
new file mode 100644
index 000000000000..11e52f77cb80
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/icr/default.nix
@@ -0,0 +1,45 @@
+{ lib
+, fetchFromGitHub
+, crystal
+, shards
+, makeWrapper
+, pkg-config
+, which
+, openssl
+, readline
+, libyaml
+, zlib
+}:
+
+crystal.buildCrystalPackage rec {
+  pname = "icr";
+  version = "unstable-2020-10-06";
+
+  src = fetchFromGitHub {
+    owner = "crystal-community";
+    repo = "icr";
+    rev = "8c57cd7c1fdf8088cb05c1587bd6c40d244a8a80";
+    sha256 = "sha256-b0w6oG2npNgdi2ZowMlJy0iUxQWqb9+DiruQl7Ztb0E=";
+  };
+
+  shardsFile = ./shards.nix;
+
+  buildInputs = [ libyaml openssl readline zlib ];
+
+  nativeBuildInputs = [ makeWrapper pkg-config which ];
+
+  # tests are failing due to our sandbox
+  doCheck = false;
+
+  postFixup = ''
+    wrapProgram $out/bin/icr \
+      --prefix PATH : ${lib.makeBinPath [ crystal shards makeWrapper which ]}
+  '';
+
+  meta = with lib; {
+    description = "Interactive console for the Crystal programming language";
+    homepage = "https://github.com/crystal-community/icr";
+    license = licenses.mit;
+    maintainers = with maintainers; [ peterhoeg ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/tools/icr/shards.nix b/nixpkgs/pkgs/development/tools/icr/shards.nix
new file mode 100644
index 000000000000..1dddd5a42c39
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/icr/shards.nix
@@ -0,0 +1,8 @@
+{
+  readline = {
+    owner = "crystal-lang";
+    repo = "crystal-readline";
+    rev = "0fb7d186da8e1b157998d98d1c96e99699b791eb";
+    sha256 = "1rk27vw3ssldgnfgprwvz2gag02v4g6d6yg56b3sk9w3fn8jyyi8";
+  };
+}