mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-12-02 10:26:16 +02:00
27 lines
484 B
Bash
27 lines
484 B
Bash
|
#!/usr/bin/env bash
|
||
|
|
||
|
set -eu -o pipefail
|
||
|
|
||
|
set -x
|
||
|
|
||
|
source common.sh
|
||
|
|
||
|
storeDirs
|
||
|
|
||
|
initLowerStore
|
||
|
|
||
|
mountOverlayfs
|
||
|
|
||
|
### Do a redundant add
|
||
|
|
||
|
# upper layer should not have it
|
||
|
expect 1 stat $(toRealPath "$storeBTop/nix/store" "$path")
|
||
|
|
||
|
path=$(nix-store --store "$storeB" --add ../dummy)
|
||
|
|
||
|
# lower store should have it from before
|
||
|
stat $(toRealPath "$storeA/nix/store" "$path")
|
||
|
|
||
|
# upper layer should still not have it (no redundant copy)
|
||
|
expect 1 stat $(toRealPath "$storeB/nix/store" "$path")
|