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, lib,
stdenv,
callPackage, callPackage,
installShellFiles, installShellFiles,
mkShell, mkShell,
@ -12,6 +13,9 @@
withNgSuffix ? true, withNgSuffix ? true,
withReexec ? false, withReexec ? false,
withShellFiles ? true, 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 let
executable = if withNgSuffix then "nixos-rebuild-ng" else "nixos-rebuild"; executable = if withNgSuffix then "nixos-rebuild-ng" else "nixos-rebuild";
@ -73,6 +77,10 @@ python3Packages.buildPythonApplication rec {
pytestFlagsArray = [ "-vv" ]; pytestFlagsArray = [ "-vv" ];
makeWrapperArgs = lib.optionals (withTmpdir != null) [
"--set TMPDIR ${withTmpdir}"
];
passthru = passthru =
let let
python-with-pkgs = python3.withPackages ( python-with-pkgs = python3.withPackages (