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