···1{ fetchurl, lib, stdenv, zstd
2, autoPatchelfHook, gcc-unwrapped
3+, testers, buck2 # for passthru.tests
4}:
56let
···66 doInstallCheck = true;
67 installCheckPhase = "$out/bin/buck2 --version";
6869+ passthru = {
70+ updateScript = ./update.sh;
71+ tests = testers.testVersion {
72+ package = buck2;
73+74+ # NOTE (aseipp): the buck2 --version command doesn't actually print out
75+ # the given version tagged in the release, but a hash, but not the git
76+ # hash; the entire version logic is bizarrely specific to buck2, and needs
77+ # to be reworked the open source build to behave like expected. in the
78+ # mean time, it *does* always print out 'buck2 <hash>...' so we can just
79+ # match on "buck2"
80+ version = "buck2";
81+ };
82+ };
83+84 meta = with lib; {
85 description = "Fast, hermetic, multi-language build system";
86 homepage = "https://buck2.build";
87+ changelog = "https://github.com/facebook/buck2/releases/tag/${buck2-version}";
88 license = with licenses; [ asl20 /* or */ mit ];
89+ mainProgram = "buck2";
90+ maintainers = with maintainers; [ thoughtpolice ];
91 platforms = [
92 "x86_64-linux" "aarch64-linux"
93 "x86_64-darwin" "aarch64-darwin"
94 ];
095 };
96}
···28 #
29 # We set SECURITY_WRITABLE_HOOKS n primarily for documentation purposes; the
30 # config builder fails to detect that it has indeed been unset.
31- SECURITY_SELINUX_DISABLE = no;
32 SECURITY_WRITABLE_HOOKS = option no;
3334 STRICT_KERNEL_RWX = yes;
···28 #
29 # We set SECURITY_WRITABLE_HOOKS n primarily for documentation purposes; the
30 # config builder fails to detect that it has indeed been unset.
31+ SECURITY_SELINUX_DISABLE = whenOlder "6.4" no; # On 6.4: error: unused option: SECURITY_SELINUX_DISABLE
32 SECURITY_WRITABLE_HOOKS = option no;
3334 STRICT_KERNEL_RWX = yes;