Merge pull request #47166 from peterhoeg/u/crystal
crystal: 0.26.1 and introduce 0.25.1
This commit is contained in:
@@ -1,28 +1,32 @@
|
||||
{ stdenv, fetchurl, crystal, libyaml, which }:
|
||||
{ stdenv, fetchFromGitHub, crystal, pcre, libyaml, which }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "shards-${version}";
|
||||
version = "0.8.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/crystal-lang/shards/archive/v${version}.tar.gz";
|
||||
sha256 = "198768izbsqqp063847r2x9ddcf4qfxx7vx7c6gwbmgjmjv4mivm";
|
||||
src = fetchFromGitHub {
|
||||
owner = "crystal-lang";
|
||||
repo = "shards";
|
||||
rev = "v${version}";
|
||||
sha256 = "1cjn2lafr08yiqzlhyqx14jjjxf1y24i2kk046px07gljpnlgqwk";
|
||||
};
|
||||
|
||||
buildInputs = [ crystal libyaml which ];
|
||||
buildInputs = [ crystal libyaml pcre which ];
|
||||
|
||||
buildFlags = [ "CRFLAGS=--release" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp bin/shards $out/bin/
|
||||
runHook preInstall
|
||||
|
||||
install -Dm755 bin/shards $out/bin/shards
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://crystal-lang.org/;
|
||||
license = licenses.asl20;
|
||||
description = "Dependency manager for the Crystal language";
|
||||
maintainers = with maintainers; [ sifmelcara ];
|
||||
platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ];
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ peterhoeg ];
|
||||
inherit (crystal.meta) homepage platforms;
|
||||
};
|
||||
}
|
||||
|
||||
34
pkgs/development/tools/icr/default.nix
Normal file
34
pkgs/development/tools/icr/default.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
{ stdenv, fetchFromGitHub, crystal, shards, which
|
||||
, openssl, readline }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "icr";
|
||||
version = "0.5.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "crystal-community";
|
||||
repo = "icr";
|
||||
rev = "v${version}";
|
||||
sha256 = "1vavdzgm06ssnxm6mylki6xma0mfsj63n5kivhk1v4pg4xj966w5";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile \
|
||||
--replace /usr/local $out
|
||||
'';
|
||||
|
||||
buildInputs = [ openssl readline ];
|
||||
|
||||
nativeBuildInputs = [ crystal shards which ];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
checkTarget = "test";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Interactive console for the Crystal programming language";
|
||||
homepage = https://github.com/crystal-community/icr;
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ peterhoeg ];
|
||||
};
|
||||
}
|
||||
50
pkgs/development/tools/scry/default.nix
Normal file
50
pkgs/development/tools/scry/default.nix
Normal file
@@ -0,0 +1,50 @@
|
||||
{ stdenv, fetchFromGitHub, crystal, shards, which }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "scry";
|
||||
# 0.7.1 doesn't work with crystal > 0.25
|
||||
version = "0.7.1.20180919";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "crystal-lang-tools";
|
||||
repo = "scry";
|
||||
rev = "543c1c3f764298f9fff192ca884d10f72338607d";
|
||||
sha256 = "1yq7jap3y5pr2yqc6fn6bxshzwv7dz3w97incq7wpcvi7ibb4lcn";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ crystal shards which ];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
shards build --release
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -Dm755 -t $out/bin bin/scry
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
# https://github.com/crystal-lang-tools/scry/issues/138
|
||||
doCheck = false;
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
|
||||
crystal spec
|
||||
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Code analysis server for the Crystal programming language";
|
||||
homepage = https://github.com/crystal-lang-tools/scry;
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ peterhoeg ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user