diff options
author | Benjamin Staffin <benley@gmail.com> | 2021-09-13 15:01:51 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-13 15:01:51 -0400 |
commit | 3d0c3e9fcaa698b0a9908e7b396060661b96e94d (patch) | |
tree | 3c4e8043a047d715d0e1f1bcf239a607be85c02b /pkgs/development/tools/misc | |
parent | 359203459580a280ae4962d7f7cece321525b872 (diff) | |
download | nixpkgs-3d0c3e9fcaa698b0a9908e7b396060661b96e94d.tar nixpkgs-3d0c3e9fcaa698b0a9908e7b396060661b96e94d.tar.gz nixpkgs-3d0c3e9fcaa698b0a9908e7b396060661b96e94d.tar.bz2 nixpkgs-3d0c3e9fcaa698b0a9908e7b396060661b96e94d.tar.lz nixpkgs-3d0c3e9fcaa698b0a9908e7b396060661b96e94d.tar.xz nixpkgs-3d0c3e9fcaa698b0a9908e7b396060661b96e94d.tar.zst nixpkgs-3d0c3e9fcaa698b0a9908e7b396060661b96e94d.zip |
arcanist: generate & install bash-completion (#122596)
* arcanist: generate & install bash-completion Arcanist only supports bash for shell-completion as of 20200711, otherwise I would include zsh and/or fish here. upstream discussion of zsh non-support: https://secure.phabricator.com/D19700 * arcanist: apply nixpkgs-hammering recommendations * arcanist: obey makeFlags/makeFlagsArray/NIX_BUILD_CORES
Diffstat (limited to 'pkgs/development/tools/misc')
-rw-r--r-- | pkgs/development/tools/misc/arcanist/default.nix | 22 |
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 a5a9d724a79..94e230e6a12 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; |