2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
fetchpatch,
|
|
|
|
gitUpdater,
|
|
|
|
makeFontsConf,
|
|
|
|
buildLua,
|
|
|
|
buildGoModule,
|
2024-01-02 11:29:13 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildLua (finalAttrs: {
|
2023-03-15 16:39:30 +00:00
|
|
|
pname = "uosc";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "5.2.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
scriptPath = "src/uosc";
|
2023-03-15 16:39:30 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tomasklaen";
|
|
|
|
repo = "uosc";
|
|
|
|
rev = finalAttrs.version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-0GPDna9uOuhFDhA9A1fbkoKkgSB76qiDzJVQ9gjGcWo=";
|
2023-03-15 16:39:30 +00:00
|
|
|
};
|
2024-05-15 15:35:15 +00:00
|
|
|
passthru.updateScript = gitUpdater { };
|
2023-03-15 16:39:30 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
tools = buildGoModule {
|
|
|
|
pname = "uosc-bin";
|
|
|
|
inherit (finalAttrs) version src;
|
|
|
|
vendorHash = "sha256-nkY0z2GiDxfNs98dpe+wZNI3dAXcuHaD/nHiZ2XnZ1Y=";
|
|
|
|
};
|
2023-03-15 16:39:30 +00:00
|
|
|
|
|
|
|
# the script uses custom "texture" fonts as the background for ui elements.
|
|
|
|
# In order for mpv to find them, we need to adjust the fontconfig search path.
|
2024-01-02 11:29:13 +00:00
|
|
|
postInstall = "cp -r src/fonts $out/share";
|
2023-03-15 16:39:30 +00:00
|
|
|
passthru.extraWrapperArgs = [
|
|
|
|
"--set"
|
|
|
|
"FONTCONFIG_FILE"
|
|
|
|
(toString (makeFontsConf {
|
|
|
|
fontDirectories = [ "${finalAttrs.finalPackage}/share/fonts" ];
|
|
|
|
}))
|
2024-01-02 11:29:13 +00:00
|
|
|
"--set"
|
|
|
|
"MPV_UOSC_ZIGGY"
|
|
|
|
(lib.getExe' finalAttrs.tools "ziggy")
|
2023-03-15 16:39:30 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Feature-rich minimalist proximity-based UI for MPV player";
|
|
|
|
homepage = "https://github.com/tomasklaen/uosc";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with lib.maintainers; [ apfelkuchen6 ];
|
|
|
|
};
|
|
|
|
})
|