From e99c61b2c0aa7a6a5de6582a30ad53875ba8d3a9 Mon Sep 17 00:00:00 2001 From: Altagos Date: Sat, 13 Sep 2025 16:21:17 +0200 Subject: [PATCH] potential fix for tar command #2 --- flake.nix | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index fbad5ba..e4570c2 100644 --- a/flake.nix +++ b/flake.nix @@ -15,9 +15,18 @@ in (flake-utils.lib.eachDefaultSystem (system: let # Fix zig to handle tar extraction in Docker containers zigFixed = zig2nix.outputs.packages.${system}.zig-latest.overrideAttrs (oldAttrs: { - # Set TAR_OPTIONS for the unpack phase to avoid ownership issues - preUnpack = '' - export TAR_OPTIONS="--no-same-owner" + # Override the unpack phase to use --no-same-owner + unpackPhase = '' + runHook preUnpack + + # Extract with --no-same-owner to avoid permission issues in Docker + tar xf $src --no-same-owner + + # Set sourceRoot to the extracted directory + sourceRoot=$(ls -d */ | head -n 1) + sourceRoot=''${sourceRoot%/} + + runHook postUnpack ''; }); # Zig flake helper -- 2.51.2