buck: make propagatedBuildInputs runtime deps
This commit is contained in:
parent
48c910611f
commit
dffbe98dd6
|
@ -1,6 +1,8 @@
|
||||||
{ stdenv, pkgs, fetchFromGitHub, fetchgit, jdk, ant, python2, watchman, unzip, bash }:
|
{ stdenv, fetchFromGitHub, jdk, ant, python2, python2Packages, watchman, unzip, bash, jre, makeWrapper }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
|
let
|
||||||
|
in stdenv.mkDerivation rec {
|
||||||
name = "buck-${version}";
|
name = "buck-${version}";
|
||||||
version = "v2017.05.31.01";
|
version = "v2017.05.31.01";
|
||||||
|
|
||||||
|
@ -14,27 +16,23 @@ stdenv.mkDerivation rec {
|
||||||
patches = [ ./pex-mtime.patch ];
|
patches = [ ./pex-mtime.patch ];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
for f in $(grep -l -r '/bin/bash'); do
|
grep -l -r '/bin/bash' --null | xargs -0 sed -i -e "s!/bin/bash!${bash}/bin/bash!g"
|
||||||
substituteInPlace "$f" --replace '/bin/bash' '${bash}/bin/bash'
|
|
||||||
done
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildInputs = [ jdk ant ];
|
buildInputs = [ jdk ant python2 watchman python2Packages.pywatchman ];
|
||||||
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
propagatedBuildInputs = [ python2 watchman pkgs.python27Packages.pywatchman ];
|
buildPhase = ''
|
||||||
|
ant
|
||||||
|
./bin/buck build buck
|
||||||
|
'';
|
||||||
|
|
||||||
buildPhase =
|
installPhase = ''
|
||||||
''
|
install -D -m755 buck-out/gen/programs/buck.pex $out/bin/buck
|
||||||
ant
|
wrapProgram $out/bin/buck \
|
||||||
./bin/buck --version
|
--prefix PYTHONPATH : $PYTHONPATH \
|
||||||
./bin/buck build buck
|
--prefix PATH : "${stdenv.lib.makeBinPath [jre watchman]}"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase =
|
|
||||||
''
|
|
||||||
mkdir -p $out/bin
|
|
||||||
cp buck-out/gen/programs/buck.pex $out/bin/buck
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = https://buckbuild.com/;
|
homepage = https://buckbuild.com/;
|
||||||
|
|
Loading…
Reference in a new issue