File tree Expand file tree Collapse file tree 2 files changed +60
-0
lines changed
Expand file tree Collapse file tree 2 files changed +60
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ pkgs ,
3+ self ,
4+ } :
5+
6+ let
7+ kanshiWrapped =
8+ ( self . wrapperModules . kanshi . apply {
9+ inherit pkgs ;
10+
11+ configFile . content = ''
12+ profile {
13+ output eDP-1 enable scale 2
14+ }
15+ '' ;
16+
17+ } ) . wrapper ;
18+
19+ in
20+ pkgs . runCommand "kanshi-test" { } ''
21+
22+ "${ kanshiWrapped } /bin/kanshi" --help 2>&1 | grep -q "config"
23+
24+ touch $out
25+ ''
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+ Kanshi configuration file.
15+ See {manpage}`kanshi(5)` for the configuration format.
16+ '' ;
17+ example = ''
18+ profile {
19+ output LVDS-1 disable
20+ output "Some Company ASDF 4242" mode 1600x900 position 0,0
21+ }
22+
23+ profile nomad {
24+ output LVDS-1 enable scale 2
25+ }
26+ '' ;
27+ } ;
28+ } ;
29+ config . flags = {
30+ "--config" = "${ config . configFile . path } " ;
31+ } ;
32+ config . package = config . pkgs . kanshi ;
33+ config . meta . maintainers = [ lib . maintainers . adeci ] ;
34+ config . meta . platforms = lib . platforms . linux ;
35+ }
You can’t perform that action at this time.
0 commit comments