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