nixpkgs/pkgs/development/web/lucky-cli/default.nix
2020-09-05 06:47:56 +00:00

43 lines
984 B
Nix

{ lib, fetchFromGitHub, crystal, makeWrapper, openssl }:
crystal.buildCrystalPackage rec {
pname = "lucky-cli";
version = "0.23.1";
src = fetchFromGitHub {
owner = "luckyframework";
repo = "lucky_cli";
rev = "v${version}";
sha256 = "0xj7mcmz1rxv3ff530q8c5y1y7hccsmr8azk9nhmrk1q355vnxfw";
};
# 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; {
description =
"A Crystal library for creating and running tasks. Also generates Lucky projects";
license = licenses.mit;
maintainers = with maintainers; [ peterhoeg ];
platforms = platforms.unix;
};
}