2022-05-10 02:00:12 +00:00
|
|
|
{ lib, fetchFromGitHub, crystal, coreutils, makeWrapper, bash }:
|
2018-09-21 00:51:37 +00:00
|
|
|
|
2021-02-01 04:19:12 +00:00
|
|
|
crystal.buildCrystalPackage rec {
|
2018-11-04 23:32:52 +00:00
|
|
|
pname = "scry";
|
2021-03-30 08:38:10 +00:00
|
|
|
version = "0.9.1";
|
2018-09-21 00:51:37 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2019-12-03 15:38:58 +00:00
|
|
|
owner = "crystal-lang-tools";
|
|
|
|
repo = pname;
|
2021-03-30 08:38:10 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-hqyG1aKY3M8q8lZEKzpUUKl9jS7NF+VMsma6+C0sCbg=";
|
2018-09-21 00:51:37 +00:00
|
|
|
};
|
|
|
|
|
2021-03-30 08:38:10 +00:00
|
|
|
# a bunch of tests fail when built in the sandbox while perfectly fine outside
|
2020-04-19 07:34:49 +00:00
|
|
|
postPatch = ''
|
2021-03-30 08:38:10 +00:00
|
|
|
rm spec/scry/{client,completion_provider,context,executable}_spec.cr
|
2020-04-19 07:34:49 +00:00
|
|
|
'';
|
|
|
|
|
2021-02-01 04:19:12 +00:00
|
|
|
format = "shards";
|
2020-04-19 07:34:49 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2022-05-10 02:00:12 +00:00
|
|
|
buildInputs = [ bash ];
|
2020-04-19 07:34:49 +00:00
|
|
|
|
2019-12-03 15:38:58 +00:00
|
|
|
shardsFile = ./shards.nix;
|
2020-04-19 07:34:49 +00:00
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
wrapProgram $out/bin/scry \
|
|
|
|
--prefix PATH : ${lib.makeBinPath [ crystal coreutils ]}
|
|
|
|
'';
|
|
|
|
|
|
|
|
# the binary doesn't take any arguments, so this will hang
|
|
|
|
doInstallCheck = false;
|
|
|
|
|
2019-12-03 15:38:58 +00:00
|
|
|
meta = with lib; {
|
2018-09-21 00:51:37 +00:00
|
|
|
description = "Code analysis server for the Crystal programming language";
|
2019-12-03 15:38:58 +00:00
|
|
|
homepage = "https://github.com/crystal-lang-tools/scry";
|
2018-09-21 00:51:37 +00:00
|
|
|
license = licenses.mit;
|
2020-11-17 11:02:06 +00:00
|
|
|
maintainers = with maintainers; [ peterhoeg Br1ght0ne ];
|
2018-09-21 00:51:37 +00:00
|
|
|
};
|
|
|
|
}
|