fork/home-manager

git clone https://git.julia.blue/fork/home-manager

Mario Rodastreewide: fix typos (#3618)c59f0eac

master
1.1 KiB26 linesraw
1{
2  debug = { pkgs, config, lib, ... }:
3    lib.mkIf config.test.enableBig {
4      home.enableDebugInfo = true;
5      home.packages = with pkgs; [ curl gdb ];
6
7      nmt.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!"
14        assertFileExists home-path/etc/profile.d/hm-session-vars.sh
15        assertFileRegex 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 \
21          gdb curl 2>&1 | \
22          grep 'Reading symbols from ${builtins.storeDir}/'; \
23        } || fail "Failed to read debug symbols from curl in gdb"
24      '';
25    };
26}