fork/home-manager
git clone https://git.julia.blue/fork/home-manager
c59f0eac
master
1{ 2debug = { pkgs , config , lib , ...} : 3lib . mkIf config . test . enableBig { 4home . enableDebugInfo = true ; 5home . packages = with pkgs ; [ curl gdb ]; 6 7nmt . script = '' 8[ -L $ TESTED /home-path/lib/debug/curl ] \ 9|| fail "Debug-symbols for pkgs.curl should exist in \`/home-path/lib/debug'!" 10 11#source $TESTED/home-path/etc/profile.d/hm-session-vars.sh 12#[[ "$NIX_DEBUG_INFO_DIRS" =~ /lib/debug$ ]] \ 13#|| fail "Invalid NIX_DEBUG_INFO_DIRS!" 14assertFileExists home-path/etc/profile.d/hm-session-vars.sh 15assertFileRegex home-path/etc/profile.d/hm-session-vars.sh \ 16'NIX_DEBUG_INFO_DIRS=.*/lib/debug' 17 18# We need to override NIX_DEBUG_INFO_DIRS here as $HOME evaluates to the home 19# of the user who executes this testcase :/ 20{ echo quit | PATH =" $ TESTED /home-path/bin'' $ {PATH:+:} $ PATH " NIX_DEBUG_INFO_DIRS= $ TESTED /home-path/lib/debug \ 21gdb curl 2>&1 | \ 22grep 'Reading symbols from ${ builtins . storeDir } / '; \ 23} || fail "Failed to read debug symbols from curl in gdb" 24'' ; 25}; 26}