From fa68c48d01649ec2e2ee93fc2e8535dd965f1cca Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sun, 31 Mar 2019 23:06:46 +0800 Subject: [PATCH] do not use leaveDotGit for artiq-src (WA hash reproducibility issues) --- main.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main.nix b/main.nix index fe1e303..8624061 100644 --- a/main.nix +++ b/main.nix @@ -5,14 +5,18 @@ let '' cp --no-preserve=mode,ownership -R ${./artiq} $out REV=`git --git-dir ${artiqSrc}/.git rev-parse HEAD` - HASH=`nix-hash --type sha256 --base32 ${artiqSrc}` + ARTIQ_SRC_CLEAN=`mktemp -d` + cp -a ${artiqSrc}/. $ARTIQ_SRC_CLEAN + chmod -R 755 $ARTIQ_SRC_CLEAN/.git + chmod 755 $ARTIQ_SRC_CLEAN + rm -rf $ARTIQ_SRC_CLEAN/.git + HASH=`nix-hash --type sha256 --base32 $ARTIQ_SRC_CLEAN` cat > $out/pkgs/artiq-src.nix << EOF { fetchgit }: fetchgit { url = "git://github.com/m-labs/artiq.git"; rev = "$REV"; sha256 = "$HASH"; - leaveDotGit = true; } EOF echo \"5e.`cut -c1-8 <<< $REV`\" > $out/pkgs/artiq-version.nix