Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

70 lines
1.4 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
jdk8,
ant,
python3,
watchman,
bash,
makeWrapper,
}:
stdenv.mkDerivation rec {
pname = "buck";
version = "2022.05.05.01";
src = fetchFromGitHub {
owner = "facebook";
repo = pname;
rev = "v${version}";
sha256 = "15v4sk1l43pgd5jxr5lxnh0ks6vb3xk5253n66s7vvsnph48j14q";
};
patches = [ ./pex-mtime.patch ];
postPatch = ''
grep -l -r '/bin/bash' --null | xargs -0 sed -i -e "s!/bin/bash!${bash}/bin/bash!g"
'';
nativeBuildInputs = [
makeWrapper
python3
jdk8
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
wrapProgram $out/bin/buck \
--prefix PATH : "${
lib.makeBinPath [
jdk8
watchman
python3
]
}"
'';
meta = with lib; {
homepage = "https://buck.build/";
description = "High-performance build tool";
mainProgram = "buck";
maintainers = [ maintainers.jgertm ];
license = licenses.asl20;
platforms = platforms.all;
# https://github.com/facebook/buck/issues/2666
broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64;
};
}