From a9f9ea0f52acaa770de569665a21832bb13605b4 Mon Sep 17 00:00:00 2001 From: Lucas Bollen Date: Thu, 9 Jan 2025 10:26:55 +0100 Subject: [PATCH] Add post fetch step that removes `.git` Leaving `.git` can make the hash unstable --- nix/openocd-riscv.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nix/openocd-riscv.nix b/nix/openocd-riscv.nix index 6489f9e..fc821f7 100644 --- a/nix/openocd-riscv.nix +++ b/nix/openocd-riscv.nix @@ -25,6 +25,10 @@ pkgs.stdenv.mkDerivation rec { sha256 = "sha256-cc4OebtCCsZyaMIlTfpUe26MwZ8WnrFt+IYQ+B2Hzww="; fetchSubmodules = true; deepClone = true; + postFetch = '' + # See: https://github.com/NixOS/nixpkgs/issues/8567#issuecomment-1846499599 + find "$out/" -type d -name '.git' | xargs rm -rf + ''; }; installPhase = ''