Created
February 23, 2017 02:25
-
-
Save cleverca22/cabae09e77e52bd51ba7c4bccb285b0b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[clever@amd-nixos:/tmp/mnt]$ mkdir nix/store -pv | |
mkdir: created directory 'nix' | |
mkdir: created directory 'nix/store' | |
[clever@amd-nixos:/tmp/mnt]$ for x in $(nix-store -qR $(realpath /run/current-system/sw/bin/bash)); do nix-store --dump $x | nix-store --restore /tmp/mnt/$x ; done | |
[clever@amd-nixos:/tmp/mnt]$ ls nix/store/ | |
2bid4ynk163hmypgz7b4aanq2i0d41c3-ncurses-6.0 cg0gxn11n6sadfrw3p7l8rh053gn3f0z-bash-4.4-p5 wxdn46939hsihi92z1f4shkal5nd6p3n-readline-7.0p0 | |
3v5m2gn0kmxrg9xia0nqa491hmplvz2d-bash-4.4-p5 kk71vkqipf30qc165718jmp0s8cggn2y-glibc-2.24 | |
[clever@amd-nixos:/tmp/mnt]$ ls nix/ | |
store |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
2017-02-22 22:23:16 < clever> copumpkin: oh, i just had an idea on something you can use
2017-02-22 22:23:23 < clever> $ nix-store --dump a | nix-store --restore b
2017-02-22 22:23:40 < clever> copumpkin: this will serialize a into a NAR, then deserialize it back into b
2017-02-22 22:25:32 < clever> copumpkin: https://gist.github.com/cleverca22/cabae09e77e52bd51ba7c4bccb285b0b
2017-02-22 22:25:54 < clever> copumpkin: boom, i can now copy the closure of things into a given directory, though it completely ignores db.sqlite