2024-05-28 16:43:04 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2014-02-26 16:47:54 +00:00
|
|
|
source common.sh
|
|
|
|
|
2024-06-16 10:51:46 +00:00
|
|
|
TODO_NixOS
|
|
|
|
|
2021-07-26 04:54:55 +00:00
|
|
|
needLocalStore "--dump-db requires a local store"
|
|
|
|
|
2014-02-26 16:47:54 +00:00
|
|
|
clearStore
|
|
|
|
|
|
|
|
path=$(nix-build dependencies.nix -o $TEST_ROOT/result)
|
|
|
|
|
|
|
|
deps="$(nix-store -qR $TEST_ROOT/result)"
|
|
|
|
|
|
|
|
nix-store --dump-db > $TEST_ROOT/dump
|
|
|
|
|
2016-07-27 15:14:41 +00:00
|
|
|
rm -rf $NIX_STATE_DIR/db
|
2014-02-26 16:47:54 +00:00
|
|
|
|
|
|
|
nix-store --load-db < $TEST_ROOT/dump
|
|
|
|
|
|
|
|
deps2="$(nix-store -qR $TEST_ROOT/result)"
|
|
|
|
|
|
|
|
[ "$deps" = "$deps2" ];
|
|
|
|
|
|
|
|
nix-store --dump-db > $TEST_ROOT/dump2
|
|
|
|
cmp $TEST_ROOT/dump $TEST_ROOT/dump2
|