This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

tools.mpv: reference dl_subs drv instead of the flake source

+7 -4
+7 -4
tools/mpv/flake-module.nix
··· 1 - { self, inputs, ... }: 1 + { inputs, ... }: 2 2 { 3 3 perSystem = 4 - { pkgs, ... }: 4 + { pkgs, self', ... }: 5 5 { 6 6 packages.mpv = 7 7 let ··· 20 20 log('Searching subtitles ...', 10) 21 21 path = mp.get_property('path') 22 22 23 - -- Build dl_subs lazily when needed 23 + -- Build dl_subs lazily when needed. Realise the pinned .drv 24 + -- rather than a flake ref so the script doesn't embed the repo; 25 + -- unsafeDiscardOutputDependency keeps only the .drv files as 26 + -- references instead of the whole build-time closure. 24 27 log('Building subtitle downloader...', 5) 25 - result = utils.subprocess({ args = {"nix", "build", "--no-link", "--print-out-paths", "${self}#mpv-dl-subs"} }) 28 + result = utils.subprocess({ args = {"nix", "build", "--no-link", "--print-out-paths", "${builtins.unsafeDiscardOutputDependency self'.packages.mpv-dl-subs.drvPath}^out"} }) 26 29 if result.error ~= nil then 27 30 log('Failed to build subtitle downloader') 28 31 return