From 5f00108cb4b6d85dc158718c9ec323313ad8663a Mon Sep 17 00:00:00 2001 From: Thierry Delafontaine Date: Fri, 4 Sep 2026 17:28:56 +0200 Subject: [PATCH] gavin-bc: recreate the `dc` link with the default umask 022 Upstream's `safe-install.sh` sets umask 077 before creating the `dc` -> `bc` symlink. Darwin records symlink permissions, making the linkk unreadable for non-root. This recreates the link with the default umask 022. Resolves #555720 --- pkgs/by-name/ga/gavin-bc/package.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/by-name/ga/gavin-bc/package.nix b/pkgs/by-name/ga/gavin-bc/package.nix index 60ff410d8873..f70ba4ff5973 100644 --- a/pkgs/by-name/ga/gavin-bc/package.nix +++ b/pkgs/by-name/ga/gavin-bc/package.nix @@ -19,6 +19,13 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-bIQk0HzUzL1Ju4+iDpFj1n+GKCj9a3AUAbYA3yX5TNg="; }; + # Upstream's safe-install.sh sets umask 077 before creating the dc -> bc + # symlink. Darwin records symlink permissions, making the link unreadable for + # non-root. This recreates the link with the default umask 022. + postInstall = '' + ln -sf bc $out/bin/dc + ''; + nativeInstallCheckInputs = [ versionCheckHook ]; versionCheckProgram = "${placeholder "out"}/bin/bc"; doInstallCheck = true;