qenya: Patch Feishin with mpv support

This commit is contained in:
Katherina Walshe-Grey 2025-05-29 23:54:27 +01:00
parent 453ec3c40d
commit bd3c9bd5f2
3 changed files with 25 additions and 1 deletions

View file

@ -1,6 +1,7 @@
{
imports = [
./dconf
./feishin.nix
./firefox.nix
./fonts.nix
./git.nix

24
home/qenya/feishin.nix Normal file
View file

@ -0,0 +1,24 @@
{ config, lib, pkgs, osConfig, ... }:
# Feishin ideally wants to see mpv at runtime, but this isn't catered for by
# the derivation in nixpkgs as it isn't strictly necessary.
# An easier way to do this would be to write mpv's full nix store path to
# Feishin's config. But Feishin has one JSON file for config and state, and
# we'd rather not overwrite the latter. Until and unless home-manager grows
# support for partially patching files, we live with this.
let
inherit (lib) mkIf;
isGraphical = osConfig.services.xserver.enable;
in
{
home.packages = mkIf isGraphical [
(pkgs.feishin.overrideAttrs (originalAttrs: {
buildInputs = originalAttrs.buildInputs ++ [ pkgs.mpv ];
postFixup = ''
${originalAttrs.postFixup or ""}
wrapProgram $out/bin/feishin --prefix PATH : ${lib.makeBinPath [ pkgs.mpv ]}
'';
}))
];
}

View file

@ -23,7 +23,6 @@ in
] ++ optionals isGraphical [
bitwarden
discord
feishin
gimp-with-plugins
jellyfin-media-player
tor-browser-bundle-bin