2020-04-24 23:36:52 +00:00
|
|
|
{ lib, fetchFromGitHub, crystal, makeWrapper, openssl }:
|
|
|
|
|
|
|
|
crystal.buildCrystalPackage rec {
|
|
|
|
pname = "lucky-cli";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "1.0.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "luckyframework";
|
|
|
|
repo = "lucky_cli";
|
|
|
|
rev = "v${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-Ky4DmClSyAVBAetpZM5tFnQZ74fchCOgcxBftd+gwlE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# the integration tests will try to clone a remote repos
|
|
|
|
postPatch = ''
|
|
|
|
rm -rf spec/integration
|
|
|
|
'';
|
|
|
|
|
|
|
|
format = "crystal";
|
|
|
|
|
|
|
|
lockFile = ./shard.lock;
|
|
|
|
shardsFile = ./shards.nix;
|
|
|
|
|
|
|
|
crystalBinaries.lucky.src = "src/lucky.cr";
|
|
|
|
|
|
|
|
buildInputs = [ openssl ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/lucky \
|
|
|
|
--prefix PATH : ${lib.makeBinPath [ crystal ]}
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2022-05-18 14:49:53 +00:00
|
|
|
description = "A Crystal library for creating and running tasks. Also generates Lucky projects";
|
2022-02-20 05:27:41 +00:00
|
|
|
homepage = "https://luckyframework.org/";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
2022-05-18 14:49:53 +00:00
|
|
|
mainProgram = "lucky";
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
2020-12-29 15:07:52 +00:00
|
|
|
broken = lib.versionOlder crystal.version "0.35.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|