use mkConfWrapper for mpv
This commit is contained in:
parent
02d1b21916
commit
c9540d82c5
1 changed files with 4 additions and 8 deletions
|
|
@ -2,6 +2,7 @@
|
|||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
owoLib,
|
||||
...
|
||||
}:
|
||||
|
||||
|
|
@ -33,14 +34,9 @@ in
|
|||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [
|
||||
(pkgs.symlinkJoin {
|
||||
inherit name;
|
||||
paths = [ cfg.package ];
|
||||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/${name} \
|
||||
--add-flags "--config-dir=${pkgs.writeTextDir "${name}.conf" cfg.extraConfig}"
|
||||
'';
|
||||
(owoLib.mkConfWrapper name cfg.package {
|
||||
globalConfig = pkgs.writeTextDir "${name}.conf" cfg.extraConfig;
|
||||
configArg = "--config-dir=";
|
||||
})
|
||||
];
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue