From a1aa06db32e02615183bf8ac62dcc10fbf0d9885 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Wed, 6 May 2026 23:55:40 +0900 Subject: [PATCH] flake.nix: remove $HOME at end of every build It seems that crane accidentally creates these, and makes it so that the nix builders in CI complains about leftovers. See also: https://github.com/ipetkov/crane/issues/815 --- flake.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/flake.nix b/flake.nix index 69d9c61..e61207a 100644 --- a/flake.nix +++ b/flake.nix @@ -81,6 +81,11 @@ inherit src; strictDeps = true; }; + + # https://github.com/ipetkov/crane/issues/815 + postFixup = '' + [ -d "$HOME" ] && rm -rf "$HOME" + ''; }; tamerye-static-lib = craneLib.buildPackage { @@ -109,6 +114,10 @@ }; cargoExtraArgs = lib.escapeShellArgs [ "--features" "static" ]; + + postFixup = '' + [ -d "$HOME" ] && rm -rf "$HOME" + ''; }; tamerye-tests = craneLib.cargoNextest { @@ -135,6 +144,10 @@ partitions = 1; partitionType = "count"; cargoNextestPartitionsExtraArgs = "--no-tests=pass"; + + postFixup = '' + [ -d "$HOME" ] && rm -rf "$HOME" + ''; }; }); };