summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorPhillip Cloud <417981+cpcloud@users.noreply.github.com>2020-11-09 14:43:52 -0500
committerGitHub <noreply@github.com>2020-11-09 20:43:52 +0100
commit2472122bf39f2baf545bc113bda7b50681b7f138 (patch)
treec6a4f9baa71a420ee2911200abe3cc6d8dd36aa5 /pkgs
parent05192975fb83ace3c00d8e23ff38d95a56a318de (diff)
downloadnixpkgs-2472122bf39f2baf545bc113bda7b50681b7f138.tar
nixpkgs-2472122bf39f2baf545bc113bda7b50681b7f138.tar.gz
nixpkgs-2472122bf39f2baf545bc113bda7b50681b7f138.tar.bz2
nixpkgs-2472122bf39f2baf545bc113bda7b50681b7f138.tar.lz
nixpkgs-2472122bf39f2baf545bc113bda7b50681b7f138.tar.xz
nixpkgs-2472122bf39f2baf545bc113bda7b50681b7f138.tar.zst
nixpkgs-2472122bf39f2baf545bc113bda7b50681b7f138.zip
arcanist: copy directly from $PWD to pick up any applied patches (#95879)
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/tools/misc/arcanist/default.nix32
1 files changed, 19 insertions, 13 deletions
diff --git a/pkgs/development/tools/misc/arcanist/default.nix b/pkgs/development/tools/misc/arcanist/default.nix
index fcddf1d0cac..14ef09ee7ed 100644
--- a/pkgs/development/tools/misc/arcanist/default.nix
+++ b/pkgs/development/tools/misc/arcanist/default.nix
@@ -1,20 +1,24 @@
-{ stdenv, fetchFromGitHub, php, flex }:
+{ bison
+, fetchFromGitHub
+, flex
+, php
+, stdenv
+}:
 
 # Make a custom wrapper. If `wrapProgram` is used, arcanist thinks .arc-wrapped is being
 # invoked and complains about it being an unknown toolset. We could use `makeWrapper`, but
 # then we’d need to still craft a script that does the `php libexec/arcanist/bin/...` dance
 # anyway... So just do everything at once.
 let makeArcWrapper = toolset: ''
-    cat << WRAPPER > $out/bin/${toolset}
-    #!$shell -e
-    export PATH='${php}/bin/'\''${PATH:+':'}\$PATH
-    exec ${php}/bin/php $out/libexec/arcanist/bin/${toolset} "\$@"
-    WRAPPER
-    chmod +x $out/bin/${toolset}
+  cat << WRAPPER > $out/bin/${toolset}
+  #!$shell -e
+  export PATH='${php}/bin/'\''${PATH:+':'}\$PATH
+  exec ${php}/bin/php $out/libexec/arcanist/bin/${toolset} "\$@"
+  WRAPPER
+  chmod +x $out/bin/${toolset}
 '';
 
 in
-
 stdenv.mkDerivation {
   pname = "arcanist";
   version = "20200711";
@@ -25,7 +29,7 @@ stdenv.mkDerivation {
     rev = "2565cc7b4d1dbce6bc7a5b3c4e72ae94be4712fe";
     sha256 = "0jiv4aj4m5750dqw9r8hizjkwiyxk4cg4grkr63sllsa2dpiibxw";
   };
-  buildInputs = [ php flex ];
+  buildInputs = [ bison flex php ];
 
   postPatch = stdenv.lib.optionalString stdenv.isAarch64 ''
     substituteInPlace support/xhpast/Makefile \
@@ -33,13 +37,15 @@ stdenv.mkDerivation {
   '';
 
   buildPhase = ''
+    make cleanall -C support/xhpast
     make xhpast -C support/xhpast
   '';
 
   installPhase = ''
     mkdir -p $out/bin $out/libexec
     make install -C support/xhpast
-    cp -R $src $out/libexec/arcanist
+    make cleanall -C support/xhpast
+    cp -R . $out/libexec/arcanist
 
     ${makeArcWrapper "arc"}
     ${makeArcWrapper "phage"}
@@ -53,9 +59,9 @@ stdenv.mkDerivation {
 
   meta = {
     description = "Command line interface to Phabricator";
-    homepage    = "http://phabricator.org";
-    license     = stdenv.lib.licenses.asl20;
-    platforms   = stdenv.lib.platforms.unix;
+    homepage = "http://phabricator.org";
+    license = stdenv.lib.licenses.asl20;
+    platforms = stdenv.lib.platforms.unix;
     maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
   };
 }