forked from M-Labs/nix-scripts
do not use leaveDotGit for artiq-src (WA hash reproducibility issues)
This commit is contained in:
parent
192f700dbc
commit
fa68c48d01
8
main.nix
8
main.nix
@ -5,14 +5,18 @@ let
|
|||||||
''
|
''
|
||||||
cp --no-preserve=mode,ownership -R ${./artiq} $out
|
cp --no-preserve=mode,ownership -R ${./artiq} $out
|
||||||
REV=`git --git-dir ${artiqSrc}/.git rev-parse HEAD`
|
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
|
cat > $out/pkgs/artiq-src.nix << EOF
|
||||||
{ fetchgit }:
|
{ fetchgit }:
|
||||||
fetchgit {
|
fetchgit {
|
||||||
url = "git://github.com/m-labs/artiq.git";
|
url = "git://github.com/m-labs/artiq.git";
|
||||||
rev = "$REV";
|
rev = "$REV";
|
||||||
sha256 = "$HASH";
|
sha256 = "$HASH";
|
||||||
leaveDotGit = true;
|
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
echo \"5e.`cut -c1-8 <<< $REV`\" > $out/pkgs/artiq-version.nix
|
echo \"5e.`cut -c1-8 <<< $REV`\" > $out/pkgs/artiq-version.nix
|
||||||
|
Loading…
Reference in New Issue
Block a user