File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ {
2+ pkgs ,
3+ self ,
4+ } :
5+
6+ let
7+ i3Wrapped =
8+ ( self . wrapperModules . i3 . apply {
9+ inherit pkgs ;
10+
11+ configFile . content = ''
12+ # Test config
13+ set $mod Mod4
14+ bindsym $mod+Return exec alacritty
15+ bindsym $mod+Shift+q kill
16+ '' ;
17+
18+ } ) . wrapper ;
19+
20+ in
21+ pkgs . runCommand "i3-test" { nativeBuildInputs = [ pkgs . dbus ] ; } ''
22+
23+ export DBUS_SESSION_BUS_ADDRESS="unix:path=$PWD/bus"
24+ dbus-daemon --session --address="$DBUS_SESSION_BUS_ADDRESS" --nofork --nopidfile --print-address &
25+ DBUS_PID=$!
26+
27+ "${ i3Wrapped } /bin/i3" --version | grep -q "${ i3Wrapped . version } "
28+
29+ kill $DBUS_PID 2>/dev/null || true
30+
31+ touch $out
32+ ''
Original file line number Diff line number Diff line change 1+ {
2+ config ,
3+ lib ,
4+ wlib ,
5+ ...
6+ } :
7+ {
8+ _class = "wrapper" ;
9+ options = {
10+ configFile = lib . mkOption {
11+ type = wlib . types . file config . pkgs ;
12+ default . content = "" ;
13+ description = ''
14+ I3 Window Manager configuration.
15+ '' ;
16+ } ;
17+ } ;
18+
19+ config . flags = {
20+ "--config" = toString config . configFile . path ;
21+ } ;
22+
23+ config . package = config . pkgs . i3 ;
24+ config . meta . maintainers = [
25+ lib . maintainers . randomdude
26+ ] ;
27+ config . meta . platforms = lib . platforms . linux ;
28+ }
You can’t perform that action at this time.
0 commit comments