Merge pull request #63725 from peterhoeg/u/crystal

crystal: init at 0.29.0
This commit is contained in:
Peter Hoeg
2019-06-25 12:59:56 +08:00
committed by GitHub
5 changed files with 74 additions and 15 deletions

View File

@@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
name = "shards-${version}";
version = "0.8.1";
version = "0.9.0";
src = fetchFromGitHub {
owner = "crystal-lang";
repo = "shards";
rev = "v${version}";
sha256 = "1cjn2lafr08yiqzlhyqx14jjjxf1y24i2kk046px07gljpnlgqwk";
sha256 = "19q0xww4v0h5ln9gz8d8zv0c9ig761ik7gw8y31yxynzgzihwpf4";
};
buildInputs = [ crystal libyaml pcre which ];

View File

@@ -1,9 +1,8 @@
{ stdenv, fetchFromGitHub, crystal, shards, which }:
{ stdenv, lib, fetchFromGitHub, crystal, shards, llvm, which }:
stdenv.mkDerivation rec {
pname = "scry";
# 0.7.1 doesn't work with crystal > 0.25
version = "0.7.1.20180919";
version = "0.8.0";
src = fetchFromGitHub {
owner = "crystal-lang-tools";
@@ -12,7 +11,9 @@ stdenv.mkDerivation rec {
sha256 = "1yq7jap3y5pr2yqc6fn6bxshzwv7dz3w97incq7wpcvi7ibb4lcn";
};
nativeBuildInputs = [ crystal shards which ];
patches = lib.optional (lib.versionAtLeast crystal.version "0.28") ./fix_for_crystal_0_28_and_above.patch;
nativeBuildInputs = [ crystal shards llvm which ];
buildPhase = ''
runHook preBuild

View File

@@ -0,0 +1,20 @@
diff --git a/src/scry/completion_provider.cr b/src/scry/completion_provider.cr
index 29e0d36..f67438c 100644
--- a/src/scry/completion_provider.cr
+++ b/src/scry/completion_provider.cr
@@ -1,4 +1,5 @@
require "./log"
+require "compiler/crystal/codegen/target"
require "compiler/crystal/crystal_path"
require "./completion/*"
diff --git a/src/scry/parse_analyzer.cr b/src/scry/parse_analyzer.cr
index d87eca4..bbe9ed5 100644
--- a/src/scry/parse_analyzer.cr
+++ b/src/scry/parse_analyzer.cr
@@ -1,4 +1,5 @@
require "compiler/crystal/syntax"
+require "compiler/crystal/codegen/target"
require "compiler/crystal/crystal_path"
require "./workspace"
require "./text_document"