Skip to content

Instantly share code, notes, and snippets.

@cleverca22
Last active October 25, 2018 15:01
Show Gist options
  • Save cleverca22/524f8c66824159547e340448124bac0d to your computer and use it in GitHub Desktop.
Save cleverca22/524f8c66824159547e340448124bac0d to your computer and use it in GitHub Desktop.
building '/nix/store/jjpi1ygks4vrqzwayl39kpq4q4dbdc95-bootstrap-tools.tar.xz.drv'...
downloading 'http://tarballs.nixos.org/sha256/52d4afca2c70ced0ddc628c1dcccc00ba439e33ee2588da4b033aecf91e4c053'...
starting download of http://tarballs.nixos.org/sha256/52d4afca2c70ced0ddc628c1dcccc00ba439e33ee2588da4b033aecf91e4c053
finished download of 'http://tarballs.nixos.org/sha256/52d4afca2c70ced0ddc628c1dcccc00ba439e33ee2588da4b033aecf91e4c053'; curl status = 0, HTTP status = 404, body = 406 bytes
unable to download 'http://tarballs.nixos.org/sha256/52d4afca2c70ced0ddc628c1dcccc00ba439e33ee2588da4b033aecf91e4c053': HTTP error 404
downloading 'https://wdtz.org/files/030q34q7fk6jdfxkgcqp5rzr4yhw3pgx-stdenv-bootstrap-tools-x86_64-unknown-linux-musl/on-server/bootstrap-tools.tar.xz'...
starting download of https://wdtz.org/files/030q34q7fk6jdfxkgcqp5rzr4yhw3pgx-stdenv-bootstrap-tools-x86_64-unknown-linux-musl/on-server/bootstrap-tools.tar.xz
finished download of 'https://wdtz.org/files/030q34q7fk6jdfxkgcqp5rzr4yhw3pgx-stdenv-bootstrap-tools-x86_64-unknown-linux-musl/on-server/bootstrap-tools.tar.xz'; curl status = 0, HTTP status = 200, body = 21297184 bytes
download thread shutting down
building of '/nix/store/jjpi1ygks4vrqzwayl39kpq4q4dbdc95-bootstrap-tools.tar.xz.drv': got EOF
building of '/nix/store/jjpi1ygks4vrqzwayl39kpq4q4dbdc95-bootstrap-tools.tar.xz.drv': woken up
building of '/nix/store/jjpi1ygks4vrqzwayl39kpq4q4dbdc95-bootstrap-tools.tar.xz.drv': build done
killing process 28014
builder process for '/nix/store/jjpi1ygks4vrqzwayl39kpq4q4dbdc95-bootstrap-tools.tar.xz.drv' finished
killing all processes running under uid '30001'
fixed-output derivation produced path '/nix/store/fspharwg44i1qfa7r3nlakcxz88n7n4y-bootstrap-tools.tar.xz' with sha256 hash '0zqzjzv86qi840bljvyhk2na669j0hqa006ad0cg1bv0yrjcndjs' instead of the expected hash '0ly0wj8wzbikn2j8sn727vikk90bq36drh98qvfx1kkh5k5azm2j'
lock released on '/nix/store/l6dirrp63hznr9lhd51jm8cglp46fi31-bootstrap-tools.tar.xz.lock'
building of '/nix/store/jjpi1ygks4vrqzwayl39kpq4q4dbdc95-bootstrap-tools.tar.xz.drv': done
building of '/nix/store/jjpi1ygks4vrqzwayl39kpq4q4dbdc95-bootstrap-tools.tar.xz.drv': goal destroyed
error: build of '/nix/store/jjpi1ygks4vrqzwayl39kpq4q4dbdc95-bootstrap-tools.tar.xz.drv' failed

[clever@system76:~/nixpkgs]$ ls -lh /nix/store/fspharwg44i1qfa7r3nlakcxz88n7n4y-bootstrap-tools.tar.xz
-r--r--r-- 1 root root 264M Dec 31  1969 /nix/store/fspharwg44i1qfa7r3nlakcxz88n7n4y-bootstrap-tools.tar.xz

[clever@system76:~/nixpkgs]$ ls -l /nix/store/fspharwg44i1qfa7r3nlakcxz88n7n4y-bootstrap-tools.tar.xz
-r--r--r-- 1 root root 276817920 Dec 31  1969 /nix/store/fspharwg44i1qfa7r3nlakcxz88n7n4y-bootstrap-tools.tar.xz

[clever@system76:~/nixpkgs]$ file /nix/store/fspharwg44i1qfa7r3nlakcxz88n7n4y-bootstrap-tools.tar.xz
/nix/store/fspharwg44i1qfa7r3nlakcxz88n7n4y-bootstrap-tools.tar.xz: POSIX tar archive (GNU)

somehow, nix is unpacking the xz within the file its downloading, and then the hash doesnt match, because thats the hash of the xz stream, not the tar stream

[clever@system76:~/nixpkgs]$ nix show-derivation /nix/store/jjpi1ygks4vrqzwayl39kpq4q4dbdc95-bootstrap-tools.tar.xz.drv
{
"/nix/store/jjpi1ygks4vrqzwayl39kpq4q4dbdc95-bootstrap-tools.tar.xz.drv": {
"outputs": {
"out": {
"path": "/nix/store/l6dirrp63hznr9lhd51jm8cglp46fi31-bootstrap-tools.tar.xz",
"hashAlgo": "sha256",
"hash": "52d4afca2c70ced0ddc628c1dcccc00ba439e33ee2588da4b033aecf91e4c053"
}
},
"inputSrcs": [],
"inputDrvs": {},
"platform": "builtin",
"builder": "builtin:fetchurl",
"args": [],
"env": {
"builder": "builtin:fetchurl",
"executable": "",
"impureEnvVars": "http_proxy https_proxy ftp_proxy all_proxy no_proxy",
"name": "bootstrap-tools.tar.xz",
"out": "/nix/store/l6dirrp63hznr9lhd51jm8cglp46fi31-bootstrap-tools.tar.xz",
"outputHash": "0ly0wj8wzbikn2j8sn727vikk90bq36drh98qvfx1kkh5k5azm2j",
"outputHashAlgo": "sha256",
"outputHashMode": "flat",
"preferLocalBuild": "1",
"system": "builtin",
"unpack": "",
"url": "https://wdtz.org/files/030q34q7fk6jdfxkgcqp5rzr4yhw3pgx-stdenv-bootstrap-tools-x86_64-unknown-linux-musl/on-server/bootstrap-tools.tar.xz",
"urls": "https://wdtz.org/files/030q34q7fk6jdfxkgcqp5rzr4yhw3pgx-stdenv-bootstrap-tools-x86_64-unknown-linux-musl/on-server/bootstrap-tools.tar.xz"
}
}
}
[root@router:~]# /nix/store/i2h7q013c5yp14wk0wq65ssjw1bzmapf-nix-2.0.1/bin/nix-store -r /nix/store/jjpi1ygks4vrqzwayl39kpq4q4dbdc95-bootstrap-tools.tar.xz.drv
warning: unknown setting 'build-extra-platforms'
these derivations will be built:
/nix/store/jjpi1ygks4vrqzwayl39kpq4q4dbdc95-bootstrap-tools.tar.xz.drv
building '/nix/store/jjpi1ygks4vrqzwayl39kpq4q4dbdc95-bootstrap-tools.tar.xz.drv'...
warning: you did not specify '--add-root'; the result might be removed by the garbage collector
/nix/store/l6dirrp63hznr9lhd51jm8cglp46fi31-bootstrap-tools.tar.xz
/nix/store/30qqqdvsyfvq6kkb7skqr86ix07cr86z-nix-2.1pre6377_954d1f4d/bin/nix-store is the version that fails
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment