0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

nixos-rebuild-ng: set TMPDIR in darwin

This commit is contained in:
Thiago Kenji Okada 2024-12-10 10:24:18 +00:00
parent 063639b2be
commit 1d3c452d63

View file

@ -1,5 +1,6 @@
{
lib,
stdenv,
callPackage,
installShellFiles,
mkShell,
@ -12,6 +13,9 @@
withNgSuffix ? true,
withReexec ? false,
withShellFiles ? true,
# Very long tmp dirs lead to "too long for Unix domain socket"
# SSH ControlPath errors. Especially macOS sets long TMPDIR paths.
withTmpdir ? if stdenv.hostPlatform.isDarwin then "/tmp" else null,
}:
let
executable = if withNgSuffix then "nixos-rebuild-ng" else "nixos-rebuild";
@ -73,6 +77,10 @@ python3Packages.buildPythonApplication rec {
pytestFlagsArray = [ "-vv" ];
makeWrapperArgs = lib.optionals (withTmpdir != null) [
"--set TMPDIR ${withTmpdir}"
];
passthru =
let
python-with-pkgs = python3.withPackages (