Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 50 lines 1.1 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 crystal, 5 makeWrapper, 6 openssl, 7}: 8 9crystal.buildCrystalPackage rec { 10 pname = "lucky-cli"; 11 version = "1.1.0"; 12 13 src = fetchFromGitHub { 14 owner = "luckyframework"; 15 repo = "lucky_cli"; 16 rev = "v${version}"; 17 hash = "sha256-mDUx9cQoYpU9kSAls36kzNVYZ8a4aqHEMIWfzS41NBk="; 18 }; 19 20 # the integration tests will try to clone a remote repos 21 postPatch = '' 22 rm -rf spec/integration 23 ''; 24 25 format = "crystal"; 26 27 lockFile = ./shard.lock; 28 shardsFile = ./shards.nix; 29 30 crystalBinaries.lucky.src = "src/lucky.cr"; 31 32 buildInputs = [ openssl ]; 33 34 nativeBuildInputs = [ makeWrapper ]; 35 36 postInstall = '' 37 wrapProgram $out/bin/lucky \ 38 --prefix PATH : ${lib.makeBinPath [ crystal ]} 39 ''; 40 41 meta = with lib; { 42 description = "Crystal library for creating and running tasks. Also generates Lucky projects"; 43 homepage = "https://luckyframework.org/"; 44 license = licenses.mit; 45 maintainers = with maintainers; [ peterhoeg ]; 46 mainProgram = "lucky"; 47 platforms = platforms.unix; 48 broken = lib.versionOlder crystal.version "1.6.0"; 49 }; 50}