diff --git a/pkgs/development/tools/build-managers/buck/default.nix b/pkgs/development/tools/build-managers/buck/default.nix index 0fbcb95704b0..c275d5bc30a1 100644 --- a/pkgs/development/tools/build-managers/buck/default.nix +++ b/pkgs/development/tools/build-managers/buck/default.nix @@ -1,14 +1,14 @@ -{ lib, stdenv, fetchFromGitHub, jdk, ant, python2, python2Packages, watchman, bash, makeWrapper }: +{ lib, stdenv, fetchFromGitHub, jdk11, ant, python3, watchman, bash, makeWrapper }: stdenv.mkDerivation rec { pname = "buck"; - version = "2019.10.17.01"; + version = "2021.01.12.01"; src = fetchFromGitHub { owner = "facebook"; repo = pname; rev = "v${version}"; - sha256 = "1irgp8yq1z11bq3b83yxvj35wqqq7y7b8q4d4y0hc05ac19ja0vj"; + sha256 = "sha256-NFiMQ+cG93R10LlkfUMzZ4TnV0uO5G+8S5TiMI6hU5o="; }; patches = [ ./pex-mtime.patch ]; @@ -17,20 +17,21 @@ stdenv.mkDerivation rec { grep -l -r '/bin/bash' --null | xargs -0 sed -i -e "s!/bin/bash!${bash}/bin/bash!g" ''; - buildInputs = [ jdk ant python2 watchman python2Packages.pywatchman ]; - nativeBuildInputs = [ makeWrapper ]; + nativeBuildInputs = [ makeWrapper python3 jdk11 ant watchman ]; buildPhase = '' + # Set correct version, see https://github.com/facebook/buck/issues/2607 + echo v${version} > .buckrelease + ant PYTHONDONTWRITEBYTECODE=true ./bin/buck build -c buck.release_version=${version} buck ''; installPhase = '' - install -D -m755 buck-out/gen/programs/buck.pex $out/bin/buck + install -D -m755 buck-out/gen/*/programs/buck.pex $out/bin/buck wrapProgram $out/bin/buck \ - --prefix PYTHONPATH : $PYTHONPATH \ - --prefix PATH : "${lib.makeBinPath [jdk watchman]}" + --prefix PATH : "${lib.makeBinPath [ jdk11 watchman python3 ]}" ''; meta = with lib; { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9924c9fa7f0e..8eafce453e47 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12438,9 +12438,7 @@ in wxGTK = wxGTK30; }; - buck = callPackage ../development/tools/build-managers/buck { - jdk = jdk8; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731 - }; + buck = callPackage ../development/tools/build-managers/buck { }; buildkite-agent = buildkite-agent3; buildkite-agent2 = throw "pkgs.buildkite-agent2 has been discontinued. Please use pkgs.buildkite-agent (v3.x)";