blob: 369b6220adc5cb753b18a1f94c327c76e7e209fa (
plain) (
blame)
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
49
50
|
{ lib
, fetchFromGitHub
, installShellFiles
, php
, nix-update-script
, testers
}:
php.buildComposerProject (finalAttrs: {
pname = "castor";
version = "0.9.1";
src = fetchFromGitHub {
owner = "jolicode";
repo = "castor";
rev = "v${finalAttrs.version}";
hash = "sha256-zTtMNBZcWjEQB70/6i4pvYEepDVCItJgkwrQ2xrXDAU=";
};
vendorHash = "sha256-Jh4mNNYEM9sy0Dp+dZtD+xrMICjAuspe9D9BDXcfUPM=";
nativeBuildInputs = [ installShellFiles ];
# install shell completions
postInstall = ''
echo "yes" | ${php}/bin/php $out/share/php/castor/bin/castor
installShellCompletion --cmd castor \
--bash <(${php}/bin/php $out/share/php/castor/bin/castor completion bash) \
--fish <(${php}/bin/php $out/share/php/castor/bin/castor completion fish) \
--zsh <(${php}/bin/php $out/share/php/castor/bin/castor completion zsh)
'';
passthru = {
updateScript = nix-update-script { };
tests.version = testers.testVersion {
command = "castor --version";
package = php.packages.castor;
version = "v${finalAttrs.version}";
};
};
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 = with lib.maintainers; [ gaelreyrol ];
mainProgram = "castor";
};
})
|