hash mismatch in fixed-output derivation '/nix/store/zldkjq66059l537da7ryzlqh4jv91p5a-RESTRICTDIST-vs' #3
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
To reproduce
git clone https://git.m-labs.hk/M-Labs/wfvm.git
cd wfvm/wfvm
nix-build demo-image.nix
(Other than instructed in README.md > How to use > Install a Windows image, I didn't adjust
demo-image.nix
in any way, because I don't know yet what adjustments I'd need or want. For now, I just want to trywfvm
and what it can do.)observed
The build fails with
full terminal output (click to expand)
system metadata
"x86_64-linux"
Linux 5.4.57, NixOS, 20.09pre237781.32b46dd897a (Nightingale)
yes
yes
nix-env (Nix) 2.3.7
"nixos-20.09pre238896.16fc531784a, nixos-unstable-20.09pre218613.ae6bdcc5358"
""
/nix/var/nix/profiles/per-user/root/channels/nixos
cause analysis
The expected ("wanted") hash seems to come from
4b497938ff/wfvm/layers/default.nix (L96)
. Whether I'm supposed to change it there, I have no idea.Possibly this is because the Microsoft servers are returning a different download to the MSVC installer. I'm not sure how to make this deterministic, Microsoft seems to put a lot of effort into ensuring that you do not control what goes into your machine.
FWIW, someone reverse engineered the VS downloader, there is some info here:
M-Labs/nix-scripts#27 (comment)
Will also send you more data by email to help track this down.
Another thing: we are pinning nixpkgs here:
https://git.m-labs.hk/M-Labs/nix-scripts/src/branch/master/artiq-fast/wfvm.nix
This isn't the problem but this should explain why you're getting
zldkjq66059l537da7ryzlqh4jv91p5a-RESTRICTDIST-vs
while we have76dblpbnf2v6s1n0q6nkf9chm96wwqdh-RESTRICTDIST-vs
.I just tried and I'm getting yet another hash: 0axaym774p2w49pja1vqlx3x6fdylfjkpiybrqkyfc605r07xqyk
This Visual Studio compiler is really a PITA.
From Alexander Bich:
I worked on the MSVS-in-VM
problem for a while, and have some stuff reliably working:
https://github.com/quyse/coil-toolchain-msvs . It's a bit complicated
to use and not documented, but some easy thing you can try is this
(example_layout.nix is attached to this email):
NIXPKGS_ALLOW_UNFREE=1 nix build -Lf ./example_layout.nix
The example downloads and builds VS 16 layout cache for offline install,
in which vs_setup.exe can be run as usual. My repo tracks hashes
for many VS versions now, and so you can request either recent major
version ("16") or specific minor version ("16.11.7"). MSVS actually uses
immutable urls for all the content (except https://aka.ms/vs/... which
does change all the time - it redirects to most recent release, but the
result URL location is immutable), so older minor versions continue to
be available for download too.