Skip to content

Commit abc96d8

Browse files
committed
nix: switch to ffmpeg-full and provide a fontconfig file to ensure Raleway is available
1 parent 63b2422 commit abc96d8

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

default.nix

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,29 @@ let
1717
});
1818
});
1919
};
20+
ffmpeg = pkgs.ffmpeg-full; # we need librsvg support
21+
22+
fontconfigConf = pkgs.makeFontsConf {
23+
fontDirectories = [
24+
(lib.sources.sourceFilesBySuffices ./hackyplayer/resources [ ".ttf" ])
25+
];
26+
};
27+
ffmpegWrapper = pkgs.writeShellScript "ffmpeg-wrapper" ''
28+
export FONTCONFIG_FILE="${fontconfigConf}"
29+
exec "${lib.getExe' ffmpeg "ffmpeg"}" "$@"
30+
'';
2031
in
21-
hackyplayer.dependencyEnv.override {
32+
(hackyplayer.dependencyEnv.override {
2233
app = hackyplayer.overridePythonAttrs (old: {
2334
postPatch = ''
2435
${old.postPatch or ""}
2536
2637
substituteInPlace hackyplayer/formvideo.py \
27-
--replace-fail 'FFMPEG_BIN = "ffmpeg"' 'FFMPEG_BIN = "${lib.getExe' pkgs.ffmpeg "ffmpeg"}"' \
38+
--replace-fail 'FFMPEG_BIN = "ffmpeg"' 'FFMPEG_BIN = "${ffmpegWrapper}"' \
2839
--replace-fail 'IMAGEMAGICK_BIN = "convert"' 'IMAGEMAGICK_BIN = "${lib.getExe' pkgs.imagemagick "convert"}"' \
2940
--replace-fail 'APP_ROOT = Path(".")' 'APP_ROOT = Path("${placeholder "out"}/${hackyplayer.python.sitePackages}/hackyplayer")'
3041
'';
3142
});
43+
}) // {
44+
inherit fontconfigConf ffmpegWrapper;
3245
}

0 commit comments

Comments
 (0)