depot/third_party/nixpkgs/pkgs/development/web/lucky-cli/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

44 lines
1.1 KiB
Nix

{ lib, fetchFromGitHub, crystal, makeWrapper, openssl }:
crystal.buildCrystalPackage rec {
pname = "lucky-cli";
version = "1.1.0";
src = fetchFromGitHub {
owner = "luckyframework";
repo = "lucky_cli";
rev = "v${version}";
hash = "sha256-mDUx9cQoYpU9kSAls36kzNVYZ8a4aqHEMIWfzS41NBk=";
};
# 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 = "Crystal library for creating and running tasks. Also generates Lucky projects";
homepage = "https://luckyframework.org/";
license = licenses.mit;
maintainers = with maintainers; [ peterhoeg ];
mainProgram = "lucky";
platforms = platforms.unix;
broken = lib.versionOlder crystal.version "1.6.0";
};
}