summaryrefslogtreecommitdiffstats
path: root/pkgs/development/tools/misc/arcanist/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/tools/misc/arcanist/default.nix')
-rw-r--r--pkgs/development/tools/misc/arcanist/default.nix22
1 files changed, 17 insertions, 5 deletions
diff --git a/pkgs/development/tools/misc/arcanist/default.nix b/pkgs/development/tools/misc/arcanist/default.nix
index a5a9d724a79e..94e230e6a12c 100644
--- a/pkgs/development/tools/misc/arcanist/default.nix
+++ b/pkgs/development/tools/misc/arcanist/default.nix
@@ -3,6 +3,7 @@
, flex
, php
, lib, stdenv
+, installShellFiles
}:
# Make a custom wrapper. If `wrapProgram` is used, arcanist thinks .arc-wrapped is being
@@ -29,7 +30,10 @@ stdenv.mkDerivation {
rev = "2565cc7b4d1dbce6bc7a5b3c4e72ae94be4712fe";
sha256 = "0jiv4aj4m5750dqw9r8hizjkwiyxk4cg4grkr63sllsa2dpiibxw";
};
- buildInputs = [ bison flex php ];
+
+ buildInputs = [ php ];
+
+ nativeBuildInputs = [ bison flex installShellFiles ];
postPatch = lib.optionalString stdenv.isAarch64 ''
substituteInPlace support/xhpast/Makefile \
@@ -37,18 +41,26 @@ stdenv.mkDerivation {
'';
buildPhase = ''
- make cleanall -C support/xhpast
- make xhpast -C support/xhpast
+ runHook preBuild
+ make cleanall -C support/xhpast $makeFlags "''${makeFlagsArray[@]}" -j $NIX_BUILD_CORES
+ make xhpast -C support/xhpast $makeFlags "''${makeFlagsArray[@]}" -j $NIX_BUILD_CORES
+ runHook postBuild
'';
installPhase = ''
+ runHook preInstall
mkdir -p $out/bin $out/libexec
- make install -C support/xhpast
- make cleanall -C support/xhpast
+ make install -C support/xhpast $makeFlags "''${makeFlagsArray[@]}" -j $NIX_BUILD_CORES
+ make cleanall -C support/xhpast $makeFlags "''${makeFlagsArray[@]}" -j $NIX_BUILD_CORES
cp -R . $out/libexec/arcanist
${makeArcWrapper "arc"}
${makeArcWrapper "phage"}
+
+ $out/bin/arc shell-complete --generate --
+ installShellCompletion --cmd arc --bash $out/libexec/arcanist/support/shell/rules/bash-rules.sh
+ installShellCompletion --cmd phage --bash $out/libexec/arcanist/support/shell/rules/bash-rules.sh
+ runHook postInstall
'';
doInstallCheck = true;