at master 1.3 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 installShellFiles, 5 php, 6 nix-update-script, 7 versionCheckHook, 8}: 9 10php.buildComposerProject2 (finalAttrs: { 11 pname = "castor"; 12 version = "0.27.0"; 13 14 src = fetchFromGitHub { 15 owner = "jolicode"; 16 repo = "castor"; 17 tag = "v${finalAttrs.version}"; 18 hash = "sha256-ot4akuKhNtEXukiDSy69q75phx6EvkJsL0XHAN+el+M="; 19 }; 20 21 vendorHash = "sha256-S5NCV3wd/EA282NA0Wbtj7gbZw9YU835cr5CmpAnapc="; 22 23 nativeBuildInputs = [ installShellFiles ]; 24 25 # install shell completions 26 postInstall = '' 27 installShellCompletion --cmd castor \ 28 --bash <(php $out/bin/castor completion bash) \ 29 --fish <(php $out/bin/castor completion fish) \ 30 --zsh <(php $out/bin/castor completion zsh) 31 ''; 32 33 doInstallCheck = true; 34 nativeInstallCheckInputs = [ versionCheckHook ]; 35 versionCheckProgramArg = "--version"; 36 37 passthru = { 38 updateScript = nix-update-script { }; 39 }; 40 41 meta = { 42 broken = lib.versionOlder php.version "8.2"; 43 changelog = "https://github.com/jolicode/castor/blob/v${finalAttrs.version}/CHANGELOG.md"; 44 description = "DX oriented task runner and command launcher built with PHP"; 45 homepage = "https://github.com/jolicode/castor"; 46 license = lib.licenses.mit; 47 maintainers = with lib.maintainers; [ gaelreyrol ]; 48 mainProgram = "castor"; 49 }; 50})