Skip to content

Instantly share code, notes, and snippets.

@grahamc
Created August 28, 2018 15:14
Show Gist options
  • Save grahamc/a2810119d95dc70368b01183db5212d1 to your computer and use it in GitHub Desktop.
Save grahamc/a2810119d95dc70368b01183db5212d1 to your computer and use it in GitHub Desktop.
# nix show-derivation /nix/store/iikcdjs8f52gbraxaipqxdjv26hb05yi-install-default.drv
{
"/nix/store/iikcdjs8f52gbraxaipqxdjv26hb05yi-install-default.drv": {
"outputs": {
"out": {
"path": "/nix/store/15s3fpnvj0ljw9mr843zd1icqwm46i9r-install-default"
}
},
"inputSrcs": [
"/nix/store/9krlzvny65gdc8s7kpb6lkx8cd02c25b-default-builder.sh"
],
"inputDrvs": {
"/nix/store/qf3gpwdgymmfbai9d9d71spc2x96hx3y-stdenv.drv": [
"out"
],
"/nix/store/qkf7yna7x4nvjscxm84fzkf0xx9svcy3-bash-4.4-p12.drv": [
"out"
]
},
"platform": "x86_64-linux",
"builder": "/nix/store/zqh3l3lyw32q1ayb15bnvg9f24j5v2p0-bash-4.4-p12/bin/bash",
"args": [
"-e",
"/nix/store/9krlzvny65gdc8s7kpb6lkx8cd02c25b-default-builder.sh"
],
"env": {
"allowSubstitutes": "",
"buildCommand": "n=$out\nmkdir -p \"$(dirname \"$n\")\"\n\nif [ -e \"$textPath\" ]; then\n mv \"$textPath\" \"$n\"\nelse\n echo -n \"$text\" > \"$n\"\nfi\n\n\n\n(test -n \"$executable\" && chmod +x \"$n\") || true\n",
"buildInputs": "",
"builder": "/nix/store/zqh3l3lyw32q1ayb15bnvg9f24j5v2p0-bash-4.4-p12/bin/bash",
"configureFlags": "",
"depsBuildBuild": "",
"depsBuildBuildPropagated": "",
"depsBuildTarget": "",
"depsBuildTargetPropagated": "",
"depsHostBuild": "",
"depsHostBuildPropagated": "",
"depsTargetTarget": "",
"depsTargetTargetPropagated": "",
"executable": "1",
"name": "install-default",
"nativeBuildInputs": "",
"out": "/nix/store/15s3fpnvj0ljw9mr843zd1icqwm46i9r-install-default",
"passAsFile": "text",
"preferLocalBuild": "1",
"propagatedBuildInputs": "",
"propagatedNativeBuildInputs": "",
"stdenv": "/nix/store/73jpvs9j0rk37xs3r61y3aldr9sh741h-stdenv",
"system": "x86_64-linux",
"text": "#!/bin/sh\n\nset -eux\n\ncurl https://nixos.org/nix/install | sh\n"
}
}
}
[root@big-ol-test-node-v2:~/nix-install-matrix]# cat /nix/store/15s3fpnvj0ljw9mr843zd1icqwm46i9r-install-default
[root@big-ol-test-node-v2:~/nix-install-matrix]# nix-store --realize --check /nix/store/iikcdjs8f52gbraxaipqxdjv26hb05yi-install-default.drv
checking outputs of '/nix/store/iikcdjs8f52gbraxaipqxdjv26hb05yi-install-default.drv'...
warning: rewriting hashes in '/nix/store/15s3fpnvj0ljw9mr843zd1icqwm46i9r-install-default'; cross fingers
error: derivation '/nix/store/iikcdjs8f52gbraxaipqxdjv26hb05yi-install-default.drv' may not be deterministic: output '/nix/store/15s3fpnvj0ljw9mr843zd1icqwm46i9r-install-default' differs
[root@big-ol-test-node-v2:~/nix-install-matrix]# nix-store --delete /nix/store/15s3fpnvj0ljw9mr843zd1icqwm46i9r-install-default
finding garbage collector roots...
removing stale link from '/nix/var/nix/gcroots/auto/maikpgii5bz133p46vqj6n7sbykjw3l6' to '/tmp/nixos-rebuild.hHCMMW/nix.drv'
removing stale link from '/nix/var/nix/gcroots/auto/rvi6p69rparxwrbl4x9k3nngz8sgw54m' to '/tmp/tmp.uGapFfvqZW/system'
removing stale link from '/nix/var/nix/gcroots/auto/w0hkhzjgqghlc15q8asq2iakwmh00s01' to '/tmp/nixos-rebuild.hHCMMW/nix'
removing stale link from '/nix/var/nix/gcroots/auto/a1n9v2wziq8yc5980iirspayp9lvd319' to '/tmp/nix-build-26580-0/result'
removing stale link from '/nix/var/nix/gcroots/auto/2ijh9b1pz6b5f7s2r4gz845ihfbxkynr' to '/tmp/nixos-rebuild.4q8WqO/nix.drv'
removing stale link from '/nix/var/nix/gcroots/auto/jzpzh49i5kfgbhpv30k40wcksp2gf0jx' to '/tmp/nix-build-29470-0/result'
removing stale link from '/nix/var/nix/gcroots/auto/i9b52a7xw7xjyrssqp97a91frg8svqq2' to '/tmp/nix-build-32232-0/result'
removing stale link from '/nix/var/nix/gcroots/auto/yaxfidxphkhfrrzrcdxh6ddyzqq7102j' to '/tmp/nix-build-29346-0/result'
removing stale link from '/nix/var/nix/gcroots/auto/s0avdxcssbrp91j4ljsd29amxgqpmvd9' to '/tmp/nix-build-32150-0/result'
removing stale link from '/nix/var/nix/gcroots/auto/s0b1hchybrisgpvrmwjkjspdikpxy6ph' to '/tmp/nixos-rebuild.z0b2Dl/nix'
removing stale link from '/nix/var/nix/gcroots/auto/px5cmzbf8yh26kfimfyk80kskbgiwzh9' to '/tmp/nix-build-2549-0/result'
removing stale link from '/nix/var/nix/gcroots/auto/dsdd6x0x5pzxcb062kqfkh3yvfzj38ha' to '/tmp/nixos-rebuild.tzELvg/nix'
removing stale link from '/nix/var/nix/gcroots/auto/7ql5flwx0kkmxsxs4a9mjj5pdyh6gr2v' to '/tmp/nixos-rebuild.z0b2Dl/nix.drv'
removing stale link from '/nix/var/nix/gcroots/auto/726z6jvh0jr4fvqy2j5nb2ms09fkliab' to '/tmp/nixos-rebuild.4q8WqO/nix'
removing stale link from '/nix/var/nix/gcroots/auto/ddrvhc2ykj83qbcg8c002hzn746ky1dp' to '/tmp/nix-build-29388-0/result'
removing stale link from '/nix/var/nix/gcroots/auto/999ggwyhlk2yyy2lm71qpibw18a18y7w' to '/tmp/nixos-rebuild.tzELvg/nix.drv'
removing stale link from '/nix/var/nix/gcroots/auto/w4l86w4bwdj7kbj1yzq94sd2g3q7ynnw' to '/tmp/nix-build-26660-0/result'
removing stale temporary roots file '/nix/var/nix/temproots/1968'
removing stale temporary roots file '/nix/var/nix/temproots/43345'
removing stale temporary roots file '/nix/var/nix/temproots/2648'
deleting '/nix/store/15s3fpnvj0ljw9mr843zd1icqwm46i9r-install-default'
deleting '/nix/store/trash'
deleting unused links...
note: currently hard linking saves -0.00 MiB
1 store paths deleted, 0.00 MiB freed
[root@big-ol-test-node-v2:~/nix-install-matrix]# nix-store --realize /nix/store/iikcdjs8f52gbraxaipqxdjv26hb05yi-install-default.drv
these derivations will be built:
/nix/store/iikcdjs8f52gbraxaipqxdjv26hb05yi-install-default.drv
building '/nix/store/iikcdjs8f52gbraxaipqxdjv26hb05yi-install-default.drv'...
warning: you did not specify '--add-root'; the result might be removed by the garbage collector
/nix/store/15s3fpnvj0ljw9mr843zd1icqwm46i9r-install-default
[root@big-ol-test-node-v2:~/nix-install-matrix]# cat /nix/store/15s3fpnvj0ljw9mr843zd1icqwm46i9r-install-default
#!/bin/sh
set -eux
curl https://nixos.org/nix/install | sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment